Browse Source

Tidy up javadoc

Change-Id: I428d39dedd0380a783bb612ab6ff4176302eb157
Reviewed-on: http://gerrit.dmdirc.com/2884
Reviewed-by: Chris Smith <chris@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
tags/0.8
Greg Holmes 10 years ago
parent
commit
e7301384cc
48 changed files with 222 additions and 187 deletions
  1. 9
    3
      src/com/dmdirc/addons/dcc/kde/KFileChooser.java
  2. 3
    0
      src/com/dmdirc/addons/identd/IdentdServer.java
  3. 7
    4
      src/com/dmdirc/addons/mediasource_dcop/DcopMediaSourcePlugin.java
  4. 1
    0
      src/com/dmdirc/addons/osd/OsdManager.java
  5. 0
    1
      src/com/dmdirc/addons/parserdebug/DebugWindow.java
  6. 9
    21
      src/com/dmdirc/addons/relaybot/RelayCallbackManager.java
  7. 1
    0
      src/com/dmdirc/addons/relaybot/RelayChannelHandler.java
  8. 1
    1
      src/com/dmdirc/addons/relaybot/RelayClientInfo.java
  9. 11
    1
      src/com/dmdirc/addons/scriptplugin/ScriptEngineWrapper.java
  10. 2
    2
      src/com/dmdirc/addons/scriptplugin/TypedProperties.java
  11. 1
    2
      src/com/dmdirc/addons/serverlistdialog/ServerListDialog.java
  12. 1
    2
      src/com/dmdirc/addons/serverlists/ServerGroupItemBase.java
  13. 2
    1
      src/com/dmdirc/addons/serverlists/io/ServerEntryReader.java
  14. 4
    9
      src/com/dmdirc/addons/serverlists/io/ServerGroupReader.java
  15. 12
    11
      src/com/dmdirc/addons/ui_swing/Apple.java
  16. 1
    0
      src/com/dmdirc/addons/ui_swing/SwingController.java
  17. 8
    19
      src/com/dmdirc/addons/ui_swing/UIUtilities.java
  18. 1
    1
      src/com/dmdirc/addons/ui_swing/components/ImageButton.java
  19. 3
    2
      src/com/dmdirc/addons/ui_swing/components/ListScroller.java
  20. 10
    9
      src/com/dmdirc/addons/ui_swing/components/LockedLayer.java
  21. 8
    8
      src/com/dmdirc/addons/ui_swing/components/addonbrowser/AddonFilter.java
  22. 6
    6
      src/com/dmdirc/addons/ui_swing/components/addonbrowser/AddonSorter.java
  23. 5
    0
      src/com/dmdirc/addons/ui_swing/components/durationeditor/DurationDisplay.java
  24. 7
    1
      src/com/dmdirc/addons/ui_swing/components/durationeditor/DurationEditor.java
  25. 2
    2
      src/com/dmdirc/addons/ui_swing/components/expandingsettings/AddOptionPanel.java
  26. 1
    0
      src/com/dmdirc/addons/ui_swing/components/frames/AppleJFrame.java
  27. 2
    1
      src/com/dmdirc/addons/ui_swing/components/renderers/CertificateChainEntryCellRenderer.java
  28. 2
    2
      src/com/dmdirc/addons/ui_swing/components/validating/ValidatingJTextField.java
  29. 1
    1
      src/com/dmdirc/addons/ui_swing/dialogs/DMDircJOptionPane.java
  30. 6
    3
      src/com/dmdirc/addons/ui_swing/dialogs/DialogManager.java
  31. 1
    1
      src/com/dmdirc/addons/ui_swing/dialogs/FeedbackDialog.java
  32. 7
    5
      src/com/dmdirc/addons/ui_swing/dialogs/about/LicenceLoader.java
  33. 1
    1
      src/com/dmdirc/addons/ui_swing/dialogs/about/LicencesPanel.java
  34. 4
    3
      src/com/dmdirc/addons/ui_swing/dialogs/actioneditor/ActionConditionsListPanel.java
  35. 9
    4
      src/com/dmdirc/addons/ui_swing/dialogs/actioneditor/ActionEditorDialog.java
  36. 1
    1
      src/com/dmdirc/addons/ui_swing/dialogs/actionsmanager/ActionGroupSettingsPanel.java
  37. 6
    3
      src/com/dmdirc/addons/ui_swing/dialogs/actionsmanager/ActionsManagerDialog.java
  38. 1
    1
      src/com/dmdirc/addons/ui_swing/dialogs/actionsmanager/SettingsRevertButton.java
  39. 1
    1
      src/com/dmdirc/addons/ui_swing/dialogs/prefs/CategoryPanel.java
  40. 5
    4
      src/com/dmdirc/addons/ui_swing/dialogs/prefs/PreferencesListCellRenderer.java
  41. 8
    1
      src/com/dmdirc/addons/ui_swing/framemanager/buttonbar/FrameToggleButton.java
  42. 3
    2
      src/com/dmdirc/addons/ui_swing/framemanager/tree/TreeViewTreeCellRenderer.java
  43. 1
    1
      src/com/dmdirc/addons/ui_swing/framemanager/windowmenu/WindowMenuFrameManager.java
  44. 1
    0
      src/com/dmdirc/addons/ui_swing/textpane/BackgroundPainter.java
  45. 6
    6
      src/com/dmdirc/addons/ui_swing/wizard/WizardDialog.java
  46. 5
    5
      src/com/dmdirc/addons/ui_swing/wizard/WizardFrame.java
  47. 26
    24
      src/com/dmdirc/addons/ui_swing/wizard/WizardPanel.java
  48. 9
    11
      src/com/dmdirc/addons/ui_web/WebWindowManager.java

+ 9
- 3
src/com/dmdirc/addons/dcc/kde/KFileChooser.java View File

@@ -53,7 +53,7 @@ import javax.swing.filechooser.FileSystemView;
53 53
  *   and kdialog is in either /usr/bin or /bin
54 54
  * - Selection mode FILES_AND_DIRECTORIES can not be used
55 55
  */
56
-public final class KFileChooser extends JFileChooser {
56
+public class KFileChooser extends JFileChooser {
57 57
 
58 58
     /**
59 59
      * A version number for this class.
@@ -165,6 +165,7 @@ public final class KFileChooser extends JFileChooser {
165 165
     /**
166 166
      * Constructs a FileChooser pointing to the user's default directory.
167 167
      *
168
+     * @param config Config provider used to retrieve settings
168 169
      * @param plugin The DCC Plugin that is requesting a chooser
169 170
      * @return The relevant FileChooser
170 171
      */
@@ -175,6 +176,7 @@ public final class KFileChooser extends JFileChooser {
175 176
     /**
176 177
      * Constructs a FileChooser using the given File as the path.
177 178
      *
179
+     * @param config Config provider used to retrieve settings
178 180
      * @param plugin The DCC Plugin that is requesting a chooser
179 181
      * @param currentDirectory Directory to use as the base directory
180 182
      * @return The relevant FileChooser
@@ -186,6 +188,7 @@ public final class KFileChooser extends JFileChooser {
186 188
     /**
187 189
      * Constructs a FileChooser using the given current directory and FileSystemView.
188 190
      *
191
+     * @param config Config provider used to retrieve settings
189 192
      * @param plugin The DCC Plugin that is requesting a chooser
190 193
      * @param currentDirectory Directory to use as the base directory
191 194
      * @param fsv The FileSystemView to use
@@ -198,6 +201,7 @@ public final class KFileChooser extends JFileChooser {
198 201
     /**
199 202
      * Constructs a FileChooser using the given FileSystemView.
200 203
      *
204
+     * @param config Config provider used to retrieve settings
201 205
      * @param plugin The DCC Plugin that is requesting a chooser
202 206
      * @param fsv The FileSystemView to use
203 207
      * @return The relevant FileChooser
@@ -209,6 +213,7 @@ public final class KFileChooser extends JFileChooser {
209 213
     /**
210 214
      * Constructs a FileChooser using the given path.
211 215
      *
216
+     * @param config Config provider used to retrieve settings
212 217
      * @param plugin The DCC Plugin that is requesting a chooser
213 218
      * @param currentDirectoryPath Directory to use as the base directory
214 219
      * @return The relevant FileChooser
@@ -220,6 +225,7 @@ public final class KFileChooser extends JFileChooser {
220 225
     /**
221 226
      * Constructs a FileChooser using the given current directory path and FileSystemView.
222 227
      *
228
+     * @param config Config provider used to retrieve settings
223 229
      * @param plugin The DCC Plugin that is requesting a chooser
224 230
      * @param currentDirectoryPath Directory to use as the base directory
225 231
      * @param fsv The FileSystemView to use
@@ -254,7 +260,7 @@ public final class KFileChooser extends JFileChooser {
254 260
             return super.showOpenDialog(parent);
255 261
         }
256 262
 
257
-        final ArrayList<String> params = new ArrayList<String>();
263
+        final ArrayList<String> params = new ArrayList<>();
258 264
         if (isMultiSelectionEnabled()) {
259 265
             params.add("--multiple");
260 266
             params.add("--separate-output");
@@ -317,7 +323,7 @@ public final class KFileChooser extends JFileChooser {
317 323
             return super.showSaveDialog(parent);
318 324
         }
319 325
 
320
-        final ArrayList<String> params = new ArrayList<String>();
326
+        final ArrayList<String> params = new ArrayList<>();
321 327
         if (getDialogTitle() != null && !getDialogTitle().isEmpty()) {
322 328
             params.add("--caption");
323 329
             params.add(getDialogTitle());

+ 3
- 0
src/com/dmdirc/addons/identd/IdentdServer.java View File

@@ -57,6 +57,9 @@ public final class IdentdServer implements Runnable {
57 57
 
58 58
     /**
59 59
      * Create the IdentdServer.
60
+     *
61
+     * @param plugin Parent ident plugin
62
+     * @param serverManager Server manager to iterate over servers
60 63
      */
61 64
     public IdentdServer(final IdentdPlugin plugin, final ServerManager serverManager) {
62 65
         super();

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

@@ -24,11 +24,12 @@ package com.dmdirc.addons.mediasource_dcop;
24 24
 
25 25
 import com.dmdirc.addons.nowplaying.MediaSource;
26 26
 import com.dmdirc.addons.nowplaying.MediaSourceManager;
27
-import com.dmdirc.plugins.implementations.BasePlugin;
28 27
 import com.dmdirc.plugins.NoSuchProviderException;
29 28
 import com.dmdirc.plugins.PluginManager;
29
+import com.dmdirc.plugins.implementations.BasePlugin;
30 30
 
31 31
 import java.util.ArrayList;
32
+import java.util.Collections;
32 33
 import java.util.List;
33 34
 
34 35
 /**
@@ -45,11 +46,13 @@ public class DcopMediaSourcePlugin extends BasePlugin
45 46
 
46 47
     /**
47 48
      * Creates a new instance of DcopMediaSourcePlugin.
49
+     *
50
+     * @param pluginManager Plugin manager to retrieve services from
48 51
      */
49 52
     public DcopMediaSourcePlugin(final PluginManager pluginManager) {
50 53
         super();
51 54
         this.pluginManager = pluginManager;
52
-        sources = new ArrayList<MediaSource>();
55
+        sources = new ArrayList<>();
53 56
         sources.add(new AmarokSource(this));
54 57
         sources.add(new KaffeineSource(this));
55 58
         sources.add(new NoatunSource(this));
@@ -67,13 +70,13 @@ public class DcopMediaSourcePlugin extends BasePlugin
67 70
             return (List<String>) pluginManager.getExportedService("dcop")
68 71
                     .execute(query);
69 72
         } catch (NoSuchProviderException nspe) {
70
-            return new ArrayList<String>();
73
+            return new ArrayList<>();
71 74
         }
72 75
     }
73 76
 
74 77
     /** {@inheritDoc} */
75 78
     @Override
76 79
     public List<MediaSource> getSources() {
77
-        return sources;
80
+        return Collections.unmodifiableList(sources);
78 81
     }
79 82
 }

+ 1
- 0
src/com/dmdirc/addons/osd/OsdManager.java View File

@@ -59,6 +59,7 @@ public class OsdManager {
59 59
     /**
60 60
      * Add messages to the queue and call displayWindows.
61 61
      *
62
+     * @param timeout Time message will be displayed
62 63
      * @param message Message to be displayed.
63 64
      */
64 65
     public void showWindow(final int timeout, final String message) {

+ 0
- 1
src/com/dmdirc/addons/parserdebug/DebugWindow.java View File

@@ -49,7 +49,6 @@ public class DebugWindow extends FrameContainer {
49 49
      * @param title The title of this window
50 50
      * @param parser The parser this plugin is debugging
51 51
      * @param server The Server window this is a child of
52
-     * @param windowManager Window management
53 52
      */
54 53
     public DebugWindow(final DebugPlugin plugin, final String title, final Parser parser, final Server server) {
55 54
         super("raw", "Parser Debug", title, server.getConfigManager(),

+ 9
- 21
src/com/dmdirc/addons/relaybot/RelayCallbackManager.java View File

@@ -61,8 +61,8 @@ public class RelayCallbackManager extends CallbackManager implements SocketClose
61 61
     /**
62 62
      * Create a new RelayCallbackManager and replace
63 63
      *
64
-     * @param myPlugin
65
-     * @param parser
64
+     * @param myPlugin Parent plugin
65
+     * @param parser Parser to relay
66 66
      */
67 67
     public RelayCallbackManager(final RelayBotPlugin myPlugin, final IRCParser parser) {
68 68
         super(parser, getImplementations());
@@ -74,8 +74,7 @@ public class RelayCallbackManager extends CallbackManager implements SocketClose
74 74
     }
75 75
 
76 76
     private static Map<Class<?>, Class<?>> getImplementations() {
77
-        final Map<Class<?>, Class<?>> implementations
78
-                = new HashMap<Class<?>, Class<?>>();
77
+        final Map<Class<?>, Class<?>> implementations = new HashMap<>();
79 78
 
80 79
         for (Class<?> child : IRCParser.class.getAnnotation(ChildImplementations.class).value()) {
81 80
             for (Class<?> iface : child.getInterfaces()) {
@@ -101,13 +100,7 @@ public class RelayCallbackManager extends CallbackManager implements SocketClose
101 100
                 if (myPlugin.isListening(channel)) {
102 101
                     return;
103 102
                 }
104
-            } catch (NoSuchFieldException ex) {
105
-                ex.printStackTrace();
106
-            } catch (SecurityException ex) {
107
-                ex.printStackTrace();
108
-            } catch (IllegalArgumentException ex) {
109
-                ex.printStackTrace();
110
-            } catch (IllegalAccessException ex) {
103
+            } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException ex) {
111 104
                 ex.printStackTrace();
112 105
             }
113 106
         }
@@ -136,8 +129,8 @@ public class RelayCallbackManager extends CallbackManager implements SocketClose
136 129
     /**
137 130
      * Set the Callback Manager of a given parser.
138 131
      *
139
-     * @param parser
140
-     * @param cbm
132
+     * @param parser Parser to set the callback manager on
133
+     * @param cbm Callback manager to set
141 134
      */
142 135
     private void setCallbackManager(final IRCParser parser, final CallbackManager cbm) {
143 136
         try {
@@ -172,13 +165,7 @@ public class RelayCallbackManager extends CallbackManager implements SocketClose
172 165
 
173 166
             // Replace the old one with the new one.
174 167
             field.set(parser, cbm);
175
-        } catch (IllegalArgumentException ex) {
176
-            ex.printStackTrace();
177
-        } catch (IllegalAccessException ex) {
178
-            ex.printStackTrace();
179
-        } catch (NoSuchFieldException ex) {
180
-            ex.printStackTrace();
181
-        } catch (SecurityException ex) {
168
+        } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException ex) {
182 169
             ex.printStackTrace();
183 170
         }
184 171
     }
@@ -186,7 +173,8 @@ public class RelayCallbackManager extends CallbackManager implements SocketClose
186 173
     /**
187 174
      * When the socket closes, reset the callback manager.
188 175
      *
189
-     * @param parser
176
+     * @param parser Parser to reset
177
+     * @param date Time socket closed
190 178
      */
191 179
     @Override
192 180
     public void onSocketClosed(final Parser parser, final Date date) {

+ 1
- 0
src/com/dmdirc/addons/relaybot/RelayChannelHandler.java View File

@@ -69,6 +69,7 @@ public class RelayChannelHandler implements ChannelMessageListener {
69 69
      * Create a new RelayChannelHandler.
70 70
      *
71 71
      * @param myPlugin Parent plugin
72
+     * @param identityController Identity controller to read settings from
72 73
      * @param myChannel channel to hax!
73 74
      */
74 75
     public RelayChannelHandler(

+ 1
- 1
src/com/dmdirc/addons/relaybot/RelayClientInfo.java View File

@@ -48,7 +48,7 @@ public class RelayClientInfo extends IRCClientInfo {
48 48
     /**
49 49
      * Should the full nickname (nick@server) be used by getNickname?
50 50
      *
51
-     * @param value
51
+     * @param value Should we colour name?
52 52
      */
53 53
     public void setShowFullNickname(final boolean value) {
54 54
         showFullNickname = value;

+ 11
- 1
src/com/dmdirc/addons/scriptplugin/ScriptEngineWrapper.java View File

@@ -47,7 +47,7 @@ public class ScriptEngineWrapper {
47 47
     private final File file;
48 48
 
49 49
     /** Script-Local JS Helper */
50
-    private JavaScriptHelper localHelper = new JavaScriptHelper();
50
+    private final JavaScriptHelper localHelper = new JavaScriptHelper();
51 51
 
52 52
     /** The script plugin that owns this wrapper. */
53 53
     private final ScriptPlugin plugin;
@@ -57,6 +57,9 @@ public class ScriptEngineWrapper {
57 57
      *
58 58
      * @param plugin The script plugin that owns this wrapper
59 59
      * @param filename Filename of script
60
+     *
61
+     * @throws java.io.FileNotFoundException If file is not found
62
+     * @throws javax.script.ScriptException If there was an error during creation
60 63
      */
61 64
     protected ScriptEngineWrapper(final ScriptPlugin plugin, final String filename) throws FileNotFoundException, ScriptException {
62 65
         this.plugin = plugin;
@@ -90,6 +93,11 @@ public class ScriptEngineWrapper {
90 93
 
91 94
     /**
92 95
      * Create a new engine for this script
96
+     *
97
+     * @return Created script engine
98
+     *
99
+     * @throws java.io.FileNotFoundException If file is not found
100
+     * @throws javax.script.ScriptException If there was an error during creation
93 101
      */
94 102
     protected ScriptEngine createEngine() throws FileNotFoundException, ScriptException {
95 103
         final ScriptEngine result = plugin.getScriptFactory().getEngineByName("JavaScript");
@@ -131,6 +139,8 @@ public class ScriptEngineWrapper {
131 139
 
132 140
     /**
133 141
      * Try to reload this script.
142
+     *
143
+     * @return True if script was reloaded
134 144
      */
135 145
     protected boolean reload() {
136 146
         // Tell the current engine that its about to be obliterated.

+ 2
- 2
src/com/dmdirc/addons/scriptplugin/TypedProperties.java View File

@@ -128,7 +128,7 @@ public class TypedProperties extends Properties {
128 128
      *
129 129
      * @param in
130 130
      *            InputStream to load from.
131
-     * @throws java.io.IOException
131
+     * @throws java.io.IOException if an error occurs loading the XML
132 132
      */
133 133
     @Override
134 134
     public synchronized void loadFromXML(final InputStream in) throws IOException {
@@ -447,7 +447,7 @@ public class TypedProperties extends Properties {
447 447
             return fallback;
448 448
         } else {
449 449
             final String[] bits = res.split("\n");
450
-            final ArrayList<String> result = new ArrayList<String>();
450
+            final ArrayList<String> result = new ArrayList<>();
451 451
             for (final String bit : bits) {
452 452
                 result.add(bit);
453 453
             }

+ 1
- 2
src/com/dmdirc/addons/serverlistdialog/ServerListDialog.java View File

@@ -44,7 +44,7 @@ import org.jdesktop.jxlayer.plaf.effect.BufferedImageOpEffect;
44 44
 /**
45 45
  * Dialog to show and edit server lists.
46 46
  */
47
-public final class ServerListDialog extends StandardDialog implements
47
+public class ServerListDialog extends StandardDialog implements
48 48
         ActionListener, ServerListListener {
49 49
 
50 50
     /** Serial version UID. */
@@ -76,7 +76,6 @@ public final class ServerListDialog extends StandardDialog implements
76 76
      * Creates a new server list dialog.
77 77
      *
78 78
      * @param controller Swing controller
79
-     * @param modalityType Desired modality
80 79
      * @param urlHandler The URL Handler to use to handle clicked links
81 80
      * @param performWrapper The wrapper to use for the perform tab
82 81
      */

+ 1
- 2
src/com/dmdirc/addons/serverlists/ServerGroupItemBase.java View File

@@ -103,8 +103,7 @@ public abstract class ServerGroupItemBase implements ServerGroupItem {
103 103
     protected abstract ServerGroup getParent();
104 104
 
105 105
     /**
106
-     * Returns the {@link Identity} which corresponds to this server's desired
107
-     * profile.
106
+     * Returns the {@link ConfigProvider} which corresponds to this server's desired profile.
108 107
      *
109 108
      * @return This server's profile identity
110 109
      */

+ 2
- 1
src/com/dmdirc/addons/serverlists/io/ServerEntryReader.java View File

@@ -34,7 +34,8 @@ import java.net.URISyntaxException;
34 34
 import lombok.RequiredArgsConstructor;
35 35
 
36 36
 /**
37
- * Facilitates loading of a {@link ServerEntry} from a DMDirc {@link Identity}.
37
+ * Facilitates loading of a {@link com.dmdirc.addons.serverlists.ServerEntry} from a DMDirc
38
+ * {@link com.dmdirc.interfaces.config.ConfigProvider}.
38 39
  *
39 40
  * @since 0.6.4
40 41
  */

+ 4
- 9
src/com/dmdirc/addons/serverlists/io/ServerGroupReader.java View File

@@ -32,7 +32,7 @@ import java.net.URISyntaxException;
32 32
 import java.util.Map;
33 33
 
34 34
 /**
35
- * Facilitates loading of a {@link ServerGroup} from a DMDirc {@link Identity}.
35
+ * Facilitates loading of a {@link ServerGroup} from a DMDirc {@link ConfigProvider}.
36 36
  *
37 37
  * @since 0.6.4
38 38
  */
@@ -67,7 +67,7 @@ public class ServerGroupReader {
67 67
     /**
68 68
      * Reads the default server group from this reader's identity.
69 69
      *
70
-     * @see #read(java.lang.String)
70
+     * @see #read(ServerGroup, java.lang.String)
71 71
      * @return A ServerGroup corresponding to the identity's default group
72 72
      * @throws IllegalArgumentException If the identity doesn't define a group
73 73
      */
@@ -114,15 +114,10 @@ public class ServerGroupReader {
114 114
             } else if (item.endsWith(" server")) {
115 115
                 try {
116 116
                     group.addItem(entryReader.read(group, item));
117
-                } catch (URISyntaxException ex) {
118
-                    // TODO: Raise an error about malformed server
119
-                } catch (IllegalArgumentException ex) {
117
+                } catch (URISyntaxException | IllegalArgumentException ex) {
120 118
                     // TODO: Raise an error about malformed server
121 119
                 }
122
-            }
123
-
124
-            // TODO: Raise an error about unknown content?
125
-        }
120
+            }        }
126 121
 
127 122
         return group;
128 123
     }

+ 12
- 11
src/com/dmdirc/addons/ui_swing/Apple.java View File

@@ -89,6 +89,7 @@ public class Apple implements InvocationHandler, ActionListener {
89 89
      * </ul>
90 90
      *
91 91
      * @param configManager Config manager
92
+     * @param controller Parent swing controller
92 93
      */
93 94
     public Apple(final AggregateConfigProvider configManager, final SwingController controller) {
94 95
         this.configManager = configManager;
@@ -125,7 +126,7 @@ public class Apple implements InvocationHandler, ActionListener {
125 126
     private Object reflectMethod(final Object obj, final String className, final String methodName, final Class[] classes, final Object[] objects) {
126 127
         try {
127 128
             final Class<?> clazz = className == null ? obj.getClass() : Class.forName(className);
128
-            final Method method = clazz.getMethod(methodName, classes == null ? new Class[0] : classes);
129
+            final Method method = clazz.getMethod(methodName, classes == null ? new Class<?>[0] : classes);
129 130
             return method.invoke(obj, objects == null ? new Object[0] : objects);
130 131
         } catch (IllegalArgumentException | InvocationTargetException |
131 132
                 ClassNotFoundException | NoSuchMethodException | IllegalAccessException ex) {
@@ -209,7 +210,7 @@ public class Apple implements InvocationHandler, ActionListener {
209 210
      *                   the foreground, or only the foremost one
210 211
      */
211 212
     public void requestForeground(final boolean allWindows) {
212
-        doAppleMethod("requestForeground", new Class[]{Boolean.TYPE}, new Object[]{allWindows});
213
+        doAppleMethod("requestForeground", new Class<?>[]{Boolean.TYPE}, new Object[]{allWindows});
213 214
     }
214 215
 
215 216
     /**
@@ -222,7 +223,7 @@ public class Apple implements InvocationHandler, ActionListener {
222 223
      *            otherwise it will bounce until clicked on.
223 224
      */
224 225
     public void requestUserAttention(final boolean isCritical) {
225
-        doAppleMethod("requestUserAttention", new Class[]{Boolean.TYPE}, new Object[]{isCritical});
226
+        doAppleMethod("requestUserAttention", new Class<?>[]{Boolean.TYPE}, new Object[]{isCritical});
226 227
     }
227 228
 
228 229
     /**
@@ -231,7 +232,7 @@ public class Apple implements InvocationHandler, ActionListener {
231 232
      * @param menu the PopupMenu to attach to this application's Dock icon
232 233
      */
233 234
     public void setDockMenu(final PopupMenu menu) {
234
-        doAppleMethod("setDockMenu", new Class[]{PopupMenu.class}, new Object[]{menu});
235
+        doAppleMethod("setDockMenu", new Class<?>[]{PopupMenu.class}, new Object[]{menu});
235 236
     }
236 237
 
237 238
     /**
@@ -250,7 +251,7 @@ public class Apple implements InvocationHandler, ActionListener {
250 251
      * @param image The image to use
251 252
      */
252 253
     public void setDockIconImage(final Image image) {
253
-        doAppleMethod("setDockIconImage", new Class[]{Image.class}, new Object[]{image});
254
+        doAppleMethod("setDockIconImage", new Class<?>[]{Image.class}, new Object[]{image});
254 255
     }
255 256
 
256 257
     /**
@@ -270,7 +271,7 @@ public class Apple implements InvocationHandler, ActionListener {
270 271
      * @param badge textual label to affix to the Dock icon
271 272
      */
272 273
     public void setDockIconBadge(final String badge) {
273
-        doAppleMethod("setDockIconBadge", new Class[]{String.class}, new Object[]{badge});
274
+        doAppleMethod("setDockIconBadge", new Class<?>[]{String.class}, new Object[]{badge});
274 275
     }
275 276
 
276 277
     /**
@@ -281,7 +282,7 @@ public class Apple implements InvocationHandler, ActionListener {
281 282
      * @param menuBar to use when no other frames are active
282 283
      */
283 284
     public void setDefaultMenuBar(final JMenuBar menuBar) {
284
-        doAppleMethod("setDefaultMenuBar", new Class[]{JMenuBar.class}, new Object[]{menuBar});
285
+        doAppleMethod("setDefaultMenuBar", new Class<?>[]{JMenuBar.class}, new Object[]{menuBar});
285 286
     }
286 287
 
287 288
     /**
@@ -294,9 +295,9 @@ public class Apple implements InvocationHandler, ActionListener {
294 295
     private boolean addHandler(final String handlerClass, final String handlerMethod) {
295 296
         try {
296 297
             final Class<?> listenerClass = Class.forName(handlerClass);
297
-            final Object listener = Proxy.newProxyInstance(getClass().getClassLoader(), new Class[]{listenerClass}, this);
298
+            final Object listener = Proxy.newProxyInstance(getClass().getClassLoader(), new Class<?>[]{listenerClass}, this);
298 299
 
299
-            final Method method = getApplication().getClass().getMethod(handlerMethod, new Class[]{listenerClass});
300
+            final Method method = getApplication().getClass().getMethod(handlerMethod, new Class<?>[]{listenerClass});
300 301
             method.invoke(getApplication(), listener);
301 302
 
302 303
             return true;
@@ -337,13 +338,13 @@ public class Apple implements InvocationHandler, ActionListener {
337 338
         }
338 339
 
339 340
         try {
340
-            final Class[] classes = new Class[args.length];
341
+            final Class<?>[] classes = new Class<?>[args.length];
341 342
 
342 343
             for (int i = 0; i < args.length; i++) {
343 344
                 if (EventObject.class.isInstance(args[i])) {
344 345
                     classes[i] = EventObject.class;
345 346
                 } else {
346
-                    final Class c = args[i].getClass();
347
+                    final Class<?> c = args[i].getClass();
347 348
                     if (c.getCanonicalName().equals("com.apple.eawt.QuitResponse")) {
348 349
                         classes[i] = Object.class;
349 350
                     } else {

+ 1
- 0
src/com/dmdirc/addons/ui_swing/SwingController.java View File

@@ -355,6 +355,7 @@ public class SwingController extends BaseCommandPlugin implements UIController {
355 355
      * For more details on what parameters might be required see
356 356
      * {@link DialogManager#getDialog(Class, Object...)}
357 357
      *
358
+     * @param <T> Dialog type
358 359
      * @see DialogManager#getDialog(Class, Object...) getDialog
359 360
      *
360 361
      * @param klass The class of the dialog to show

+ 8
- 19
src/com/dmdirc/addons/ui_swing/UIUtilities.java View File

@@ -126,16 +126,8 @@ public final class UIUtilities {
126 126
     public static void initUISettings() {
127 127
         try {
128 128
             UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
129
-        } catch (InstantiationException ex) {
130
-            throw new UnsupportedOperationException("Unable to switch to the " +
131
-                    "system look and feel", ex);
132
-        } catch (ClassNotFoundException ex) {
133
-            throw new UnsupportedOperationException("Unable to switch to the " +
134
-                    "system look and feel", ex);
135
-        } catch (UnsupportedLookAndFeelException ex) {
136
-            throw new UnsupportedOperationException("Unable to switch to the " +
137
-                    "system look and feel", ex);
138
-        } catch (IllegalAccessException ex) {
129
+        } catch (InstantiationException | ClassNotFoundException | 
130
+                  UnsupportedLookAndFeelException | IllegalAccessException ex) {
139 131
             throw new UnsupportedOperationException("Unable to switch to the " +
140 132
                     "system look and feel", ex);
141 133
         }
@@ -167,7 +159,7 @@ public final class UIUtilities {
167 159
      * @param font New font
168 160
      */
169 161
     public static void setUIFont(final Font font) {
170
-        final Enumeration keys = UIManager.getDefaults().keys();
162
+        final Enumeration<?> keys = UIManager.getDefaults().keys();
171 163
         while (keys.hasMoreElements()) {
172 164
             final Object key = keys.nextElement();
173 165
             final Object value = UIManager.get(key);
@@ -238,9 +230,6 @@ public final class UIUtilities {
238 230
      * @param returnable Thread to be executed
239 231
      *
240 232
      * @return Result from the completed thread or null if an exception occurred
241
-     *
242
-     * @throws Exception This method will re throw any exception thrown in the
243
-     * executed code
244 233
      */
245 234
     @SneakyThrows
246 235
     @SuppressWarnings("PMD.AvoidThrowingRawExceptionTypes")
@@ -371,7 +360,7 @@ public final class UIUtilities {
371 360
      */
372 361
     public static String clipStringifNeeded(final JComponent component,
373 362
             final String string, final int avaiableWidth) {
374
-        if ((string == null) || (string.equals(""))) {
363
+        if ((string == null) || (string.isEmpty())) {
375 364
             return "";
376 365
         }
377 366
         final FontMetrics fm = component.getFontMetrics(component.getFont());
@@ -393,7 +382,7 @@ public final class UIUtilities {
393 382
      */
394 383
     public static String clipString(final JComponent component,
395 384
             final String string, final int avaiableWidth) {
396
-        if ((string == null) || (string.equals(""))) {
385
+        if ((string == null) || (string.isEmpty())) {
397 386
             return "";
398 387
         }
399 388
         final FontMetrics fm = component.getFontMetrics(component.getFont());
@@ -434,9 +423,9 @@ public final class UIUtilities {
434 423
      * colour of the textpane.
435 424
      *
436 425
      * @param g Graphics object to draw onto
437
-     * @param bounds
438
-     * @param backgroundImage
439
-     * @param backgroundOption
426
+     * @param bounds Bounds to paint within
427
+     * @param backgroundImage background image
428
+     * @param backgroundOption How to draw the background
440 429
      */
441 430
     public static void paintBackground(final Graphics2D g,
442 431
             final Rectangle bounds,

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

@@ -32,7 +32,7 @@ import javax.swing.JButton;
32 32
 /**
33 33
  * Image button, also has the ability to hold an object.
34 34
  *
35
- * <T> Type of object the button holds.
35
+ * @param <T> Type of object the button holds.
36 36
  */
37 37
 public class ImageButton<T> extends JButton {
38 38
 

+ 3
- 2
src/com/dmdirc/addons/ui_swing/components/ListScroller.java View File

@@ -51,7 +51,8 @@ public class ListScroller implements MouseWheelListener {
51 51
     /**
52 52
      * Creates a new instance of ListScroller. You will need to manually need
53 53
      * to add a listener to trigger the scrolling behaviour either by adding a
54
-     * mouse wheel listener or by triggering {@link changeFocus(boolean)}.
54
+     * mouse wheel listener or by triggering
55
+     * {@link #changeFocus(boolean)}.
55 56
      *
56 57
      * @param model List model to scroll over
57 58
      * @param selectionModel List selection model to scroll over
@@ -79,7 +80,7 @@ public class ListScroller implements MouseWheelListener {
79 80
      * Creates a new instance of ListScroller and attaches it to the specified
80 81
      * model and selection model.  You will need to manually need to add a
81 82
      * listener to trigger the scrolling behaviour either by adding a mouse
82
-     * wheel listener or by triggering {@link changeFocus(boolean)}.
83
+     * wheel listener or by triggering {@link #changeFocus(boolean)}.
83 84
      *
84 85
      * @param model List model to scroll over
85 86
      * @param selectionModel List selection model to scroll over

+ 10
- 9
src/com/dmdirc/addons/ui_swing/components/LockedLayer.java View File

@@ -52,31 +52,31 @@ import org.jdesktop.jxlayer.plaf.effect.LayerEffect;
52 52
  * This allows temporarily blocking a part of the interface
53 53
  * with all it subcomponents, it is also useful when some kind of action
54 54
  * is in progress, e.g. reading data from a database.
55
- * <p/>
55
+ * <p>
56 56
  * When {@code true} is passed to the {@link #setLocked(boolean)},
57 57
  * the {@code JXLayer} of this {@code LockableLayerUI} becomes "locked".
58 58
  * It sets the "wait" mouse cursor and stops reacting
59 59
  * on mouse, keyboard and focus events.
60
- * <p/>
60
+ * <p>
61 61
  * If {@code setLocked(boolean)} is called with {@code false} parameter
62 62
  * after that, the {@code JXLayer}, together with all its subcomponents,
63 63
  * gets back to live.
64
- * <p/>
64
+ * <p>
65 65
  * Subclasses usually override {@link #paintLayer(Graphics2D,JXLayer)} or
66 66
  * {@link #getLayerEffects(JXLayer)} to implement some visual effects
67 67
  * when {@code JXLayer} is in locked state.
68
- * <p/>
68
+ * <p>
69 69
  * Here is an example of using {@code LockableLayerUI}:
70 70
  * <pre>
71 71
  * JComponent myComponent = getMyComponent(); // just any component
72
- * <p/>
72
+ *
73 73
  * LockableLayerUI lockableUI = new LockableLayerUI();
74 74
  * JXLayer&lt;JComponent&gt; layer = new JXLayer&lt;JComponent&gt;(myComponent,
75 75
  * lockableUI);
76
- * <p/>
76
+ *
77 77
  * // locking the layer, use lockableUI.setLocked(false) to unlock
78 78
  * lockableUI.setLocked(true);
79
- * <p/>
79
+ *
80 80
  * // add the layer to a frame or a panel, like any other component
81 81
  * frame.add(layer);
82 82
  * </pre>
@@ -301,8 +301,9 @@ public class LockedLayer<T extends JComponent> extends
301 301
 
302 302
     /**
303 303
      * This method returns the array of {@code LayerEffect}s
304
-     * set using {@link #setLayerEffects(LayerEffect...)}
305
-     * <p/>
304
+     * set using
305
+     * {@link #setLockedEffects(LayerEffect...)}
306
+     * <p>
306 307
      * If a {@code LockableUI} provides more extensive API
307 308
      * to support different {@code Effect}s depending on its state
308 309
      * or on the state of the passed {@code JXLayer},

+ 8
- 8
src/com/dmdirc/addons/ui_swing/components/addonbrowser/AddonFilter.java View File

@@ -44,14 +44,14 @@ public class AddonFilter extends RowFilter<DefaultTableModel, Integer> {
44 44
     /**
45 45
      * Creates a new addon filter.
46 46
      *
47
-     * @param verifiedBox
48
-     * @param unverifiedBox
49
-     * @param installedBox
50
-     * @param notinstalledBox
51
-     * @param pluginsBox
52
-     * @param themesBox
53
-     * @param actionsBox
54
-     * @param searchBox
47
+     * @param verifiedBox Verified checkbox
48
+     * @param unverifiedBox Unverified checkbox
49
+     * @param installedBox Installed checkbox
50
+     * @param notinstalledBox Not installed checkbox
51
+     * @param pluginsBox Plugins checkbox
52
+     * @param themesBox Themes checkbox
53
+     * @param actionsBox Actions checkbox
54
+     * @param searchBox Search field
55 55
      */
56 56
     public AddonFilter(final ButtonModel verifiedBox,
57 57
             final ButtonModel unverifiedBox, final ButtonModel installedBox,

+ 6
- 6
src/com/dmdirc/addons/ui_swing/components/addonbrowser/AddonSorter.java View File

@@ -42,12 +42,12 @@ public class AddonSorter extends TableRowSorter<DefaultTableModel> implements
42 42
     /**
43 43
      * Creates a new addon sorter.
44 44
      *
45
-     * @param model
46
-     * @param sortByDate
47
-     * @param sortByName
48
-     * @param sortByRating
49
-     * @param sortByStatus
50
-     * @param filter
45
+     * @param model Table model to sort
46
+     * @param sortByDate Sort by date
47
+     * @param sortByName Sort by name
48
+     * @param sortByRating Sort by rating
49
+     * @param sortByStatus Sort by status
50
+     * @param filter Addon filter
51 51
      */
52 52
     public AddonSorter(final DefaultTableModel model, final ButtonModel sortByDate,
53 53
             final ButtonModel sortByName, final ButtonModel sortByRating,

+ 5
- 0
src/com/dmdirc/addons/ui_swing/components/durationeditor/DurationDisplay.java View File

@@ -65,6 +65,8 @@ public class DurationDisplay extends JPanel implements ActionListener,
65 65
 
66 66
     /**
67 67
      * Initialises a new duration display of 0 milliseconds.
68
+     *
69
+     * @param controller Controller for dialog creation
68 70
      */
69 71
     public DurationDisplay(final SwingController controller) {
70 72
         this(controller, 0);
@@ -73,6 +75,7 @@ public class DurationDisplay extends JPanel implements ActionListener,
73 75
     /**
74 76
      * Instantiates a new duration display.
75 77
      *
78
+     * @param controller Controller for dialog creation
76 79
      * @param window Parent window.
77 80
      *
78 81
      * @since 0.6
@@ -85,6 +88,7 @@ public class DurationDisplay extends JPanel implements ActionListener,
85 88
     /**
86 89
      * Instantiates a new duration display.
87 90
      *
91
+     * @param controller Controller for dialog creation
88 92
      * @param duration Starting duration
89 93
      */
90 94
     public DurationDisplay(final SwingController controller,
@@ -95,6 +99,7 @@ public class DurationDisplay extends JPanel implements ActionListener,
95 99
     /**
96 100
      * Initialises a new duration display showing the specified millisecond duration.
97 101
      *
102
+     * @param controller Controller for dialog creation
98 103
      * @param window Parent window.
99 104
      * @param duration Duration to display in milliseconds
100 105
      *

+ 7
- 1
src/com/dmdirc/addons/ui_swing/components/durationeditor/DurationEditor.java View File

@@ -75,6 +75,8 @@ public class DurationEditor extends StandardDialog implements ActionListener {
75 75
 
76 76
     /**
77 77
      * Instantiates a new duration editor.
78
+     *
79
+     * @param controller Controller for dialog creation
78 80
      */
79 81
     public DurationEditor(final SwingController controller) {
80 82
         this(controller, 0);
@@ -83,6 +85,8 @@ public class DurationEditor extends StandardDialog implements ActionListener {
83 85
     /**
84 86
      * Instantiates a new duration editor.
85 87
      *
88
+     * @param controller Controller for dialog creation
89
+     *
86 90
      * @param window Parent window.
87 91
      *
88 92
      * @since 0.6
@@ -95,6 +99,8 @@ public class DurationEditor extends StandardDialog implements ActionListener {
95 99
     /**
96 100
      * Instantiates a new duration editor.
97 101
      *
102
+     * @param controller Controller for dialog creation
103
+     *
98 104
      * @param duration Starting duration
99 105
      */
100 106
     public DurationEditor(final SwingController controller,
@@ -105,7 +111,7 @@ public class DurationEditor extends StandardDialog implements ActionListener {
105 111
     /**
106 112
      * Instantiates a new duration editor.
107 113
      *
108
-     * @param controller Swing controller
114
+     * @param controller Controller for dialog creation
109 115
      * @param window Parent window.
110 116
      * @param duration Starting duration
111 117
      *

+ 2
- 2
src/com/dmdirc/addons/ui_swing/components/expandingsettings/AddOptionPanel.java View File

@@ -119,7 +119,7 @@ public class AddOptionPanel extends JPanel implements ActionListener {
119 119
     /**
120 120
      * Adds an addable option.
121 121
      *
122
-     * @param optionName Option name
122
+     * @param setting Setting to add
123 123
      */
124 124
     protected void addOption(final JComponent setting) {
125 125
         ((DefaultComboBoxModel) addOptionComboBox.getModel())
@@ -131,7 +131,7 @@ public class AddOptionPanel extends JPanel implements ActionListener {
131 131
     /**
132 132
      * Removes an addable option.
133 133
      *
134
-     * @param optionName Option name
134
+     * @param setting Setting to add
135 135
      */
136 136
     protected void delOption(final JComponent setting) {
137 137
         ((DefaultComboBoxModel) addOptionComboBox.getModel())

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

@@ -41,6 +41,7 @@ public class AppleJFrame extends JFrame {
41 41
      * Create a new Apple JFrame
42 42
      *
43 43
      * @param parentWindow Main Window
44
+     * @param controller Parent swing controller
44 45
      */
45 46
     public AppleJFrame(final MainFrame parentWindow,
46 47
             final SwingController controller) {

+ 2
- 1
src/com/dmdirc/addons/ui_swing/components/renderers/CertificateChainEntryCellRenderer.java View File

@@ -47,6 +47,7 @@ public class CertificateChainEntryCellRenderer extends DMDircListCellRenderer {
47 47
      * Creates a new renderer.
48 48
      *
49 49
      * @param iconManager Icon manager
50
+     * @param renderer Parent renderer
50 51
      */
51 52
     public CertificateChainEntryCellRenderer(final IconManager iconManager,
52 53
             final ListCellRenderer renderer) {
@@ -60,7 +61,7 @@ public class CertificateChainEntryCellRenderer extends DMDircListCellRenderer {
60 61
     @Override
61 62
     protected void renderValue(final JLabel label, final Object value,
62 63
             final int index, final boolean isSelected,
63
-            final boolean cellHasFocus) {
64
+            final boolean hasFocus) {
64 65
         if (value instanceof CertificateChainEntry) {
65 66
             final CertificateChainEntry entry = (CertificateChainEntry) value;
66 67
 

+ 2
- 2
src/com/dmdirc/addons/ui_swing/components/validating/ValidatingJTextField.java View File

@@ -136,7 +136,7 @@ public class ValidatingJTextField extends JComponent implements DocumentListener
136 136
     /**
137 137
      * Checks if the text validates.
138 138
      *
139
-     * @see com.dmdirc.ui.swing.components.validating.Validator#validate(Object)
139
+     * @see com.dmdirc.util.validators.Validator#validate(Object)
140 140
      *
141 141
      * @return true iif the text validates
142 142
      */
@@ -308,7 +308,7 @@ public class ValidatingJTextField extends JComponent implements DocumentListener
308 308
      *
309 309
      * @return Specified textfield content
310 310
      *
311
-     * @throws javax.swing.text.BadLocationException
311
+     * @throws javax.swing.text.BadLocationException if the bounds are wrong
312 312
      */
313 313
     public String getText(final int offs, final int len) throws BadLocationException {
314 314
         return textField.getText(offs, len);

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

@@ -60,7 +60,7 @@ public class DMDircJOptionPane extends JOptionPane {
60 60
     /**
61 61
      * Set the maximum number of characters per line.
62 62
      *
63
-     * @param maxCharactersPerLineCount
63
+     * @param maxCharactersPerLineCount Maximum characters per line
64 64
      */
65 65
     public void setMaxCharactersPerLineCount(final int maxCharactersPerLineCount) {
66 66
         this.maxCharactersPerLineCount = maxCharactersPerLineCount;

+ 6
- 3
src/com/dmdirc/addons/ui_swing/dialogs/DialogManager.java View File

@@ -69,6 +69,8 @@ public class DialogManager {
69 69
      * this dialog to the user. For more details on what parameters might be
70 70
      * required see {@link DialogManager#getDialog(Class, Object...)}
71 71
      *
72
+     * @param <T> Dialog type
73
+     *
72 74
      * @see DialogManager#getDialog(Class, Object...) getDialog
73 75
      *
74 76
      * @param klass The class of the dialog to show
@@ -108,6 +110,8 @@ public class DialogManager {
108 110
      *   <li>DialogManager</li>
109 111
      * </ul>
110 112
      *
113
+     * @param <T> Dialog type
114
+     *
111 115
      * @param klass The class of the dialog to show
112 116
      * @param params Any non standard parameters required
113 117
      *
@@ -209,10 +213,9 @@ public class DialogManager {
209 213
      * Removes a previously created instance of a dialog from the dialog
210 214
      * manager.
211 215
      *
212
-     * @param klass The class of the dialog to show
216
+     * @param dialog Dialog to dispose of
213 217
      *
214
-     * @return Instance of the dialog that has been removed or null if there
215
-     * was no dialog created
218
+     * @return Instance of the dialog that has been removed or null if there was no dialog created
216 219
      */
217 220
     public StandardDialog dispose(final StandardDialog dialog) {
218 221
         if (dialogs.containsKey(dialog.getClass())) {

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

@@ -250,7 +250,7 @@ public final class FeedbackDialog extends StandardDialog implements
250 250
     }
251 251
 
252 252
     /**
253
-     * @{inheritDoc}
253
+     * {@inheritDoc}
254 254
      *
255 255
      * @param e Document event
256 256
      */

+ 7
- 5
src/com/dmdirc/addons/ui_swing/dialogs/about/LicenceLoader.java View File

@@ -35,12 +35,14 @@ import java.io.IOException;
35 35
 import java.io.InputStream;
36 36
 import java.io.InputStreamReader;
37 37
 import java.util.Map;
38
-import java.util.TreeMap;
39 38
 import java.util.Map.Entry;
39
+import java.util.TreeMap;
40 40
 
41 41
 import javax.swing.JTree;
42 42
 import javax.swing.tree.DefaultMutableTreeNode;
43 43
 import javax.swing.tree.DefaultTreeModel;
44
+import javax.swing.tree.MutableTreeNode;
45
+import javax.swing.tree.TreeNode;
44 46
 
45 47
 /**
46 48
  * Background loader of licences into a list.
@@ -57,6 +59,7 @@ public class LicenceLoader extends LoggingSwingWorker<Void, Void> {
57 59
     /**
58 60
      * Instantiates a new licence loader.
59 61
      *
62
+     * @param controller to get plugin manager from to get plugin list from to read licenses
60 63
      * @param tree Tree
61 64
      * @param model Model to load licences into
62 65
      */
@@ -105,8 +108,7 @@ public class LicenceLoader extends LoggingSwingWorker<Void, Void> {
105 108
 
106 109
     private void addCoreLicences(final ResourceManager rm) {
107 110
         final DefaultMutableTreeNode root = new DefaultMutableTreeNode("DMDirc");
108
-        final Map<String, InputStream> licences =
109
-                new TreeMap<String, InputStream>(String.CASE_INSENSITIVE_ORDER);
111
+        final Map<String, InputStream> licences = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
110 112
         licences.putAll(rm.getResourcesStartingWithAsInputStreams(
111 113
                 "com/dmdirc/licences/"));
112 114
         addLicensesToNode(licences, root);
@@ -130,7 +132,7 @@ public class LicenceLoader extends LoggingSwingWorker<Void, Void> {
130 132
             /** {@inheritDoc} */
131 133
             @Override
132 134
             public void run() {
133
-                model.insertNodeInto(root, (DefaultMutableTreeNode) model.
135
+                model.insertNodeInto(root, (MutableTreeNode) model.
134 136
                         getRoot(), model.getChildCount(model.getRoot()));
135 137
             }
136 138
         });
@@ -154,7 +156,7 @@ public class LicenceLoader extends LoggingSwingWorker<Void, Void> {
154 156
     /** {@inheritDoc} */
155 157
     @Override
156 158
     protected void done() {
157
-        model.nodeStructureChanged((DefaultMutableTreeNode) model.getRoot());
159
+        model.nodeStructureChanged((TreeNode) model.getRoot());
158 160
         for (int i = 0; i < tree.getRowCount(); i++) {
159 161
             tree.expandRow(i);
160 162
         }

+ 1
- 1
src/com/dmdirc/addons/ui_swing/dialogs/about/LicencesPanel.java View File

@@ -71,7 +71,7 @@ public class LicencesPanel extends JPanel implements TreeSelectionListener {
71 71
     /**
72 72
      * Creates a new instance of LicencesPanel.
73 73
      *
74
-     * @param config Config manager
74
+     * @param controller Controller to pass to LicenseLoader (should be PluginManager)
75 75
      */
76 76
     public LicencesPanel(final SwingController controller) {
77 77
         super();

+ 4
- 3
src/com/dmdirc/addons/ui_swing/dialogs/actioneditor/ActionConditionsListPanel.java View File

@@ -89,6 +89,7 @@ public class ActionConditionsListPanel extends JPanel implements
89 89
     /**
90 90
      * Instantiates the panel.
91 91
      *
92
+     * @param iconManager Icon manager to retrieve icons
92 93
      * @param trigger Action trigger
93 94
      * @param conditions List of existing conditions;
94 95
      * @param treePanel Condition tree panel.
@@ -99,11 +100,11 @@ public class ActionConditionsListPanel extends JPanel implements
99 100
             final ActionConditionsTreePanel treePanel) {
100 101
         super();
101 102
 
102
-        validations = new HashMap<ActionConditionDisplayPanel, Boolean>();
103
+        validations = new HashMap<>();
103 104
 
104 105
         this.iconManager = iconManager;
105 106
         this.trigger = trigger;
106
-        this.conditions = new ArrayList<ActionConditionDisplayPanel>(conditions);
107
+        this.conditions = new ArrayList<>(conditions);
107 108
         this.treePanel = treePanel;
108 109
 
109 110
         initComponents();
@@ -215,7 +216,7 @@ public class ActionConditionsListPanel extends JPanel implements
215 216
      */
216 217
     public List<ActionCondition> getConditions() {
217 218
         final List<ActionCondition> conditionList =
218
-                new ArrayList<ActionCondition>();
219
+                new ArrayList<>();
219 220
 
220 221
         synchronized (conditions) {
221 222
             for (final ActionConditionDisplayPanel condition : conditions) {

+ 9
- 4
src/com/dmdirc/addons/ui_swing/dialogs/actioneditor/ActionEditorDialog.java View File

@@ -85,6 +85,7 @@ public class ActionEditorDialog extends StandardDialog implements
85 85
      * Instantiates the panel.
86 86
      *
87 87
      * @param controller Swing controller
88
+     * @param parentWindow Parent window
88 89
      * @param group Action's group
89 90
      */
90 91
     public ActionEditorDialog(final SwingController controller,
@@ -110,8 +111,8 @@ public class ActionEditorDialog extends StandardDialog implements
110 111
      * Instantiates the panel.
111 112
      *
112 113
      * @param controller Swing controller
114
+     * @param parentWindow Parent window
113 115
      * @param action Action to be edited
114
-     * @param group Action's group
115 116
      */
116 117
     public ActionEditorDialog(final SwingController controller,
117 118
             final Window parentWindow, final Action action) {
@@ -203,7 +204,7 @@ public class ActionEditorDialog extends StandardDialog implements
203 204
     }
204 205
 
205 206
     /**
206
-     * @{inheritDoc
207
+     * {@inheritDoc}
207 208
      *
208 209
      * @param e Action event
209 210
      */
@@ -227,7 +228,9 @@ public class ActionEditorDialog extends StandardDialog implements
227 228
         }
228 229
     }
229 230
 
230
-    /** {@inheritDoc} */
231
+    /**
232
+     * {@inheritDoc}
233
+     */
231 234
     @Override
232 235
     public void validate() {
233 236
         super.validate();
@@ -272,7 +275,9 @@ public class ActionEditorDialog extends StandardDialog implements
272 275
         }
273 276
     }
274 277
 
275
-    /** @{inheritDoc */
278
+    /**
279
+     * {@inheritDoc}
280
+     */
276 281
     @Override
277 282
     public void propertyChange(final PropertyChangeEvent evt) {
278 283
         if (evt.getSource().equals(name)) {

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

@@ -57,7 +57,7 @@ public final class ActionGroupSettingsPanel extends JPanel implements ActionList
57 57
     private static final long serialVersionUID = 1;
58 58
     /** Settings list. */
59 59
     private Collection<PreferencesSetting> settings;
60
-    /** Button -> Component map. */
60
+    /** Button to Component map. */
61 61
     private Map<JButton, PreferencesSetting> settingMap;
62 62
     /** Parent dialog. */
63 63
     private Window window;

+ 6
- 3
src/com/dmdirc/addons/ui_swing/dialogs/actionsmanager/ActionsManagerDialog.java View File

@@ -101,6 +101,9 @@ public final class ActionsManagerDialog extends StandardDialog implements
101 101
 
102 102
     /**
103 103
      * Creates a new instance of ActionsManagerDialog.
104
+     *
105
+     * @param parentWindow Parent window
106
+     * @param controller Parent controller
104 107
      */
105 108
     @SuppressWarnings("unchecked")
106 109
     public ActionsManagerDialog(final Window parentWindow,
@@ -110,7 +113,7 @@ public final class ActionsManagerDialog extends StandardDialog implements
110 113
                 controller) : null, ModalityType.MODELESS);
111 114
 
112 115
         initComponents();
113
-        validator = new ValidatorChain<String>(
116
+        validator = new ValidatorChain<>(
114 117
                 new ActionGroupNoDuplicatesInListValidator(groups,
115 118
                 (DefaultListModel) groups.getModel()), new FileNameValidator());
116 119
         addListeners();
@@ -131,11 +134,11 @@ public final class ActionsManagerDialog extends StandardDialog implements
131 134
                 + " intelligently respond to various events.  Action groups are"
132 135
                 + " there for you to organise groups, add or remove them"
133 136
                 + " to suit your needs.");
134
-        groups = new JList(new SortedListModel<ActionGroup>(
137
+        groups = new JList(new SortedListModel<>(
135 138
                 new ActionGroupNameComparator()));
136 139
         actions = new ActionsGroupPanel(getController(), this, null);
137 140
         info = new ActionGroupInformationPanel(null);
138
-        settings = new HashMap<ActionGroup, ActionGroupSettingsPanel>();
141
+        settings = new HashMap<>();
139 142
         activeSettings = new ActionGroupSettingsPanel(getController()
140 143
                 .getPrefsComponentFactory(), null, this);
141 144
         settings.put(null, activeSettings);

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

@@ -44,7 +44,7 @@ public class SettingsRevertButton extends JButton implements SettingChangeListen
44 44
     /**
45 45
      * Instantiates a new settings revert button.
46 46
      *
47
-     * @param setting
47
+     * @param setting Setting to revert
48 48
      */
49 49
     public SettingsRevertButton(final PreferencesSetting setting) {
50 50
         super("Revert");

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

@@ -249,7 +249,7 @@ public class CategoryPanel extends JPanel {
249 249
     /**
250 250
      * Sets this panel to a waiting to load state.
251 251
      *
252
-     * @param b
252
+     * @param b Loading state
253 253
      */
254 254
     public void setWaiting(final boolean b) {
255 255
         UIUtilities.invokeLater(new Runnable() {

+ 5
- 4
src/com/dmdirc/addons/ui_swing/dialogs/prefs/PreferencesListCellRenderer.java View File

@@ -51,25 +51,26 @@ public class PreferencesListCellRenderer extends JLabel implements ListCellRende
51 51
     /** Number of categories shown. */
52 52
     private final int numCats;
53 53
     /** Icon manager. */
54
-    private IconManager iconManager;
54
+    private final IconManager iconManager;
55 55
     /** Label map. */
56
-    private Map<PreferencesCategory, JLabel> labelMap;
56
+    private final Map<PreferencesCategory, JLabel> labelMap;
57 57
 
58 58
     /**
59 59
      * Instantiates a new prefs list cell renderer.
60 60
      *
61
+     * @param iconManager Icon manager to load icons
61 62
      * @param numCats Number of categories in the list
62 63
      */
63 64
     public PreferencesListCellRenderer(final IconManager iconManager,
64 65
             final int numCats) {
65
-        labelMap = new HashMap<PreferencesCategory, JLabel>();
66
+        labelMap = new HashMap<>();
66 67
         this.numCats = numCats;
67 68
         this.iconManager = iconManager;
68 69
     }
69 70
 
70 71
     /** {@inheritDoc} */
71 72
     @Override
72
-    public final Component getListCellRendererComponent(final JList list,
73
+    public Component getListCellRendererComponent(final JList list,
73 74
             final Object value, final int index, final boolean isSelected,
74 75
             final boolean cellHasFocus) {
75 76
         final PreferencesCategory cat = (PreferencesCategory) value;

+ 8
- 1
src/com/dmdirc/addons/ui_swing/framemanager/buttonbar/FrameToggleButton.java View File

@@ -23,6 +23,7 @@ package com.dmdirc.addons.ui_swing.framemanager.buttonbar;
23 23
 
24 24
 import com.dmdirc.FrameContainer;
25 25
 import com.dmdirc.interfaces.ui.Window;
26
+
26 27
 import javax.swing.Icon;
27 28
 import javax.swing.JToggleButton;
28 29
 
@@ -43,7 +44,13 @@ public class FrameToggleButton extends JToggleButton {
43 44
     /** Contains the window associated with this button. */
44 45
     private final Window window;
45 46
 
46
-    /** Create a new instance of FrameToggleButton. */
47
+    /**
48
+     * Create a new instance of FrameToggleButton.
49
+     *
50
+     * @param text Text to show
51
+     * @param icon Icon to show
52
+     * @param window Parent window
53
+     */
47 54
     public FrameToggleButton(final String text, final Icon icon, final Window window) {
48 55
         super(text, icon);
49 56
         this.window = window;

+ 3
- 2
src/com/dmdirc/addons/ui_swing/framemanager/tree/TreeViewTreeCellRenderer.java View File

@@ -61,6 +61,7 @@ public class TreeViewTreeCellRenderer implements TreeCellRenderer,
61 61
     /**
62 62
      * Creates a new instance of TreeViewTreeCellRenderer.
63 63
      *
64
+     * @param config Config manager to retrieve settings from
64 65
      * @param manager Parent TreeFrameManager
65 66
      */
66 67
     public TreeViewTreeCellRenderer(final AggregateConfigProvider config,
@@ -90,7 +91,7 @@ public class TreeViewTreeCellRenderer implements TreeCellRenderer,
90 91
      * @return RendererComponent for this node.
91 92
      */
92 93
     @Override
93
-    public final Component getTreeCellRendererComponent(final JTree tree,
94
+    public Component getTreeCellRendererComponent(final JTree tree,
94 95
             final Object value, final boolean sel, final boolean expanded,
95 96
             final boolean leaf, final int row, final boolean hasFocus) {
96 97
 
@@ -101,7 +102,7 @@ public class TreeViewTreeCellRenderer implements TreeCellRenderer,
101 102
         if (label == null) {
102 103
             return new JLabel("Label == null");
103 104
         }
104
-        boolean bold = false;
105
+        boolean bold;
105 106
         Color background = tree.getBackground();
106 107
         Color foreground = tree.getForeground();
107 108
 

+ 1
- 1
src/com/dmdirc/addons/ui_swing/framemanager/windowmenu/WindowMenuFrameManager.java View File

@@ -73,7 +73,7 @@ public final class WindowMenuFrameManager extends JMenu implements
73 73
     private final AtomicBoolean enabledMenuItems = new AtomicBoolean(false);
74 74
     /** Swing controller. */
75 75
     private final SwingController controller;
76
-    /** Window -> menu map. */
76
+    /** Window to menu map. */
77 77
     private final Map<FrameContainer, FrameContainerMenu> menus;
78 78
     private final Map<FrameContainer, FrameContainerMenuItem> items;
79 79
     private final Map<FrameContainer, FrameContainerMenuItem> menuItems;

+ 1
- 0
src/com/dmdirc/addons/ui_swing/textpane/BackgroundPainter.java View File

@@ -98,6 +98,7 @@ public class BackgroundPainter extends LayerUI<JComponent> {
98 98
      * Creates a new background painter.
99 99
      *
100 100
      * @param configManager Config manager to retrieve settings from
101
+     * @param urlBuilder URL Builder
101 102
      * @param domain Domain to retrieve settings from
102 103
      * @param imageKey Key for background image
103 104
      * @param optionKey Key for background type

+ 6
- 6
src/com/dmdirc/addons/ui_swing/wizard/WizardDialog.java View File

@@ -37,14 +37,14 @@ import javax.swing.JButton;
37 37
 /**
38 38
  * Basic wizard container.
39 39
  */
40
-public final class WizardDialog extends StandardDialog implements ActionListener {
40
+public class WizardDialog extends StandardDialog implements ActionListener {
41 41
 
42 42
     /** Serial version UID. */
43 43
     private static final long serialVersionUID = 2;
44 44
     /** Wizard. */
45 45
     private final WizardPanel wizard;
46 46
     /** Parent container. */
47
-    private Window parentWindow;
47
+    private final Window parentWindow;
48 48
 
49 49
     /**
50 50
      * Creates a new instance of WizardFrame that requires a mainframe.
@@ -165,7 +165,7 @@ public final class WizardDialog extends StandardDialog implements ActionListener
165 165
     /**
166 166
      * Adds a step listener to the list.
167 167
      *
168
-     * @param listener
168
+     * @param listener Listener to add
169 169
      */
170 170
     public void addStepListener(final StepListener listener) {
171 171
         wizard.addStepListener(listener);
@@ -174,7 +174,7 @@ public final class WizardDialog extends StandardDialog implements ActionListener
174 174
     /**
175 175
      * Removes a step listener from the list.
176 176
      *
177
-     * @param listener
177
+     * @param listener Listener to remove
178 178
      */
179 179
     public void removeStepListener(final StepListener listener) {
180 180
         wizard.removeStepListener(listener);
@@ -183,7 +183,7 @@ public final class WizardDialog extends StandardDialog implements ActionListener
183 183
     /**
184 184
      * Adds a wizard listener to the list.
185 185
      *
186
-     * @param listener
186
+     * @param listener Listener to add
187 187
      */
188 188
     public void addWizardListener(final WizardListener listener) {
189 189
         wizard.addWizardListener(listener);
@@ -192,7 +192,7 @@ public final class WizardDialog extends StandardDialog implements ActionListener
192 192
     /**
193 193
      * Removes a wizard listener from the list.
194 194
      *
195
-     * @param listener
195
+     * @param listener Listener to remove
196 196
      */
197 197
     public void removeWizardListener(final WizardListener listener) {
198 198
         wizard.removeWizardListener(listener);

+ 5
- 5
src/com/dmdirc/addons/ui_swing/wizard/WizardFrame.java View File

@@ -32,7 +32,7 @@ import javax.swing.JFrame;
32 32
 /**
33 33
  * Basic wizard container.
34 34
  */
35
-public final class WizardFrame extends JFrame {
35
+public class WizardFrame extends JFrame {
36 36
 
37 37
     /**
38 38
      * A version number for this class. It should be changed whenever the class
@@ -128,7 +128,7 @@ public final class WizardFrame extends JFrame {
128 128
     /**
129 129
      * Adds a step listener to the list.
130 130
      *
131
-     * @param listener
131
+     * @param listener Listener to add
132 132
      */
133 133
     public void addStepListener(final StepListener listener) {
134 134
         wizard.addStepListener(listener);
@@ -137,7 +137,7 @@ public final class WizardFrame extends JFrame {
137 137
     /**
138 138
      * Removes a step listener from the list.
139 139
      *
140
-     * @param listener
140
+     * @param listener Listener to remove
141 141
      */
142 142
     public void removeStepListener(final StepListener listener) {
143 143
         wizard.removeStepListener(listener);
@@ -146,7 +146,7 @@ public final class WizardFrame extends JFrame {
146 146
     /**
147 147
      * Adds a wizard listener to the list.
148 148
      *
149
-     * @param listener
149
+     * @param listener Listener to add
150 150
      */
151 151
     public void addWizardListener(final WizardListener listener) {
152 152
         wizard.addWizardListener(listener);
@@ -155,7 +155,7 @@ public final class WizardFrame extends JFrame {
155 155
     /**
156 156
      * Removes a wizard listener from the list.
157 157
      *
158
-     * @param listener
158
+     * @param listener Listener to remove
159 159
      */
160 160
     public void removeWizardListener(final WizardListener listener) {
161 161
         wizard.removeWizardListener(listener);

+ 26
- 24
src/com/dmdirc/addons/ui_swing/wizard/WizardPanel.java View File

@@ -19,7 +19,6 @@
19 19
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 20
  * SOFTWARE.
21 21
  */
22
-
23 22
 package com.dmdirc.addons.ui_swing.wizard;
24 23
 
25 24
 import com.dmdirc.addons.ui_swing.UIUtilities;
@@ -82,7 +81,7 @@ public class WizardPanel extends JPanel implements ActionListener {
82 81
         super();
83 82
 
84 83
         stepListeners = new ListenerList();
85
-        this.steps = new ArrayList<Step>(steps);
84
+        this.steps = new ArrayList<>(steps);
86 85
 
87 86
         this.title = title;
88 87
 
@@ -190,22 +189,25 @@ public class WizardPanel extends JPanel implements ActionListener {
190 189
 
191 190
     /** Moves to the next step. */
192 191
     protected void nextStep() {
193
-        if ("Next \u00BB".equals(next.getText())) {
194
-            prev.setEnabled(true);
195
-            fireStepAboutToBeDisplayed(steps.get(currentStep + 1));
196
-            stepsPanel.setVisible(false);
197
-            stepsPanel.removeAll();
198
-            stepsPanel.add(steps.get(currentStep + 1));
199
-            stepsPanel.setVisible(true);
200
-            fireStepHidden(steps.get(currentStep));
201
-            currentStep++;
202
-            if (currentStep == steps.size() - 1) {
203
-                next.setText("Finish");
204
-            }
205
-            titleLabel.setText(steps.get(currentStep).getTitle());
206
-            updateProgressLabel();
207
-        } else if ("Finish".equals(next.getText())) {
208
-            fireWizardFinished();
192
+        switch (next.getText()) {
193
+            case "Next \u00BB":
194
+                prev.setEnabled(true);
195
+                fireStepAboutToBeDisplayed(steps.get(currentStep + 1));
196
+                stepsPanel.setVisible(false);
197
+                stepsPanel.removeAll();
198
+                stepsPanel.add(steps.get(currentStep + 1));
199
+                stepsPanel.setVisible(true);
200
+                fireStepHidden(steps.get(currentStep));
201
+                currentStep++;
202
+                if (currentStep == steps.size() - 1) {
203
+                    next.setText("Finish");
204
+                }
205
+                titleLabel.setText(steps.get(currentStep).getTitle());
206
+                updateProgressLabel();
207
+                break;
208
+            case "Finish":
209
+                fireWizardFinished();
210
+                break;
209 211
         }
210 212
     }
211 213
 
@@ -248,14 +250,14 @@ public class WizardPanel extends JPanel implements ActionListener {
248 250
 
249 251
     /** Updates the progress label. */
250 252
     private void updateProgressLabel() {
251
-        progressLabel.setText("Step " + (currentStep + 1) + " of " +
252
-                steps.size());
253
+        progressLabel.setText("Step " + (currentStep + 1) + " of "
254
+                + steps.size());
253 255
     }
254 256
 
255 257
     /**
256 258
      * Adds a step listener to the list.
257 259
      *
258
-     * @param listener
260
+     * @param listener Listener to add
259 261
      */
260 262
     public void addStepListener(final StepListener listener) {
261 263
         stepListeners.add(StepListener.class, listener);
@@ -264,7 +266,7 @@ public class WizardPanel extends JPanel implements ActionListener {
264 266
     /**
265 267
      * Removes a step listener from the list.
266 268
      *
267
-     * @param listener
269
+     * @param listener Listener to remove
268 270
      */
269 271
     public void removeStepListener(final StepListener listener) {
270 272
         stepListeners.remove(StepListener.class, listener);
@@ -273,7 +275,7 @@ public class WizardPanel extends JPanel implements ActionListener {
273 275
     /**
274 276
      * Adds a wizard listener to the list.
275 277
      *
276
-     * @param listener
278
+     * @param listener Listener to add
277 279
      */
278 280
     public void addWizardListener(final WizardListener listener) {
279 281
         stepListeners.add(WizardListener.class, listener);
@@ -282,7 +284,7 @@ public class WizardPanel extends JPanel implements ActionListener {
282 284
     /**
283 285
      * Removes a wizard listener from the list.
284 286
      *
285
-     * @param listener
287
+     * @param listener Listener to remove
286 288
      */
287 289
     public void removeWizardListener(final WizardListener listener) {
288 290
         stepListeners.remove(WizardListener.class, listener);

+ 9
- 11
src/com/dmdirc/addons/ui_web/WebWindowManager.java View File

@@ -45,23 +45,22 @@ import java.util.Map;
45 45
 public class WebWindowManager implements FrameListener {
46 46
 
47 47
     /** A map of known implementations of window interfaces. */
48
-    private static final Map<Collection<String>, Class<? extends Window>> IMPLEMENTATIONS
49
-            = new HashMap<Collection<String>, Class<? extends Window>>();
48
+    private static final Map<Collection<String>, Class<? extends Window>> IMPLEMENTATIONS = new HashMap<>();
50 49
 
51 50
     static {
52
-        IMPLEMENTATIONS.put(new HashSet<String>(
51
+        IMPLEMENTATIONS.put(new HashSet<>(
53 52
                 Arrays.asList(WindowComponent.TEXTAREA.getIdentifier())),
54 53
                 WebWindow.class);
55
-        IMPLEMENTATIONS.put(new HashSet<String>(
54
+        IMPLEMENTATIONS.put(new HashSet<>(
56 55
                 Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
57 56
                 WindowComponent.INPUTFIELD.getIdentifier())),
58 57
                 WebInputWindow.class);
59
-        IMPLEMENTATIONS.put(new HashSet<String>(
58
+        IMPLEMENTATIONS.put(new HashSet<>(
60 59
                 Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
61 60
                 WindowComponent.INPUTFIELD.getIdentifier(),
62 61
                 WindowComponent.CERTIFICATE_VIEWER.getIdentifier())),
63 62
                 WebInputWindow.class);
64
-        IMPLEMENTATIONS.put(new HashSet<String>(
63
+        IMPLEMENTATIONS.put(new HashSet<>(
65 64
                 Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
66 65
                 WindowComponent.INPUTFIELD.getIdentifier(),
67 66
                 WindowComponent.TOPICBAR.getIdentifier(),
@@ -76,17 +75,16 @@ public class WebWindowManager implements FrameListener {
76 75
     private long nextId = 0l;
77 76
 
78 77
     /** Map of known windows. */
79
-    private final Map<FrameContainer, WebWindow> windows
80
-            = new HashMap<FrameContainer, WebWindow>();
78
+    private final Map<FrameContainer, WebWindow> windows = new HashMap<>();
81 79
 
82 80
     /** A map of window IDs to their windows. */
83
-    private final Map<String, WebWindow> windowsById
84
-            = new HashMap<String, WebWindow>();
81
+    private final Map<String, WebWindow> windowsById = new HashMap<>();
85 82
 
86 83
     /**
87 84
      * Creates a new window manager for the specified controller.
88 85
      *
89 86
      * @param controller The Web UI controller that owns this manager
87
+     * @param windowManager Window manager to add/remove windows
90 88
      */
91 89
     public WebWindowManager(final WebInterfaceUI controller, final WindowManager windowManager) {
92 90
         this.controller = controller;
@@ -181,7 +179,7 @@ public class WebWindowManager implements FrameListener {
181 179
 
182 180
             windows.put(window, frame);
183 181
             windowsById.put(id, frame);
184
-        } catch (Exception ex) {
182
+        } catch (ReflectiveOperationException ex) {
185 183
             Logger.appError(ErrorLevel.MEDIUM, "Unable to create window of type "
186 184
                     + clazz.getCanonicalName() + " for web ui", ex);
187 185
         }

Loading…
Cancel
Save