Smell: duplicated "signal" string literal

This commit is contained in:
Rsl1122 2019-01-06 12:45:38 +02:00
parent 6b7e9c1132
commit 697f385814
2 changed files with 5 additions and 3 deletions

View File

@ -33,6 +33,7 @@ public class Icons {
public static final Icon OPERATOR = Icon.called("superpowers").of(Color.BLUE).of(Family.BRAND).build();
public static final Icon BANNED = Icon.called("gavel").of(Color.RED).build();
public static final Icon SERVER = Icon.called("server").of(Color.GREEN).build();
public static final Icon SIGNAL = Icon.called("signal").build();
public static final Icon GREEN_THUMB = Icon.called("thumbs-up").of(Color.GREEN).build();
public static final Icon YELLOW_FLAG = Icon.called("flag").of(Color.AMBER).build();

View File

@ -21,6 +21,7 @@ import com.djrapitops.plan.data.element.TableContainer;
import com.djrapitops.plan.data.store.mutators.PingMutator;
import com.djrapitops.plan.utilities.formatting.Formatter;
import com.djrapitops.plan.utilities.html.icon.Icon;
import com.djrapitops.plan.utilities.html.icon.Icons;
import java.util.*;
@ -36,9 +37,9 @@ class PingTable extends TableContainer {
PingTable(Map<String, List<Ping>> pingPerCountry, Formatter<Double> decimalFormatter) {
super(
Icon.called("globe") + " Country",
Icon.called("signal") + " Average Ping",
Icon.called("signal") + " Worst Ping",
Icon.called("signal") + " Best Ping"
Icons.SIGNAL + " Average Ping",
Icons.SIGNAL + " Worst Ping",
Icons.SIGNAL + " Best Ping"
);
this.decimalFormatter = decimalFormatter;
setColor("amber");