|
@@ -34,11 +34,11 @@ import com.dmdirc.addons.ui_swing.components.frames.ChannelFrame;
|
34
|
34
|
import com.dmdirc.addons.ui_swing.components.inputfields.SwingInputHandler;
|
35
|
35
|
import com.dmdirc.addons.ui_swing.components.inputfields.TextPaneInputField;
|
36
|
36
|
import com.dmdirc.addons.ui_swing.components.text.WrapEditorKit;
|
37
|
|
-import com.dmdirc.addons.ui_swing.injection.SwingModule.SwingSettingsDomain;
|
38
|
37
|
import com.dmdirc.interfaces.TopicChangeListener;
|
39
|
38
|
import com.dmdirc.interfaces.config.AggregateConfigProvider;
|
40
|
39
|
import com.dmdirc.interfaces.config.ConfigChangeListener;
|
41
|
40
|
import com.dmdirc.parser.common.ChannelJoinRequest;
|
|
41
|
+import com.dmdirc.plugins.PluginDomain;
|
42
|
42
|
import com.dmdirc.plugins.PluginManager;
|
43
|
43
|
import com.dmdirc.ui.IconManager;
|
44
|
44
|
import com.dmdirc.ui.core.util.URLHandler;
|
|
@@ -133,7 +133,7 @@ public class TopicBar extends JComponent implements ActionListener,
|
133
|
133
|
public TopicBar(
|
134
|
134
|
final MainFrame parentWindow,
|
135
|
135
|
@SuppressWarnings("qualifiers") @GlobalConfig final AggregateConfigProvider globalConfig,
|
136
|
|
- @SuppressWarnings("qualifiers") @SwingSettingsDomain final String domain,
|
|
136
|
+ @SuppressWarnings("qualifiers") @PluginDomain(SwingController.class) final String domain,
|
137
|
137
|
final ColourManager colourManager,
|
138
|
138
|
final PluginManager pluginManager,
|
139
|
139
|
final SwingWindowFactory windowFactory,
|
|
@@ -193,31 +193,31 @@ public class TopicBar extends JComponent implements ActionListener,
|
193
|
193
|
"enterButton");
|
194
|
194
|
topicText.getActionMap().put("enterButton", new AbstractAction(
|
195
|
195
|
"enterButton") {
|
196
|
|
- /**
|
197
|
|
- * A version number for this class. It should be changed whenever the class structure is
|
198
|
|
- * changed (or anything else that would prevent serialized objects being unserialized
|
199
|
|
- * with the new class).
|
200
|
|
- */
|
201
|
|
- private static final long serialVersionUID = 1;
|
202
|
|
-
|
203
|
|
- /** {@inheritDoc} */
|
204
|
|
- @Override
|
205
|
|
- public void actionPerformed(final ActionEvent e) {
|
206
|
|
- commitTopicEdit();
|
207
|
|
- }
|
208
|
|
- });
|
|
196
|
+ /**
|
|
197
|
+ * A version number for this class. It should be changed whenever the class
|
|
198
|
+ * structure is changed (or anything else that would prevent serialized objects
|
|
199
|
+ * being unserialized with the new class).
|
|
200
|
+ */
|
|
201
|
+ private static final long serialVersionUID = 1;
|
|
202
|
+
|
|
203
|
+ /** {@inheritDoc} */
|
|
204
|
+ @Override
|
|
205
|
+ public void actionPerformed(final ActionEvent e) {
|
|
206
|
+ commitTopicEdit();
|
|
207
|
+ }
|
|
208
|
+ });
|
209
|
209
|
topicText.getInputMap().put(KeyStroke.getKeyStroke("ESCAPE"),
|
210
|
210
|
"escapeButton");
|
211
|
211
|
topicText.getActionMap().put("escapeButton", new AbstractAction(
|
212
|
212
|
"escapeButton") {
|
213
|
|
- private static final long serialVersionUID = 1;
|
|
213
|
+ private static final long serialVersionUID = 1;
|
214
|
214
|
|
215
|
|
- /** {@inheritDoc} */
|
216
|
|
- @Override
|
217
|
|
- public void actionPerformed(final ActionEvent e) {
|
218
|
|
- cancelTopicEdit();
|
219
|
|
- }
|
220
|
|
- });
|
|
215
|
+ /** {@inheritDoc} */
|
|
216
|
+ @Override
|
|
217
|
+ public void actionPerformed(final ActionEvent e) {
|
|
218
|
+ cancelTopicEdit();
|
|
219
|
+ }
|
|
220
|
+ });
|
221
|
221
|
topicText.addHyperlinkListener(this);
|
222
|
222
|
topicText.addMouseListener(this);
|
223
|
223
|
topicText.getDocument().addDocumentListener(this);
|
|
@@ -253,8 +253,8 @@ public class TopicBar extends JComponent implements ActionListener,
|
253
|
253
|
channel.getStyliser().addStyledString(
|
254
|
254
|
(StyledDocument) topicText.getDocument(),
|
255
|
255
|
new String[]{Styliser.CODE_HEXCOLOUR
|
256
|
|
- + UIUtilities.getHex(foregroundColour)
|
257
|
|
- + channel.getCurrentTopic().getTopic(),},
|
|
256
|
+ + UIUtilities.getHex(foregroundColour)
|
|
257
|
+ + channel.getCurrentTopic().getTopic(),},
|
258
|
258
|
as);
|
259
|
259
|
}
|
260
|
260
|
topicText.setCaretPosition(0);
|
|
@@ -378,14 +378,14 @@ public class TopicBar extends JComponent implements ActionListener,
|
378
|
378
|
private void setColours() {
|
379
|
379
|
backgroundColour = UIUtilities.convertColour(
|
380
|
380
|
colourManager.getColourFromString(
|
381
|
|
- channel.getConfigManager().getOptionString(
|
382
|
|
- "ui", "inputbackgroundcolour",
|
383
|
|
- "ui", "backgroundcolour"), null));
|
|
381
|
+ channel.getConfigManager().getOptionString(
|
|
382
|
+ "ui", "inputbackgroundcolour",
|
|
383
|
+ "ui", "backgroundcolour"), null));
|
384
|
384
|
foregroundColour = UIUtilities.convertColour(
|
385
|
385
|
colourManager.getColourFromString(
|
386
|
|
- channel.getConfigManager().getOptionString(
|
387
|
|
- "ui", "inputforegroundcolour",
|
388
|
|
- "ui", "foregroundcolour"), null));
|
|
386
|
+ channel.getConfigManager().getOptionString(
|
|
387
|
+ "ui", "inputforegroundcolour",
|
|
388
|
+ "ui", "foregroundcolour"), null));
|
389
|
389
|
setBackground(backgroundColour);
|
390
|
390
|
setForeground(foregroundColour);
|
391
|
391
|
setDisabledTextColour(foregroundColour);
|