Pārlūkot izejas kodu

Reports fixes

Javadoc added

git-svn-id: http://svn.dmdirc.com/trunk@1609 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5
Gregory Holmes 17 gadus atpakaļ
vecāks
revīzija
530dabf37b

+ 1
- 1
src/com/dmdirc/ui/ChannelFrame.java Parādīt failu

@@ -30,10 +30,10 @@ import com.dmdirc.commandparser.CommandManager;
30 30
 import com.dmdirc.commandparser.CommandParser;
31 31
 import com.dmdirc.commandparser.ServerCommand;
32 32
 import com.dmdirc.parser.ChannelClientInfo;
33
-import static com.dmdirc.ui.UIUtilities.SMALL_BORDER;
34 33
 import com.dmdirc.ui.components.InputFrame;
35 34
 import com.dmdirc.ui.dialogs.channelsetting.ChannelSettingsDialog;
36 35
 import com.dmdirc.ui.input.InputHandler;
36
+import static com.dmdirc.ui.UIUtilities.SMALL_BORDER;
37 37
 
38 38
 import java.awt.BorderLayout;
39 39
 import java.awt.Color;

+ 8
- 3
src/com/dmdirc/ui/MainFrame.java Parādīt failu

@@ -30,7 +30,6 @@ import com.dmdirc.actions.ActionManager;
30 30
 import com.dmdirc.actions.CoreActionType;
31 31
 import com.dmdirc.logger.ErrorLevel;
32 32
 import com.dmdirc.logger.Logger;
33
-import static com.dmdirc.ui.UIUtilities.SMALL_BORDER;
34 33
 import com.dmdirc.ui.components.Frame;
35 34
 import com.dmdirc.ui.components.StatusBar;
36 35
 import com.dmdirc.ui.dialogs.AboutDialog;
@@ -44,6 +43,7 @@ import com.dmdirc.ui.framemanager.FramemanagerPosition;
44 43
 import com.dmdirc.ui.framemanager.MainFrameManager;
45 44
 import com.dmdirc.ui.framemanager.windowmenu.WindowMenuFrameManager;
46 45
 import com.dmdirc.ui.interfaces.Window;
46
+import static com.dmdirc.ui.UIUtilities.SMALL_BORDER;
47 47
 
48 48
 import java.awt.BorderLayout;
49 49
 import java.awt.Color;
@@ -321,7 +321,7 @@ public final class MainFrame extends JFrame implements WindowListener,
321 321
     }
322 322
     
323 323
     /**
324
-     * Returns the size of the frame manager
324
+     * Returns the size of the frame manager.
325 325
      *
326 326
      * @return Frame manager size.
327 327
      */
@@ -531,7 +531,11 @@ public final class MainFrame extends JFrame implements WindowListener,
531 531
         pack();
532 532
     }
533 533
     
534
-    /** Initialises the split pane. */
534
+    /** 
535
+     * Initialises the split pane. 
536
+     *
537
+     * @param mainSplitPane JSplitPane to initialise
538
+     */
535 539
     private void initSplitPane(final JSplitPane mainSplitPane) {
536 540
         mainSplitPane.setBorder(null);
537 541
         
@@ -787,6 +791,7 @@ public final class MainFrame extends JFrame implements WindowListener,
787 791
         }
788 792
     }
789 793
     
794
+    /** Quits the client. */
790 795
     public void quit() {
791 796
         Config.setOption("ui", "frameManagerSize",
792 797
                 String.valueOf(MainFrame.getMainFrame().getFrameManagerSize()));

+ 1
- 1
src/com/dmdirc/ui/QueryFrame.java Parādīt failu

@@ -25,9 +25,9 @@ package com.dmdirc.ui;
25 25
 import com.dmdirc.Query;
26 26
 import com.dmdirc.commandparser.CommandParser;
27 27
 import com.dmdirc.commandparser.QueryCommandParser;
28
-import static com.dmdirc.ui.UIUtilities.SMALL_BORDER;
29 28
 import com.dmdirc.ui.components.InputFrame;
30 29
 import com.dmdirc.ui.input.InputHandler;
30
+import static com.dmdirc.ui.UIUtilities.SMALL_BORDER;
31 31
 
32 32
 import java.awt.GridBagConstraints;
33 33
 import java.awt.GridBagLayout;

+ 2
- 1
src/com/dmdirc/ui/ServerFrame.java Parādīt failu

@@ -26,10 +26,11 @@ import com.dmdirc.Config;
26 26
 import com.dmdirc.Server;
27 27
 import com.dmdirc.commandparser.CommandParser;
28 28
 import com.dmdirc.commandparser.ServerCommandParser;
29
-import static com.dmdirc.ui.UIUtilities.SMALL_BORDER;
30 29
 import com.dmdirc.ui.components.InputFrame;
31 30
 import com.dmdirc.ui.input.InputHandler;
32 31
 import com.dmdirc.ui.interfaces.ServerWindow;
32
+import static com.dmdirc.ui.UIUtilities.SMALL_BORDER;
33
+
33 34
 import java.awt.BorderLayout;
34 35
 
35 36
 import java.awt.GridBagConstraints;

+ 7
- 7
src/com/dmdirc/ui/components/InputFrame.java Parādīt failu

@@ -22,12 +22,12 @@
22 22
 
23 23
 package com.dmdirc.ui.components;
24 24
 
25
-import static com.dmdirc.ui.UIUtilities.SMALL_BORDER;
26 25
 import com.dmdirc.Config;
27 26
 import com.dmdirc.WritableFrameContainer;
28 27
 import com.dmdirc.identities.ConfigManager;
29 28
 import com.dmdirc.logger.ErrorLevel;
30 29
 import com.dmdirc.logger.Logger;
30
+import static com.dmdirc.ui.UIUtilities.SMALL_BORDER;
31 31
 import com.dmdirc.ui.dialogs.PasteDialog;
32 32
 import com.dmdirc.ui.input.InputHandler;
33 33
 import com.dmdirc.ui.interfaces.InputWindow;
@@ -85,9 +85,6 @@ public abstract class InputFrame extends Frame implements InputWindow,
85 85
     /** The InputHandler for our input field. */
86 86
     private InputHandler inputHandler;
87 87
     
88
-    /** Input field panel. */
89
-    protected JPanel inputPanel;
90
-    
91 88
     /** Frame input field. */
92 89
     private JTextField inputField;
93 90
     
@@ -106,6 +103,9 @@ public abstract class InputFrame extends Frame implements InputWindow,
106 103
     /** Robot for the frame. */
107 104
     private Robot robot;
108 105
     
106
+    /** Input field panel. */
107
+    protected JPanel inputPanel;
108
+    
109 109
     /** Away label. */
110 110
     protected JLabel awayLabel;
111 111
     
@@ -197,7 +197,7 @@ public abstract class InputFrame extends Frame implements InputWindow,
197 197
         
198 198
         // Listen for undo and redo events
199 199
         doc.addUndoableEditListener(new UndoableEditListener() {
200
-            public void undoableEditHappened(UndoableEditEvent evt) {
200
+            public void undoableEditHappened(final UndoableEditEvent evt) {
201 201
                 undo.addEdit(evt.getEdit());
202 202
             }
203 203
         });
@@ -206,7 +206,7 @@ public abstract class InputFrame extends Frame implements InputWindow,
206 206
         getInputField().getActionMap().put("Undo",
207 207
                 new AbstractAction("Undo") {
208 208
             private static final long serialVersionUID = 1;
209
-            public void actionPerformed(ActionEvent evt) {
209
+            public void actionPerformed(final ActionEvent evt) {
210 210
                 try {
211 211
                     if (undo.canUndo()) {
212 212
                         undo.undo();
@@ -224,7 +224,7 @@ public abstract class InputFrame extends Frame implements InputWindow,
224 224
         getInputField().getActionMap().put("Redo",
225 225
                 new AbstractAction("Redo") {
226 226
             private static final long serialVersionUID = 1;
227
-            public void actionPerformed(ActionEvent evt) {
227
+            public void actionPerformed(final ActionEvent evt) {
228 228
                 try {
229 229
                     if (undo.canRedo()) {
230 230
                         undo.redo();

+ 7
- 0
src/com/dmdirc/ui/framemanager/FramemanagerPosition.java Parādīt failu

@@ -39,6 +39,13 @@ public enum FramemanagerPosition {
39 39
     /** Unknown position. */
40 40
     UNKNOWN;
41 41
     
42
+    /**
43
+     * Returns the frame position for s specified string.
44
+     *
45
+     * @param name Name of the string
46
+     *
47
+     * @return FramemanagerPosition for the string
48
+     */
42 49
     public static FramemanagerPosition getPosition(final String name) {
43 50
         if (name == null) {
44 51
             return UNKNOWN;

+ 5
- 5
src/com/dmdirc/ui/framemanager/buttonbar/ButtonBar.java Parādīt failu

@@ -48,8 +48,8 @@ import java.util.Collections;
48 48
 import java.util.HashMap;
49 49
 import java.util.List;
50 50
 import java.util.Map;
51
-import javax.swing.BorderFactory;
52 51
 
52
+import javax.swing.BorderFactory;
53 53
 import javax.swing.JComponent;
54 54
 import javax.swing.JPanel;
55 55
 import javax.swing.JToggleButton;
@@ -296,7 +296,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
296 296
      *
297 297
      * @param e A ComponentEvent corresponding to this event.
298 298
      */
299
-    public void componentResized(ComponentEvent e) {
299
+    public void componentResized(final ComponentEvent e) {
300 300
         buttonWidth = position.isHorizontal() ? 150 : (parent.getWidth() - UIUtilities.SMALL_BORDER * 3) / cells;
301 301
         
302 302
         if (position.isHorizontal()) {
@@ -311,7 +311,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
311 311
      *
312 312
      * @param e A ComponentEvent corresponding to this event.
313 313
      */
314
-    public void componentMoved(ComponentEvent e) {
314
+    public void componentMoved(final ComponentEvent e) {
315 315
         // Do nothing
316 316
     }
317 317
     
@@ -320,7 +320,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
320 320
      *
321 321
      * @param e A ComponentEvent corresponding to this event.
322 322
      */
323
-    public void componentShown(ComponentEvent e) {
323
+    public void componentShown(final ComponentEvent e) {
324 324
         // Do nothing
325 325
     }
326 326
     
@@ -329,7 +329,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
329 329
      *
330 330
      * @param e A ComponentEvent corresponding to this event.
331 331
      */
332
-    public void componentHidden(ComponentEvent e) {
332
+    public void componentHidden(final ComponentEvent e) {
333 333
         // Do nothing
334 334
     }
335 335
     

+ 4
- 3
src/com/dmdirc/ui/framemanager/buttonbar/ButtonComparator.java Parādīt failu

@@ -27,6 +27,7 @@ import com.dmdirc.FrameContainer;
27 27
 import com.dmdirc.Query;
28 28
 import com.dmdirc.Raw;
29 29
 import com.dmdirc.Server;
30
+
30 31
 import java.util.Comparator;
31 32
 
32 33
 /**
@@ -35,7 +36,7 @@ import java.util.Comparator;
35 36
  *
36 37
  * @author chris
37 38
  */
38
-public class ButtonComparator implements Comparator<FrameContainer> {
39
+public final class ButtonComparator implements Comparator<FrameContainer> {
39 40
     
40 41
     /**
41 42
      * Returns an integer corresponding to the expected order of an object.
@@ -58,8 +59,8 @@ public class ButtonComparator implements Comparator<FrameContainer> {
58 59
     }
59 60
     
60 61
     /** {@inheritDoc} */
61
-    public int compare(FrameContainer o1, FrameContainer o2) {
62
+    public int compare(final FrameContainer o1, final FrameContainer o2) {
62 63
         return getPosition(o1) - getPosition(o2);
63 64
     }
64 65
     
65
-}
66
+}

+ 26
- 0
src/com/dmdirc/ui/framemanager/buttonbar/package-info.java Parādīt failu

@@ -0,0 +1,26 @@
1
+/*
2
+ * Copyright (c) 2006-2007 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
+/**
24
+ * Button bar frame manager
25
+ */
26
+package com.dmdirc.ui.framemanager.buttonbar;

+ 26
- 0
src/com/dmdirc/ui/framemanager/windowmenu/package-info.java Parādīt failu

@@ -0,0 +1,26 @@
1
+/*
2
+ * Copyright (c) 2006-2007 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
+/**
24
+ * Window menu list frame manager.
25
+ */
26
+package com.dmdirc.ui.framemanager.windowmenu;

+ 2
- 2
src/com/dmdirc/ui/input/AdditionalTabTargets.java Parādīt failu

@@ -31,7 +31,7 @@ import java.util.ArrayList;
31 31
  * 
32 32
  * @author chris
33 33
  */
34
-public class AdditionalTabTargets extends ArrayList<String> {
34
+public final class AdditionalTabTargets extends ArrayList<String> {
35 35
     
36 36
     /**
37 37
      * A version number for this class. It should be changed whenever the class
@@ -63,4 +63,4 @@ public class AdditionalTabTargets extends ArrayList<String> {
63 63
         this.includeNormal = includeNormal;
64 64
     }    
65 65
 
66
-}
66
+}

+ 2
- 2
src/com/dmdirc/ui/input/InputHandler.java Parādīt failu

@@ -27,8 +27,8 @@ import com.dmdirc.commandparser.Command;
27 27
 import com.dmdirc.commandparser.CommandManager;
28 28
 import com.dmdirc.commandparser.CommandParser;
29 29
 import com.dmdirc.commandparser.IntelligentCommand;
30
-import com.dmdirc.ui.interfaces.InputWindow;
31 30
 import com.dmdirc.ui.components.ColourPickerDialog;
31
+import com.dmdirc.ui.interfaces.InputWindow;
32 32
 import com.dmdirc.ui.messages.Styliser;
33 33
 
34 34
 import java.awt.event.ActionEvent;
@@ -262,7 +262,7 @@ public final class InputHandler implements KeyListener, ActionListener {
262 262
      * Handles tab completion of a string. Called when the user presses tab.
263 263
      */
264 264
     private void doTabCompletion() {
265
-        String text = target.getText();
265
+        final String text = target.getText();
266 266
         
267 267
         if (text.length() == 0) {
268 268
             doNormalTabCompletion(text, 0, 0, null);

+ 1
- 1
src/com/dmdirc/ui/interfaces/ServerWindow.java Parādīt failu

@@ -29,4 +29,4 @@ package com.dmdirc.ui.interfaces;
29 29
  */
30 30
 public interface ServerWindow extends InputWindow {
31 31
     
32
-}
32
+}

+ 0
- 1
src/com/dmdirc/ui/messages/Formatter.java Parādīt failu

@@ -36,7 +36,6 @@ import java.util.InvalidPropertiesFormatException;
36 36
 import java.util.Properties;
37 37
 import java.util.Set;
38 38
 import java.util.UnknownFormatConversionException;
39
-import java.util.logging.Level;
40 39
 
41 40
 /**
42 41
  * The Formatter provides a standard way to format messages for display.

Notiek ielāde…
Atcelt
Saglabāt