Bladeren bron

Reports fixes

Javadoc added

git-svn-id: http://svn.dmdirc.com/trunk@1609 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5
Gregory Holmes 17 jaren geleden
bovenliggende
commit
530dabf37b

+ 1
- 1
src/com/dmdirc/ui/ChannelFrame.java Bestand weergeven

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

+ 8
- 3
src/com/dmdirc/ui/MainFrame.java Bestand weergeven

30
 import com.dmdirc.actions.CoreActionType;
30
 import com.dmdirc.actions.CoreActionType;
31
 import com.dmdirc.logger.ErrorLevel;
31
 import com.dmdirc.logger.ErrorLevel;
32
 import com.dmdirc.logger.Logger;
32
 import com.dmdirc.logger.Logger;
33
-import static com.dmdirc.ui.UIUtilities.SMALL_BORDER;
34
 import com.dmdirc.ui.components.Frame;
33
 import com.dmdirc.ui.components.Frame;
35
 import com.dmdirc.ui.components.StatusBar;
34
 import com.dmdirc.ui.components.StatusBar;
36
 import com.dmdirc.ui.dialogs.AboutDialog;
35
 import com.dmdirc.ui.dialogs.AboutDialog;
44
 import com.dmdirc.ui.framemanager.MainFrameManager;
43
 import com.dmdirc.ui.framemanager.MainFrameManager;
45
 import com.dmdirc.ui.framemanager.windowmenu.WindowMenuFrameManager;
44
 import com.dmdirc.ui.framemanager.windowmenu.WindowMenuFrameManager;
46
 import com.dmdirc.ui.interfaces.Window;
45
 import com.dmdirc.ui.interfaces.Window;
46
+import static com.dmdirc.ui.UIUtilities.SMALL_BORDER;
47
 
47
 
48
 import java.awt.BorderLayout;
48
 import java.awt.BorderLayout;
49
 import java.awt.Color;
49
 import java.awt.Color;
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
      * @return Frame manager size.
326
      * @return Frame manager size.
327
      */
327
      */
531
         pack();
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
     private void initSplitPane(final JSplitPane mainSplitPane) {
539
     private void initSplitPane(final JSplitPane mainSplitPane) {
536
         mainSplitPane.setBorder(null);
540
         mainSplitPane.setBorder(null);
537
         
541
         
787
         }
791
         }
788
     }
792
     }
789
     
793
     
794
+    /** Quits the client. */
790
     public void quit() {
795
     public void quit() {
791
         Config.setOption("ui", "frameManagerSize",
796
         Config.setOption("ui", "frameManagerSize",
792
                 String.valueOf(MainFrame.getMainFrame().getFrameManagerSize()));
797
                 String.valueOf(MainFrame.getMainFrame().getFrameManagerSize()));

+ 1
- 1
src/com/dmdirc/ui/QueryFrame.java Bestand weergeven

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

+ 2
- 1
src/com/dmdirc/ui/ServerFrame.java Bestand weergeven

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

+ 7
- 7
src/com/dmdirc/ui/components/InputFrame.java Bestand weergeven

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

+ 7
- 0
src/com/dmdirc/ui/framemanager/FramemanagerPosition.java Bestand weergeven

39
     /** Unknown position. */
39
     /** Unknown position. */
40
     UNKNOWN;
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
     public static FramemanagerPosition getPosition(final String name) {
49
     public static FramemanagerPosition getPosition(final String name) {
43
         if (name == null) {
50
         if (name == null) {
44
             return UNKNOWN;
51
             return UNKNOWN;

+ 5
- 5
src/com/dmdirc/ui/framemanager/buttonbar/ButtonBar.java Bestand weergeven

48
 import java.util.HashMap;
48
 import java.util.HashMap;
49
 import java.util.List;
49
 import java.util.List;
50
 import java.util.Map;
50
 import java.util.Map;
51
-import javax.swing.BorderFactory;
52
 
51
 
52
+import javax.swing.BorderFactory;
53
 import javax.swing.JComponent;
53
 import javax.swing.JComponent;
54
 import javax.swing.JPanel;
54
 import javax.swing.JPanel;
55
 import javax.swing.JToggleButton;
55
 import javax.swing.JToggleButton;
296
      *
296
      *
297
      * @param e A ComponentEvent corresponding to this event.
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
         buttonWidth = position.isHorizontal() ? 150 : (parent.getWidth() - UIUtilities.SMALL_BORDER * 3) / cells;
300
         buttonWidth = position.isHorizontal() ? 150 : (parent.getWidth() - UIUtilities.SMALL_BORDER * 3) / cells;
301
         
301
         
302
         if (position.isHorizontal()) {
302
         if (position.isHorizontal()) {
311
      *
311
      *
312
      * @param e A ComponentEvent corresponding to this event.
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
         // Do nothing
315
         // Do nothing
316
     }
316
     }
317
     
317
     
320
      *
320
      *
321
      * @param e A ComponentEvent corresponding to this event.
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
         // Do nothing
324
         // Do nothing
325
     }
325
     }
326
     
326
     
329
      *
329
      *
330
      * @param e A ComponentEvent corresponding to this event.
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
         // Do nothing
333
         // Do nothing
334
     }
334
     }
335
     
335
     

+ 4
- 3
src/com/dmdirc/ui/framemanager/buttonbar/ButtonComparator.java Bestand weergeven

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

+ 26
- 0
src/com/dmdirc/ui/framemanager/buttonbar/package-info.java Bestand weergeven

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 Bestand weergeven

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 Bestand weergeven

31
  * 
31
  * 
32
  * @author chris
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
      * A version number for this class. It should be changed whenever the class
37
      * A version number for this class. It should be changed whenever the class
63
         this.includeNormal = includeNormal;
63
         this.includeNormal = includeNormal;
64
     }    
64
     }    
65
 
65
 
66
-}
66
+}

+ 2
- 2
src/com/dmdirc/ui/input/InputHandler.java Bestand weergeven

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

+ 1
- 1
src/com/dmdirc/ui/interfaces/ServerWindow.java Bestand weergeven

29
  */
29
  */
30
 public interface ServerWindow extends InputWindow {
30
 public interface ServerWindow extends InputWindow {
31
     
31
     
32
-}
32
+}

+ 0
- 1
src/com/dmdirc/ui/messages/Formatter.java Bestand weergeven

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

Laden…
Annuleren
Opslaan