Browse Source

Style fixes

Change-Id: Ic4b352f4e88a13423babf63543553f0da1b5ece5
Reviewed-on: http://gerrit.dmdirc.com/1576
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Greg Holmes <greg@dmdirc.com>
tags/0.6.5
Chris Smith 13 years ago
parent
commit
bb47b22b58
35 changed files with 109 additions and 254 deletions
  1. 6
    8
      src/com/dmdirc/addons/dcc/PlaceholderContainer.java
  2. 2
    4
      src/com/dmdirc/addons/identd/IdentdServer.java
  3. 1
    1
      src/com/dmdirc/addons/logging/LoggingPlugin.java
  4. 4
    4
      src/com/dmdirc/addons/mediasource_dcop/AmarokSource.java
  5. 4
    4
      src/com/dmdirc/addons/mediasource_dcop/NoatunSource.java
  6. 0
    1
      src/com/dmdirc/addons/notifications/NotificationCommand.java
  7. 7
    7
      src/com/dmdirc/addons/nowplaying/NowPlayingCommand.java
  8. 0
    4
      src/com/dmdirc/addons/osd/OsdCommand.java
  9. 1
    1
      src/com/dmdirc/addons/parser_twitter/Twitter.java
  10. 2
    3
      src/com/dmdirc/addons/parser_twitter/TwitterChannelInfo.java
  11. 2
    1
      src/com/dmdirc/addons/parserdebug/DebugPlugin.java
  12. 3
    10
      src/com/dmdirc/addons/relaybot/RelayBotPlugin.java
  13. 4
    6
      src/com/dmdirc/addons/relaybot/RelayChannelHandler.java
  14. 0
    4
      src/com/dmdirc/addons/relaybot/RelayChannelPanel.java
  15. 0
    3
      src/com/dmdirc/addons/ui_dummy/DummyInputWindow.java
  16. 0
    5
      src/com/dmdirc/addons/ui_dummy/DummyServerWindow.java
  17. 2
    2
      src/com/dmdirc/addons/ui_swing/MainFrame.java
  18. 3
    4
      src/com/dmdirc/addons/ui_swing/UIUtilities.java
  19. 0
    109
      src/com/dmdirc/addons/ui_swing/components/ContainerToggleButton.java
  20. 1
    1
      src/com/dmdirc/addons/ui_swing/components/FontPicker.java
  21. 0
    3
      src/com/dmdirc/addons/ui_swing/components/PackingTable.java
  22. 0
    7
      src/com/dmdirc/addons/ui_swing/components/SplitPane.java
  23. 1
    4
      src/com/dmdirc/addons/ui_swing/components/URLProtocolPanel.java
  24. 1
    6
      src/com/dmdirc/addons/ui_swing/components/colours/ColourPickerDialog.java
  25. 26
    1
      src/com/dmdirc/addons/ui_swing/components/frames/AppleJFrame.java
  26. 2
    2
      src/com/dmdirc/addons/ui_swing/components/inputfields/SwingInputHandler.java
  27. 0
    7
      src/com/dmdirc/addons/ui_swing/components/statusbar/SwingStatusBar.java
  28. 0
    1
      src/com/dmdirc/addons/ui_swing/components/themepanel/ThemePanel.java
  29. 2
    2
      src/com/dmdirc/addons/ui_swing/dialogs/NewServerDialog.java
  30. 29
    26
      src/com/dmdirc/addons/ui_swing/dialogs/actioneditor/ActionConditionDisplayPanel.java
  31. 1
    1
      src/com/dmdirc/addons/ui_swing/dialogs/actionsmanager/ActionGroupInformationPanel.java
  32. 0
    3
      src/com/dmdirc/addons/ui_swing/dialogs/aliases/AliasPanel.java
  33. 1
    1
      src/com/dmdirc/addons/ui_swing/dialogs/prefs/PrefsCategoryLoader.java
  34. 0
    8
      src/com/dmdirc/addons/ui_web/WebInterfacePlugin.java
  35. 4
    0
      src/com/dmdirc/addons/ui_web/uicomponents/WebInputHandler.java

+ 6
- 8
src/com/dmdirc/addons/dcc/PlaceholderContainer.java View File

58
     public void close() {
58
     public void close() {
59
         int dccs = 0;
59
         int dccs = 0;
60
         for (FrameContainer<?> window : getChildren()) {
60
         for (FrameContainer<?> window : getChildren()) {
61
-            if (window instanceof TransferContainer) {
62
-                if (((TransferContainer) window).getDCC().isActive()) {
63
-                    dccs++;
64
-                }
65
-            } else if (window instanceof ChatContainer) {
66
-                if (((ChatContainer) window).getDCC().isActive()) {
67
-                    dccs++;
68
-                }
61
+            if ((window instanceof TransferContainer
62
+                    && ((TransferContainer) window).getDCC().isActive())
63
+                    || (window instanceof ChatContainer
64
+                    && ((ChatContainer) window).getDCC().isActive())) {
65
+                dccs++;
69
             }
66
             }
70
         }
67
         }
71
 
68
 
93
                 /** {@inheritDoc} */
90
                 /** {@inheritDoc} */
94
                 @Override
91
                 @Override
95
                 public void cancelled() {
92
                 public void cancelled() {
93
+                    // Don't close!
96
                 }
94
                 }
97
             }.display();
95
             }.display();
98
         } else {
96
         } else {

+ 2
- 4
src/com/dmdirc/addons/identd/IdentdServer.java View File

130
                 Logger.userError(ErrorLevel.MEDIUM, "Unable to start identd server: " + e.getMessage());
130
                 Logger.userError(ErrorLevel.MEDIUM, "Unable to start identd server: " + e.getMessage());
131
                 if (e.getMessage().equals("Permission denied")) {
131
                 if (e.getMessage().equals("Permission denied")) {
132
                     final PluginInfo plugin = PluginManager.getPluginManager().getPluginInfoByName("identd");
132
                     final PluginInfo plugin = PluginManager.getPluginManager().getPluginInfoByName("identd");
133
-                    if (plugin != null) {
134
-                        if (PluginManager.getPluginManager().delPlugin(plugin.getRelativeFilename())) {
135
-                            PluginManager.getPluginManager().updateAutoLoad(plugin);
136
-                        }
133
+                    if (plugin != null && PluginManager.getPluginManager().delPlugin(plugin.getRelativeFilename())) {
134
+                        PluginManager.getPluginManager().updateAutoLoad(plugin);
137
                     }
135
                     }
138
                 }
136
                 }
139
             }
137
             }

+ 1
- 1
src/com/dmdirc/addons/logging/LoggingPlugin.java View File

332
         final String filename = getLogFile(channel);
332
         final String filename = getLogFile(channel);
333
 
333
 
334
         final ChannelClientInfo channelClient = (arguments.length > 1 && arguments[1] instanceof ChannelClientInfo) ? (ChannelClientInfo) arguments[1] : null;
334
         final ChannelClientInfo channelClient = (arguments.length > 1 && arguments[1] instanceof ChannelClientInfo) ? (ChannelClientInfo) arguments[1] : null;
335
-        final ClientInfo client = (channelClient != null) ? channelClient.getClient() : null;
335
+        final ClientInfo client = channelClient == null ? null : channelClient.getClient();
336
 
336
 
337
         final String message = (arguments.length > 2 && arguments[2] instanceof String) ? (String) arguments[2] : null;
337
         final String message = (arguments.length > 2 && arguments[2] instanceof String) ? (String) arguments[2] : null;
338
 
338
 

+ 4
- 4
src/com/dmdirc/addons/mediasource_dcop/AmarokSource.java View File

43
     @Override
43
     @Override
44
     public MediaSourceState getState() {
44
     public MediaSourceState getState() {
45
         final List<String> res = DcopMediaSourcePlugin.getDcopResult("dcop amarok player status");
45
         final List<String> res = DcopMediaSourcePlugin.getDcopResult("dcop amarok player status");
46
-        if (res.size() > 0) {
46
+        if (res.isEmpty()) {
47
+            return MediaSourceState.CLOSED;
48
+        } else {
47
             final String result = res.get(0).trim();
49
             final String result = res.get(0).trim();
48
             try {
50
             try {
49
-                final int status = (Integer.parseInt(result));
51
+                final int status = Integer.parseInt(result);
50
                 switch (status) {
52
                 switch (status) {
51
                     case 0:
53
                     case 0:
52
                         return MediaSourceState.STOPPED;
54
                         return MediaSourceState.STOPPED;
60
             } catch (NumberFormatException nfe) {
62
             } catch (NumberFormatException nfe) {
61
                 return MediaSourceState.CLOSED;
63
                 return MediaSourceState.CLOSED;
62
             }
64
             }
63
-        } else {
64
-            return MediaSourceState.CLOSED;
65
         }
65
         }
66
     }
66
     }
67
     
67
     

+ 4
- 4
src/com/dmdirc/addons/mediasource_dcop/NoatunSource.java View File

43
     @Override
43
     @Override
44
     public MediaSourceState getState() {
44
     public MediaSourceState getState() {
45
         final List<String> res = DcopMediaSourcePlugin.getDcopResult("dcop noatun Noatun state");
45
         final List<String> res = DcopMediaSourcePlugin.getDcopResult("dcop noatun Noatun state");
46
-        if (res.size() > 0) {
46
+        if (res.isEmpty()) {
47
+            return MediaSourceState.CLOSED;
48
+        } else {
47
             final String result = res.get(0).trim();
49
             final String result = res.get(0).trim();
48
             try {
50
             try {
49
-                final int status = (Integer.parseInt(result));
51
+                final int status = Integer.parseInt(result);
50
                 switch (status) {
52
                 switch (status) {
51
                     case 0:
53
                     case 0:
52
                         return MediaSourceState.STOPPED;
54
                         return MediaSourceState.STOPPED;
60
             } catch (NumberFormatException nfe) {
62
             } catch (NumberFormatException nfe) {
61
                 return MediaSourceState.CLOSED;
63
                 return MediaSourceState.CLOSED;
62
             }
64
             }
63
-        } else {
64
-            return MediaSourceState.CLOSED;
65
         }
65
         }
66
     }
66
     }
67
     
67
     

+ 0
- 1
src/com/dmdirc/addons/notifications/NotificationCommand.java View File

32
 import com.dmdirc.plugins.ExportedService;
32
 import com.dmdirc.plugins.ExportedService;
33
 import com.dmdirc.plugins.PluginInfo;
33
 import com.dmdirc.plugins.PluginInfo;
34
 import com.dmdirc.ui.input.AdditionalTabTargets;
34
 import com.dmdirc.ui.input.AdditionalTabTargets;
35
-import com.dmdirc.ui.input.TabCompleter;
36
 
35
 
37
 import java.util.List;
36
 import java.util.List;
38
 
37
 

+ 7
- 7
src/com/dmdirc/addons/nowplaying/NowPlayingCommand.java View File

77
                 if (source == null) {
77
                 if (source == null) {
78
                     sendLine(origin, args.isSilent(), FORMAT_ERROR, "Source not found.");
78
                     sendLine(origin, args.isSilent(), FORMAT_ERROR, "Source not found.");
79
                 } else {
79
                 } else {
80
-                    if (source.getState() != MediaSourceState.CLOSED) {
80
+                    if (source.getState() == MediaSourceState.CLOSED) {
81
+                        sendLine(origin, args.isSilent(), FORMAT_ERROR, "Source is not running.");
82
+                    } else {
81
                         target.getCommandParser().parseCommand(origin, context.getSource(),
83
                         target.getCommandParser().parseCommand(origin, context.getSource(),
82
                                 getInformation(source, args.getArgumentsAsString(2)));
84
                                 getInformation(source, args.getArgumentsAsString(2)));
83
-                    } else {
84
-                        sendLine(origin, args.isSilent(), FORMAT_ERROR, "Source is not running.");
85
                     }
85
                     }
86
                 }
86
                 }
87
             } else {
87
             } else {
120
             for (MediaSource source : sources) {
120
             for (MediaSource source : sources) {
121
                 data[i][0] = source.getAppName();
121
                 data[i][0] = source.getAppName();
122
 
122
 
123
-                if (source.getState() != MediaSourceState.CLOSED) {
124
-                    data[i][1] = source.getState().getNiceName().toLowerCase();
125
-                    data[i][2] = getInformation(source, format);
126
-                } else {
123
+                if (source.getState() == MediaSourceState.CLOSED) {
127
                     data[i][1] = "not running";
124
                     data[i][1] = "not running";
128
                     data[i][2] = "-";
125
                     data[i][2] = "-";
126
+                } else {
127
+                    data[i][1] = source.getState().getNiceName().toLowerCase();
128
+                    data[i][2] = getInformation(source, format);
129
                 }
129
                 }
130
 
130
 
131
                 i++;
131
                 i++;

+ 0
- 4
src/com/dmdirc/addons/osd/OsdCommand.java View File

39
 public final class OsdCommand extends Command implements 
39
 public final class OsdCommand extends Command implements 
40
         IntelligentCommand, CommandInfo {
40
         IntelligentCommand, CommandInfo {
41
 
41
 
42
-    /** The plugin that owns this command. */
43
-    private final OsdPlugin plugin;
44
-
45
     /** The OSDManager that this command should use. */
42
     /** The OSDManager that this command should use. */
46
     private final OsdManager osdManager;
43
     private final OsdManager osdManager;
47
     
44
     
54
         super();
51
         super();
55
 
52
 
56
         this.osdManager = osdManager;
53
         this.osdManager = osdManager;
57
-        this.plugin = plugin;
58
     }
54
     }
59
 
55
 
60
     /**
56
     /**

+ 1
- 1
src/com/dmdirc/addons/parser_twitter/Twitter.java View File

1215
                 long lastId = lastSearchIds.containsKey(channel) ? lastSearchIds.get(channel) : -1;
1215
                 long lastId = lastSearchIds.containsKey(channel) ? lastSearchIds.get(channel) : -1;
1216
                 final List<TwitterStatus> statuses = api.getSearchResults(channel.getName(), lastId);
1216
                 final List<TwitterStatus> statuses = api.getSearchResults(channel.getName(), lastId);
1217
 
1217
 
1218
-                foundItems = statuses.size() > 0;
1218
+                foundItems = !statuses.isEmpty();
1219
                 for (final TwitterStatus status : statuses) {
1219
                 for (final TwitterStatus status : statuses) {
1220
                     final ChannelClientInfo cci = channel.getChannelClient(status.getUserName(), true);
1220
                     final ChannelClientInfo cci = channel.getChannelClient(status.getUserName(), true);
1221
                     sendChannelMessage(channel, new Date(status.getTime()), status.getText(), cci, status.getUserName());
1221
                     sendChannelMessage(channel, new Date(status.getTime()), status.getText(), cci, status.getUserName());

+ 2
- 3
src/com/dmdirc/addons/parser_twitter/TwitterChannelInfo.java View File

144
     /** {@inheritDoc} */
144
     /** {@inheritDoc} */
145
     @Override
145
     @Override
146
     public void sendWho() {
146
     public void sendWho() {
147
-        return;
147
+        // Ignore, twitter parser doesn't support WHOs
148
     }
148
     }
149
 
149
 
150
     /** {@inheritDoc} */
150
     /** {@inheritDoc} */
158
                 myParser.getApi().unblockUser(bits[0]);
158
                 myParser.getApi().unblockUser(bits[0]);
159
             }
159
             }
160
         }
160
         }
161
-        return;
162
     }
161
     }
163
 
162
 
164
     /** {@inheritDoc} */
163
     /** {@inheritDoc} */
165
     @Override
164
     @Override
166
     public void flushModes() {
165
     public void flushModes() {
167
-        return;
166
+        // Ignore, all mode changes are instantaneous
168
     }
167
     }
169
 
168
 
170
     /** {@inheritDoc} */
169
     /** {@inheritDoc} */

+ 2
- 1
src/com/dmdirc/addons/parserdebug/DebugPlugin.java View File

35
 import java.util.ArrayList;
35
 import java.util.ArrayList;
36
 import java.util.Date;
36
 import java.util.Date;
37
 import java.util.HashMap;
37
 import java.util.HashMap;
38
+import java.util.Map;
38
 
39
 
39
 /**
40
 /**
40
  * This causes parser debugging to be spammed to the console.
41
  * This causes parser debugging to be spammed to the console.
47
     private ParserDebugCommand command = null;
48
     private ParserDebugCommand command = null;
48
 
49
 
49
     /** Map of parsers registered. */
50
     /** Map of parsers registered. */
50
-    protected final HashMap<Parser, DebugWindow> registeredParsers
51
+    protected final Map<Parser, DebugWindow> registeredParsers
51
             = new HashMap<Parser, DebugWindow>();
52
             = new HashMap<Parser, DebugWindow>();
52
 
53
 
53
     /**
54
     /**

+ 3
- 10
src/com/dmdirc/addons/relaybot/RelayBotPlugin.java View File

45
 import com.dmdirc.util.ReturnableThread;
45
 import com.dmdirc.util.ReturnableThread;
46
 
46
 
47
 import java.util.ArrayList;
47
 import java.util.ArrayList;
48
-import java.util.Arrays;
49
 import java.util.Date;
48
 import java.util.Date;
50
 import java.util.HashMap;
49
 import java.util.HashMap;
51
 import java.util.Map;
50
 import java.util.Map;
84
                 new RelayCallbackManager(this, (IRCParser) parser);
83
                 new RelayCallbackManager(this, (IRCParser) parser);
85
             }
84
             }
86
             for (String channel : server.getChannels()) {
85
             for (String channel : server.getChannels()) {
87
-                final Channel chan = server.getChannel(channel);
88
-                final String channelName = chan.getServer().getParser().getStringConverter().toLowerCase(chan.getName());
89
-                getHandler(chan);
86
+                getHandler(server.getChannel(channel));
90
             }
87
             }
91
         }
88
         }
92
     }
89
     }
123
     @Override
120
     @Override
124
     public void processEvent(final ActionType type, final StringBuffer format, final Object... arguments) {
121
     public void processEvent(final ActionType type, final StringBuffer format, final Object... arguments) {
125
         if (type == CoreActionType.CHANNEL_OPENED) {
122
         if (type == CoreActionType.CHANNEL_OPENED) {
126
-            final Channel chan = (Channel) arguments[0];
127
-            
128
-            final String channelName = chan.getServer().getParser().getStringConverter().toLowerCase(chan.getName());
129
-            getHandler(chan);
123
+            getHandler((Channel) arguments[0]);
130
         } else if (type == CoreActionType.CHANNEL_CLOSED) {
124
         } else if (type == CoreActionType.CHANNEL_CLOSED) {
131
-            final Channel chan = (Channel) arguments[0];
132
-            removeHandler(chan);
125
+            removeHandler((Channel) arguments[0]);
133
         } else if (type == CoreActionType.CHANNEL_QUIT) {
126
         } else if (type == CoreActionType.CHANNEL_QUIT) {
134
             final Channel chan = (Channel) arguments[0];
127
             final Channel chan = (Channel) arguments[0];
135
             final Parser parser = chan.getServer().getParser();
128
             final Parser parser = chan.getServer().getParser();

+ 4
- 6
src/com/dmdirc/addons/relaybot/RelayChannelHandler.java View File

294
                         coreChannelHandler.onChannelKick(parser, date, channel, newChannelClient, kickingChannelClient, reason, "");
294
                         coreChannelHandler.onChannelKick(parser, date, channel, newChannelClient, kickingChannelClient, reason, "");
295
                         removeChannelClient(channel, newBits[0]);
295
                         removeChannelClient(channel, newBits[0]);
296
                         return;
296
                         return;
297
-                    } else if (newBits[2].equalsIgnoreCase("now")) {
297
+                    } else if (newBits[2].equalsIgnoreCase("now") && newBits.length > 3) {
298
                         // User changed their nickname in a relayed channel.
298
                         // User changed their nickname in a relayed channel.
299
-                        if (newBits.length > 3) {
300
-                            renameChannelClient(newChannelClient, newBits[3]);
299
+                        renameChannelClient(newChannelClient, newBits[3]);
301
 
300
 
302
-                            coreChannelHandler.onChannelNickChanged(parser, date, channel, newChannelClient, newBits[0]);
303
-                            return;
304
-                        }
301
+                        coreChannelHandler.onChannelNickChanged(parser, date, channel, newChannelClient, newBits[0]);
302
+                        return;
305
                     }
303
                     }
306
                 }
304
                 }
307
             } else if (initial.charAt(0) == '*') {
305
             } else if (initial.charAt(0) == '*') {

+ 0
- 4
src/com/dmdirc/addons/relaybot/RelayChannelPanel.java View File

22
 
22
 
23
 package com.dmdirc.addons.relaybot;
23
 package com.dmdirc.addons.relaybot;
24
 
24
 
25
-import com.dmdirc.addons.ui_swing.SwingController;
26
-import com.dmdirc.addons.ui_swing.dialogs.StandardInputDialog;
27
 import com.dmdirc.config.IdentityManager;
25
 import com.dmdirc.config.IdentityManager;
28
 import com.dmdirc.config.prefs.PreferencesInterface;
26
 import com.dmdirc.config.prefs.PreferencesInterface;
29
 import com.dmdirc.plugins.Plugin;
27
 import com.dmdirc.plugins.Plugin;
30
-import com.dmdirc.plugins.PluginManager;
31
-import java.awt.Dialog.ModalityType;
32
 
28
 
33
 import java.awt.event.ActionEvent;
29
 import java.awt.event.ActionEvent;
34
 import java.awt.event.ActionListener;
30
 import java.awt.event.ActionListener;

+ 0
- 3
src/com/dmdirc/addons/ui_dummy/DummyInputWindow.java View File

46
     private boolean maximised;
46
     private boolean maximised;
47
     /** Our container. */
47
     /** Our container. */
48
     private final WritableFrameContainer<? extends InputWindow> container;
48
     private final WritableFrameContainer<? extends InputWindow> container;
49
-    /** Our command parser. */
50
-    private final CommandParser commandParser;
51
 
49
 
52
     /**
50
     /**
53
      * Instantiates a new DummyInputWindow.
51
      * Instantiates a new DummyInputWindow.
58
     public DummyInputWindow(final WritableFrameContainer<? extends InputWindow> owner,
56
     public DummyInputWindow(final WritableFrameContainer<? extends InputWindow> owner,
59
             final CommandParser commandParser) {
57
             final CommandParser commandParser) {
60
         this.container = owner;
58
         this.container = owner;
61
-        this.commandParser = commandParser;
62
     }
59
     }
63
 
60
 
64
     /** {@inheritDoc} */
61
     /** {@inheritDoc} */

+ 0
- 5
src/com/dmdirc/addons/ui_dummy/DummyServerWindow.java View File

31
  */
31
  */
32
 public final class DummyServerWindow extends DummyInputWindow implements ServerWindow {
32
 public final class DummyServerWindow extends DummyInputWindow implements ServerWindow {
33
     
33
     
34
-    /** Parent server. */
35
-    private final Server parent;
36
-    
37
     /** 
34
     /** 
38
      * Instantiates this DummyServerWindow. 
35
      * Instantiates this DummyServerWindow. 
39
      *
36
      *
41
      */
38
      */
42
     public DummyServerWindow(final Server parent) {
39
     public DummyServerWindow(final Server parent) {
43
         super(parent, new ServerCommandParser());
40
         super(parent, new ServerCommandParser());
44
-        
45
-        this.parent = parent;
46
     }
41
     }
47
     
42
     
48
 }
43
 }

+ 2
- 2
src/com/dmdirc/addons/ui_swing/MainFrame.java View File

524
                 /** {@inheritDoc} */
524
                 /** {@inheritDoc} */
525
                 @Override
525
                 @Override
526
                 public void cancelled() {
526
                 public void cancelled() {
527
-                    return;
527
+                    // Do nothing
528
                 }
528
                 }
529
             }.display();
529
             }.display();
530
             return;
530
             return;
544
 
544
 
545
             /** {@inheritDoc} */
545
             /** {@inheritDoc} */
546
             @Override
546
             @Override
547
-            protected Object doInBackground() throws Exception {
547
+            protected Object doInBackground() {
548
                 ActionManager.processEvent(CoreActionType.CLIENT_CLOSING, null);
548
                 ActionManager.processEvent(CoreActionType.CLIENT_CLOSING, null);
549
                 ServerManager.getServerManager().closeAll(IdentityManager.
549
                 ServerManager.getServerManager().closeAll(IdentityManager.
550
                         getGlobalConfig().getOption("general", "closemessage"));
550
                         getGlobalConfig().getOption("general", "closemessage"));

+ 3
- 4
src/com/dmdirc/addons/ui_swing/UIUtilities.java View File

22
 
22
 
23
 package com.dmdirc.addons.ui_swing;
23
 package com.dmdirc.addons.ui_swing;
24
 
24
 
25
-import com.dmdirc.addons.ui_swing.TreeUI;
26
 import com.dmdirc.addons.ui_swing.actions.RedoAction;
25
 import com.dmdirc.addons.ui_swing.actions.RedoAction;
27
 import com.dmdirc.addons.ui_swing.actions.UndoAction;
26
 import com.dmdirc.addons.ui_swing.actions.UndoAction;
28
 import com.dmdirc.addons.ui_swing.components.DMDircUndoableEditListener;
27
 import com.dmdirc.addons.ui_swing.components.DMDircUndoableEditListener;
374
             final Rectangle bounds,
373
             final Rectangle bounds,
375
             final Image backgroundImage,
374
             final Image backgroundImage,
376
             final BackgroundOption backgroundOption) {
375
             final BackgroundOption backgroundOption) {
377
-        if (backgroundImage != null) {
376
+        if (backgroundImage == null) {
377
+            paintNoBackground(g, bounds);
378
+        } else {
378
             switch (backgroundOption) {
379
             switch (backgroundOption) {
379
                 case TILED:
380
                 case TILED:
380
                     paintTiledBackground(g, bounds, backgroundImage);
381
                     paintTiledBackground(g, bounds, backgroundImage);
391
                 default:
392
                 default:
392
                     break;
393
                     break;
393
             }
394
             }
394
-        } else {
395
-            paintNoBackground(g, bounds);
396
         }
395
         }
397
     }
396
     }
398
 
397
 

+ 0
- 109
src/com/dmdirc/addons/ui_swing/components/ContainerToggleButton.java View File

1
-/*
2
- * Copyright (c) 2006-2010 Chris Smith, Shane Mc Cormack, Gregory Holmes
3
- * 
4
- * Permission is hereby granted, free of charge, to any person obtaining a copy
5
- * of this software and associated documentation files (the "Software"), to deal
6
- * in the Software without restriction, including without limitation the rights
7
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- * copies of the Software, and to permit persons to whom the Software is
9
- * furnished to do so, subject to the following conditions:
10
- * 
11
- * The above copyright notice and this permission notice shall be included in
12
- * all copies or substantial portions of the Software.
13
- * 
14
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
- * SOFTWARE.
21
- */
22
-
23
-package com.dmdirc.addons.ui_swing.components;
24
-
25
-import javax.swing.Icon;
26
-import javax.swing.JToggleButton;
27
-
28
-/**
29
- * JButton that holds an object.
30
- * 
31
- * @param <T> Holds an object of this type
32
- */
33
-public class ContainerToggleButton<T> extends JToggleButton {
34
-
35
-    /**
36
-     * A version number for this class. It should be changed whenever the class
37
-     * structure is changed (or anything else that would prevent serialized
38
-     * objects being unserialized with the new class).
39
-     */
40
-    private static final long serialVersionUID = 1;
41
-    /** Contents. */
42
-    private T contents;
43
-
44
-    /**
45
-     * Instantiates a new container button.
46
-     * 
47
-     * @param contents Contents
48
-     * @param string Title
49
-     * @param icon Icon
50
-     */
51
-    public ContainerToggleButton(final T contents, final String string,
52
-            final Icon icon) {
53
-        super(string, icon);
54
-    }
55
-
56
-    /**
57
-     * Instantiates a new container button.
58
-     * 
59
-     * @param contents Contents
60
-     * @param string Title
61
-     */
62
-    public ContainerToggleButton(final T contents, final String string) {
63
-        super(string);
64
-    }
65
-
66
-    /**
67
-     * Instantiates a new container button.
68
-     * 
69
-     * @param contents Contents
70
-     * @param icon Icon
71
-     */
72
-    public ContainerToggleButton(final T contents, final Icon icon) {
73
-        super(icon);
74
-    }
75
-
76
-    /**
77
-     * Instantiates a new container button.
78
-     * 
79
-     * @param contents Contents
80
-     */
81
-    public ContainerToggleButton(final T contents) {
82
-        super();
83
-    }
84
-
85
-    /**
86
-     * Instantiates a new container button.
87
-     */
88
-    public ContainerToggleButton() {
89
-        super();
90
-    }
91
-
92
-    /**
93
-     * Gets the button's contents
94
-     * 
95
-     * @return Button contents
96
-     */
97
-    public T getContents() {
98
-        return contents;
99
-    }
100
-
101
-    /**
102
-     * Sets the button's contents
103
-     * 
104
-     * @param contents New contents
105
-     */
106
-    public void setValue(final T contents) {
107
-        this.contents = contents;
108
-    }
109
-}

+ 1
- 1
src/com/dmdirc/addons/ui_swing/components/FontPicker.java View File

57
 
57
 
58
             /** {@inheritDoc} */
58
             /** {@inheritDoc} */
59
             @Override
59
             @Override
60
-            protected String[] doInBackground() throws Exception {
60
+            protected String[] doInBackground() {
61
                 return GraphicsEnvironment.getLocalGraphicsEnvironment().
61
                 return GraphicsEnvironment.getLocalGraphicsEnvironment().
62
                         getAvailableFontFamilyNames();
62
                         getAvailableFontFamilyNames();
63
             }
63
             }

+ 0
- 3
src/com/dmdirc/addons/ui_swing/components/PackingTable.java View File

44
      * objects being unserialized with the new class).
44
      * objects being unserialized with the new class).
45
      */
45
      */
46
     private static final long serialVersionUID = 1;
46
     private static final long serialVersionUID = 1;
47
-    /** Whether the table should be editable. */
48
-    private final boolean editable;
49
     /** Scrollpane. */
47
     /** Scrollpane. */
50
     private final JScrollPane scrollPane;
48
     private final JScrollPane scrollPane;
51
     /** Should the last column fit text (true), or fit viewport (false). */
49
     /** Should the last column fit text (true), or fit viewport (false). */
107
             final JScrollPane scrollPane, final boolean lastColumnFit) {
105
             final JScrollPane scrollPane, final boolean lastColumnFit) {
108
         super(tableModel);
106
         super(tableModel);
109
 
107
 
110
-        this.editable = editable;
111
         this.scrollPane = scrollPane;
108
         this.scrollPane = scrollPane;
112
         this.lastColumnFit = lastColumnFit;
109
         this.lastColumnFit = lastColumnFit;
113
 
110
 

+ 0
- 7
src/com/dmdirc/addons/ui_swing/components/SplitPane.java View File

43
      * objects being unserialized with the new class).
43
      * objects being unserialized with the new class).
44
      */
44
      */
45
     private static final long serialVersionUID = 2;
45
     private static final long serialVersionUID = 2;
46
-    /** Snap distance. */
47
-    private final int snapDistance;
48
-    /** Component to snap to? */
49
-    private boolean leftComponentSnap = true;
50
     /** use one touch expandable? */
46
     /** use one touch expandable? */
51
     private boolean useOneTouchExpandable;
47
     private boolean useOneTouchExpandable;
52
     /** Global config manager. */
48
     /** Global config manager. */
223
         super((orientation.equals(Orientation.HORIZONTAL)) ? HORIZONTAL_SPLIT : VERTICAL_SPLIT,
219
         super((orientation.equals(Orientation.HORIZONTAL)) ? HORIZONTAL_SPLIT : VERTICAL_SPLIT,
224
                 true, leftComponent, rightComponent);
220
                 true, leftComponent, rightComponent);
225
 
221
 
226
-        this.leftComponentSnap = leftComponentSnap;
227
-        this.snapDistance = snapDistance;
228
-
229
         config = IdentityManager.getGlobalConfig();
222
         config = IdentityManager.getGlobalConfig();
230
         useOneTouchExpandable = config.getOptionBool("ui", "useOneTouchExpandable");
223
         useOneTouchExpandable = config.getOptionBool("ui", "useOneTouchExpandable");
231
 
224
 

+ 1
- 4
src/com/dmdirc/addons/ui_swing/components/URLProtocolPanel.java View File

81
     private final boolean useInsets;
81
     private final boolean useInsets;
82
     /** Substitutions panel. */
82
     /** Substitutions panel. */
83
     private URLSubsitutionsPanel subsPanel;
83
     private URLSubsitutionsPanel subsPanel;
84
-    /** The URL Handler to use to open links. */
85
-    private final URLHandler urlHandler;
86
 
84
 
87
     /**
85
     /**
88
      * Instantiates the URLDialog.
86
      * Instantiates the URLDialog.
96
 
94
 
97
         this.uri = url;
95
         this.uri = url;
98
         this.useInsets = useInsets;
96
         this.useInsets = useInsets;
99
-        this.urlHandler = urlHandler;
100
 
97
 
101
         initComponents();
98
         initComponents();
102
         layoutComponents();
99
         layoutComponents();
291
     /** {@inheritDoc} */
288
     /** {@inheritDoc} */
292
     @Override
289
     @Override
293
     public void changedUpdate(final DocumentEvent e) {
290
     public void changedUpdate(final DocumentEvent e) {
294
-    //Ignore
291
+        //Ignore
295
     }
292
     }
296
 }
293
 }

+ 1
- 6
src/com/dmdirc/addons/ui_swing/components/colours/ColourPickerDialog.java View File

44
     private static final long serialVersionUID = 1;
44
     private static final long serialVersionUID = 1;
45
     /** Colour chooser panel. */
45
     /** Colour chooser panel. */
46
     private ColourPickerPanel colourChooser;
46
     private ColourPickerPanel colourChooser;
47
-    /** Parent window. */
48
-    private Window window;
49
 
47
 
50
     /**
48
     /**
51
      * Creates a new instance of ColourPickerDialog.
49
      * Creates a new instance of ColourPickerDialog.
105
      * @return Colour picker dialog
103
      * @return Colour picker dialog
106
      */
104
      */
107
     public static ColourPickerDialog showColourPicker() {
105
     public static ColourPickerDialog showColourPicker() {
108
-        final ColourPickerDialog cpd = showColourPicker(true, true);
109
-        return cpd;
106
+        return showColourPicker(true, true);
110
     }
107
     }
111
 
108
 
112
     /** 
109
     /** 
137
      * @param window Parent window
134
      * @param window Parent window
138
      */
135
      */
139
     public void setWindow(final Window window) {
136
     public void setWindow(final Window window) {
140
-        this.window = window;
141
-
142
         if (window != null) {
137
         if (window != null) {
143
             window.addWindowListener(new WindowAdapter() {
138
             window.addWindowListener(new WindowAdapter() {
144
 
139
 

+ 26
- 1
src/com/dmdirc/addons/ui_swing/components/frames/AppleJFrame.java View File

1
+/*
2
+ * Copyright (c) 2006-2010 Chris Smith, Shane Mc Cormack, Gregory Holmes
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
1
 package com.dmdirc.addons.ui_swing.components.frames;
23
 package com.dmdirc.addons.ui_swing.components.frames;
2
 
24
 
3
-import com.dmdirc.addons.ui_swing.*;
25
+import com.dmdirc.addons.ui_swing.Apple;
26
+import com.dmdirc.addons.ui_swing.MainFrame;
27
+import com.dmdirc.addons.ui_swing.SwingController;
4
 import com.dmdirc.addons.ui_swing.components.MenuBar;
28
 import com.dmdirc.addons.ui_swing.components.MenuBar;
29
+
5
 import javax.swing.JFrame;
30
 import javax.swing.JFrame;
6
 
31
 
7
 /**
32
 /**

+ 2
- 2
src/com/dmdirc/addons/ui_swing/components/inputfields/SwingInputHandler.java View File

157
 
157
 
158
                     /** {@inheritDoc} */
158
                     /** {@inheritDoc} */
159
                     @Override
159
                     @Override
160
-                    protected Object doInBackground() throws Exception {
160
+                    protected Object doInBackground() {
161
                         localTarget.setEditable(false);
161
                         localTarget.setEditable(false);
162
                         doTabCompletion(false);
162
                         doTabCompletion(false);
163
                         return null;
163
                         return null;
187
 
187
 
188
                     /** {@inheritDoc} */
188
                     /** {@inheritDoc} */
189
                     @Override
189
                     @Override
190
-                    protected Object doInBackground() throws Exception {
190
+                    protected Object doInBackground() {
191
                         localTarget.setEditable(false);
191
                         localTarget.setEditable(false);
192
                         doTabCompletion(true);
192
                         doTabCompletion(true);
193
                         return null;
193
                         return null;

+ 0
- 7
src/com/dmdirc/addons/ui_swing/components/statusbar/SwingStatusBar.java View File

55
     private final UpdaterLabel updateLabel;
55
     private final UpdaterLabel updateLabel;
56
     /** Invite label. */
56
     /** Invite label. */
57
     private final InviteLabel inviteLabel;
57
     private final InviteLabel inviteLabel;
58
-    /** Swing controller. */
59
-    private SwingController controller;
60
-    /** Main frame. */
61
-    private MainFrame mainFrame;
62
 
58
 
63
     /**
59
     /**
64
      * Creates a new instance of SwingStatusBar.
60
      * Creates a new instance of SwingStatusBar.
68
      */
64
      */
69
     public SwingStatusBar(final SwingController controller, final MainFrame mainFrame) {
65
     public SwingStatusBar(final SwingController controller, final MainFrame mainFrame) {
70
         super();
66
         super();
71
-        
72
-        this.controller = controller;
73
-        this.mainFrame = mainFrame;
74
 
67
 
75
         messageLabel = new MessageLabel();
68
         messageLabel = new MessageLabel();
76
         errorPanel = new ErrorPanel(controller, mainFrame, this);
69
         errorPanel = new ErrorPanel(controller, mainFrame, this);

+ 0
- 1
src/com/dmdirc/addons/ui_swing/components/themepanel/ThemePanel.java View File

22
 
22
 
23
 package com.dmdirc.addons.ui_swing.components.themepanel;
23
 package com.dmdirc.addons.ui_swing.components.themepanel;
24
 
24
 
25
-import com.dmdirc.addons.ui_swing.SwingController;
26
 import com.dmdirc.addons.ui_swing.UIUtilities;
25
 import com.dmdirc.addons.ui_swing.UIUtilities;
27
 import com.dmdirc.addons.ui_swing.components.LoggingSwingWorker;
26
 import com.dmdirc.addons.ui_swing.components.LoggingSwingWorker;
28
 import com.dmdirc.addons.ui_swing.components.renderers.AddonCellRenderer;
27
 import com.dmdirc.addons.ui_swing.components.renderers.AddonCellRenderer;

+ 2
- 2
src/com/dmdirc/addons/ui_swing/dialogs/NewServerDialog.java View File

293
 
293
 
294
                 new LoggingSwingWorker() {
294
                 new LoggingSwingWorker() {
295
                     @Override
295
                     @Override
296
-                    protected Object doInBackground() throws Exception {
296
+                    protected Object doInBackground() {
297
                         final Server server = new Server(address, profile);
297
                         final Server server = new Server(address, profile);
298
                         server.connect();
298
                         server.connect();
299
                         return null;
299
                         return null;
306
 
306
 
307
                     /** {@inheritDoc} */
307
                     /** {@inheritDoc} */
308
                     @Override
308
                     @Override
309
-                    protected Object doInBackground() throws Exception {
309
+                    protected Object doInBackground() {
310
                         if (server == null) {
310
                         if (server == null) {
311
                             final Server newServer = new Server(address, profile);
311
                             final Server newServer = new Server(address, profile);
312
                             newServer.connect();
312
                             newServer.connect();

+ 29
- 26
src/com/dmdirc/addons/ui_swing/dialogs/actioneditor/ActionConditionDisplayPanel.java View File

1
 /*
1
 /*
2
  * Copyright (c) 2006-2010 Chris Smith, Shane Mc Cormack, Gregory Holmes
2
  * Copyright (c) 2006-2010 Chris Smith, Shane Mc Cormack, Gregory Holmes
3
- * 
3
+ *
4
  * Permission is hereby granted, free of charge, to any person obtaining a copy
4
  * Permission is hereby granted, free of charge, to any person obtaining a copy
5
  * of this software and associated documentation files (the "Software"), to deal
5
  * of this software and associated documentation files (the "Software"), to deal
6
  * in the Software without restriction, including without limitation the rights
6
  * in the Software without restriction, including without limitation the rights
7
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
  * copies of the Software, and to permit persons to whom the Software is
8
  * copies of the Software, and to permit persons to whom the Software is
9
  * furnished to do so, subject to the following conditions:
9
  * furnished to do so, subject to the following conditions:
10
- * 
10
+ *
11
  * The above copyright notice and this permission notice shall be included in
11
  * The above copyright notice and this permission notice shall be included in
12
  * all copies or substantial portions of the Software.
12
  * all copies or substantial portions of the Software.
13
- * 
13
+ *
14
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
67
     /** Action trigger. */
67
     /** Action trigger. */
68
     private ActionType trigger;
68
     private ActionType trigger;
69
 
69
 
70
-    /** 
70
+    /**
71
      * Instantiates the panel.
71
      * Instantiates the panel.
72
-     * 
72
+     *
73
      * @param condition Action condition
73
      * @param condition Action condition
74
      * @param trigger Action trigger
74
      * @param trigger Action trigger
75
      */
75
      */
98
 
98
 
99
     /**
99
     /**
100
      * Sets the action trigger.
100
      * Sets the action trigger.
101
-     * 
101
+     *
102
      * @param trigger new trigger
102
      * @param trigger new trigger
103
      */
103
      */
104
     void setTrigger(final ActionType trigger) {
104
     void setTrigger(final ActionType trigger) {
157
         add(editPanel, "alignx right");
157
         add(editPanel, "alignx right");
158
     }
158
     }
159
 
159
 
160
-    /** 
160
+    /**
161
      * {@inheritDoc}
161
      * {@inheritDoc}
162
-     * 
162
+     *
163
      * @param e Action event
163
      * @param e Action event
164
      */
164
      */
165
     @Override
165
     @Override
214
 
214
 
215
     /**
215
     /**
216
      * Updates the condition sentence.
216
      * Updates the condition sentence.
217
-     * 
217
+     *
218
      * @return Updated sentence
218
      * @return Updated sentence
219
      */
219
      */
220
     private String updateSentence() {
220
     private String updateSentence() {
221
         if (trigger == null) {
221
         if (trigger == null) {
222
             return "...";
222
             return "...";
223
         } else {
223
         } else {
224
-            final StringBuilder sb = new StringBuilder();
225
-            sb.append("The ");
226
-            if (condition.getArg() != -1) {
227
-                sb.append(trigger.getType().getArgNames()[condition.getArg()]);
228
-            } else {
224
+            final StringBuilder sb = new StringBuilder("The ");
225
+
226
+            if (condition.getArg() == -1) {
229
                 sb.append(" ...");
227
                 sb.append(" ...");
230
                 return sb.toString();
228
                 return sb.toString();
231
             }
229
             }
230
+
231
+            sb.append(trigger.getType().getArgNames()[condition.getArg()]);
232
             sb.append("'s ");
232
             sb.append("'s ");
233
-            if (condition.getComponent() != null) {
234
-                sb.append(condition.getComponent().getName());
235
-            } else {
233
+
234
+            if (condition.getComponent() == null) {
236
                 sb.append(" ...");
235
                 sb.append(" ...");
237
                 return sb.toString();
236
                 return sb.toString();
238
             }
237
             }
238
+
239
+            sb.append(condition.getComponent().getName());
239
             sb.append(" ");
240
             sb.append(" ");
240
-            if (condition.getComparison() != null) {
241
-                sb.append(condition.getComparison().getName());
242
-            } else {
241
+
242
+            if (condition.getComparison() == null) {
243
                 sb.append(" ...");
243
                 sb.append(" ...");
244
                 return sb.toString();
244
                 return sb.toString();
245
             }
245
             }
246
+
247
+            sb.append(condition.getComparison().getName());
246
             sb.append(" '");
248
             sb.append(" '");
247
-            if (condition.getTarget() != null) {
248
-                sb.append(condition.getTarget().replace("<", "&lt;"));
249
-            } else {
249
+
250
+            if (condition.getTarget() == null) {
250
                 sb.append(" ...");
251
                 sb.append(" ...");
251
                 return sb.toString();
252
                 return sb.toString();
252
             }
253
             }
254
+
255
+            sb.append(condition.getTarget().replace("<", "&lt;"));
253
             sb.append("'");
256
             sb.append("'");
254
             return sb.toString();
257
             return sb.toString();
255
         }
258
         }
257
 
260
 
258
     /**
261
     /**
259
      * Returns the action condition represented by this panel.
262
      * Returns the action condition represented by this panel.
260
-     * 
263
+     *
261
      * @return Action condition
264
      * @return Action condition
262
      */
265
      */
263
     public ActionCondition getCondition() {
266
     public ActionCondition getCondition() {
274
                     evt.getNewValue());
277
                     evt.getNewValue());
275
         }
278
         }
276
     }
279
     }
277
-    
280
+
278
     /**
281
     /**
279
      * Checks if this editor panel has errored.
282
      * Checks if this editor panel has errored.
280
-     * 
283
+     *
281
      * @return true iif the content it valid
284
      * @return true iif the content it valid
282
      */
285
      */
283
     public boolean checkError() {
286
     public boolean checkError() {

+ 1
- 1
src/com/dmdirc/addons/ui_swing/dialogs/actionsmanager/ActionGroupInformationPanel.java View File

24
 import com.dmdirc.actions.ActionGroup;
24
 import com.dmdirc.actions.ActionGroup;
25
 
25
 
26
 import com.dmdirc.addons.ui_swing.components.text.TextLabel;
26
 import com.dmdirc.addons.ui_swing.components.text.TextLabel;
27
-import javax.swing.Box;
27
+
28
 import javax.swing.JLabel;
28
 import javax.swing.JLabel;
29
 import javax.swing.JPanel;
29
 import javax.swing.JPanel;
30
 
30
 

+ 0
- 3
src/com/dmdirc/addons/ui_swing/dialogs/aliases/AliasPanel.java View File

27
 import com.dmdirc.actions.CoreActionComponent;
27
 import com.dmdirc.actions.CoreActionComponent;
28
 import com.dmdirc.actions.wrappers.Alias;
28
 import com.dmdirc.actions.wrappers.Alias;
29
 import com.dmdirc.addons.ui_swing.UIUtilities;
29
 import com.dmdirc.addons.ui_swing.UIUtilities;
30
-import com.dmdirc.addons.ui_swing.components.inputfields.SwingInputHandler;
31
 import com.dmdirc.addons.ui_swing.components.inputfields.ValidatingTextFieldInputField;
30
 import com.dmdirc.addons.ui_swing.components.inputfields.ValidatingTextFieldInputField;
32
 import com.dmdirc.addons.ui_swing.components.renderers.ActionComparisonCellRenderer;
31
 import com.dmdirc.addons.ui_swing.components.renderers.ActionComparisonCellRenderer;
33
-import com.dmdirc.commandparser.parsers.CommandParser;
34
-import com.dmdirc.commandparser.parsers.GlobalCommandParser;
35
 import com.dmdirc.commandparser.validators.CommandNameValidator;
32
 import com.dmdirc.commandparser.validators.CommandNameValidator;
36
 import com.dmdirc.util.validators.FileNameValidator;
33
 import com.dmdirc.util.validators.FileNameValidator;
37
 import com.dmdirc.util.validators.ValidatorChain;
34
 import com.dmdirc.util.validators.ValidatorChain;

+ 1
- 1
src/com/dmdirc/addons/ui_swing/dialogs/prefs/PrefsCategoryLoader.java View File

95
      * @throws Exception if unable to compute a result
95
      * @throws Exception if unable to compute a result
96
      */
96
      */
97
     @Override
97
     @Override
98
-    protected JPanel doInBackground() throws Exception {
98
+    protected JPanel doInBackground() {
99
         return addCategory(category);
99
         return addCategory(category);
100
     }
100
     }
101
 
101
 

+ 0
- 8
src/com/dmdirc/addons/ui_web/WebInterfacePlugin.java View File

22
 
22
 
23
 package com.dmdirc.addons.ui_web;
23
 package com.dmdirc.addons.ui_web;
24
 
24
 
25
-import com.dmdirc.Main;
26
 import com.dmdirc.plugins.Plugin;
25
 import com.dmdirc.plugins.Plugin;
27
 import com.dmdirc.ui.interfaces.UIController;
26
 import com.dmdirc.ui.interfaces.UIController;
28
 
27
 
38
     /** The UI that we're using. */
37
     /** The UI that we're using. */
39
     private WebInterfaceUI ui;
38
     private WebInterfaceUI ui;
40
 
39
 
41
-    /**
42
-     * Creates a new WebInterfacePlugin, and registers the web UI as the
43
-     * main client UI.
44
-     */
45
-    public WebInterfacePlugin() {
46
-    }
47
-
48
     /** {@inheritDoc} */
40
     /** {@inheritDoc} */
49
     @Override
41
     @Override
50
     public void onLoad() {   
42
     public void onLoad() {   

+ 4
- 0
src/com/dmdirc/addons/ui_web/uicomponents/WebInputHandler.java View File

79
 
79
 
80
     /** {@inheritDoc} */
80
     /** {@inheritDoc} */
81
     @Override
81
     @Override
82
+    @SuppressWarnings("PMD")
82
     public void doTabCompletion(boolean shiftPressed) {
83
     public void doTabCompletion(boolean shiftPressed) {
83
         super.doTabCompletion(shiftPressed);
84
         super.doTabCompletion(shiftPressed);
84
     }
85
     }
85
 
86
 
86
     /** {@inheritDoc} */
87
     /** {@inheritDoc} */
87
     @Override
88
     @Override
89
+    @SuppressWarnings("PMD")
88
     public void doBufferDown() {
90
     public void doBufferDown() {
89
         super.doBufferDown();
91
         super.doBufferDown();
90
     }
92
     }
91
 
93
 
92
     /** {@inheritDoc} */
94
     /** {@inheritDoc} */
93
     @Override
95
     @Override
96
+    @SuppressWarnings("PMD")
94
     public void doBufferUp() {
97
     public void doBufferUp() {
95
         super.doBufferUp();
98
         super.doBufferUp();
96
     }
99
     }
97
 
100
 
98
     /** {@inheritDoc} */
101
     /** {@inheritDoc} */
99
     @Override
102
     @Override
103
+    @SuppressWarnings("PMD")
100
     public void handleKeyPressed(final String line, final int keyCode,
104
     public void handleKeyPressed(final String line, final int keyCode,
101
             final boolean shiftPressed, final boolean ctrlPressed) {
105
             final boolean shiftPressed, final boolean ctrlPressed) {
102
         super.handleKeyPressed(line, keyCode, shiftPressed, ctrlPressed);
106
         super.handleKeyPressed(line, keyCode, shiftPressed, ctrlPressed);

Loading…
Cancel
Save