|
@@ -51,15 +51,21 @@ public final class NicklistRenderer extends DefaultListCellRenderer implements
|
51
|
51
|
private Color altBackgroundColour;
|
52
|
52
|
/** Show nick colours. */
|
53
|
53
|
private boolean showColours;
|
|
54
|
+ /** The list that we're using for the nicklist. */
|
|
55
|
+ private JList nicklist;
|
54
|
56
|
|
55
|
57
|
/**
|
56
|
58
|
* Creates a new instance of NicklistRenderer.
|
57
|
59
|
*
|
58
|
60
|
* @param config ConfigManager for the associated channel
|
|
61
|
+ * @param nicklist The nicklist that we're rendering for.
|
59
|
62
|
*/
|
60
|
|
- public NicklistRenderer(final ConfigManager config) {
|
|
63
|
+ public NicklistRenderer(final ConfigManager config, final JList nicklist) {
|
61
|
64
|
super();
|
|
65
|
+
|
62
|
66
|
this.config = config;
|
|
67
|
+ this.nicklist = nicklist;
|
|
68
|
+
|
63
|
69
|
config.addChangeListener("ui", this);
|
64
|
70
|
config.addChangeListener("nicklist", this);
|
65
|
71
|
|
|
@@ -116,11 +122,13 @@ public final class NicklistRenderer extends DefaultListCellRenderer implements
|
116
|
122
|
config.getOptionColour("ui", "nicklistbackgroundcolour",
|
117
|
123
|
config.getOptionColour("ui", "backgroundcolour",
|
118
|
124
|
Color.WHITE)));
|
|
125
|
+ nicklist.repaint();
|
119
|
126
|
}
|
120
|
127
|
if ("ui".equals(domain) && "shownickcoloursinnicklist".equals(key)) {
|
121
|
128
|
showColours =
|
122
|
129
|
config.getOptionBool("ui", "shownickcoloursinnicklist",
|
123
|
130
|
false);
|
|
131
|
+ nicklist.repaint();
|
124
|
132
|
}
|
125
|
133
|
}
|
126
|
134
|
}
|