瀏覽代碼

Style fixes

git-svn-id: http://svn.dmdirc.com/trunk@565 00569f92-eb28-0410-84fd-f71c24880f
tags/0.3
Gregory Holmes 17 年之前
父節點
當前提交
5141585fd1
共有 23 個文件被更改,包括 38 次插入33 次删除
  1. 0
    1
      src/uk/org/ownage/dmdirc/Raw.java
  2. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/QueryCommandParser.java
  3. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/ServerCommandParser.java
  4. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/Test.java
  5. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/channel/ChannelSettings.java
  6. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/channel/Cycle.java
  7. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/channel/Me.java
  8. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/channel/MeEmpty.java
  9. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/channel/Part.java
  10. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/channel/PartDefault.java
  11. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/query/QueryMe.java
  12. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/query/QueryMeEmpty.java
  13. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/server/Help.java
  14. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/server/Join.java
  15. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/server/LoadFormatter.java
  16. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/server/Nick.java
  17. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/server/Quit.java
  18. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/server/QuitDefault.java
  19. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/server/Raw.java
  20. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/server/ReloadFormatter.java
  21. 1
    1
      src/uk/org/ownage/dmdirc/commandparser/commands/server/SaveFormatter.java
  22. 0
    1
      src/uk/org/ownage/dmdirc/ui/PreferencesDialog.java
  23. 18
    11
      src/uk/org/ownage/dmdirc/ui/framemanager/tree/TreeViewModel.java

+ 0
- 1
src/uk/org/ownage/dmdirc/Raw.java 查看文件

@@ -36,7 +36,6 @@ import uk.org.ownage.dmdirc.commandparser.ServerCommandParser;
36 36
 import uk.org.ownage.dmdirc.logger.ErrorLevel;
37 37
 import uk.org.ownage.dmdirc.logger.Logger;
38 38
 import uk.org.ownage.dmdirc.parser.IRCParser;
39
-import uk.org.ownage.dmdirc.parser.callbacks.CallbackNotFound;
40 39
 import uk.org.ownage.dmdirc.parser.callbacks.interfaces.IDataIn;
41 40
 import uk.org.ownage.dmdirc.parser.callbacks.interfaces.IDataOut;
42 41
 import uk.org.ownage.dmdirc.ui.MainFrame;

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/QueryCommandParser.java 查看文件

@@ -30,7 +30,7 @@ import uk.org.ownage.dmdirc.Server;
30 30
  * both query and server commands.
31 31
  * @author chris
32 32
  */
33
-public class QueryCommandParser extends CommandParser {
33
+public final class QueryCommandParser extends CommandParser {
34 34
     
35 35
     /**
36 36
      * The server instance that this parser is attached to.

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/ServerCommandParser.java 查看文件

@@ -28,7 +28,7 @@ import uk.org.ownage.dmdirc.Server;
28 28
  * A command parser used in the context of a server.
29 29
  * @author chris
30 30
  */
31
-public class ServerCommandParser extends CommandParser {
31
+public final class ServerCommandParser extends CommandParser {
32 32
     
33 33
     /**
34 34
      * The server instance that this parser is attached to.

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/Test.java 查看文件

@@ -31,7 +31,7 @@ import uk.org.ownage.dmdirc.commandparser.ServerCommand;
31 31
  * the IRC parser.
32 32
  * @author chris
33 33
  */
34
-public class Test extends ServerCommand {
34
+public final class Test extends ServerCommand {
35 35
     
36 36
     /** Creates a new instance of Test. */
37 37
     public Test() {

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/channel/ChannelSettings.java 查看文件

@@ -32,7 +32,7 @@ import uk.org.ownage.dmdirc.ui.ChannelSettingsDialog;
32 32
  * Opens the channel settings window for the channel.
33 33
  * @author chris
34 34
  */
35
-public class ChannelSettings extends ChannelCommand {
35
+public final class ChannelSettings extends ChannelCommand {
36 36
     
37 37
     /** Creates a new instance of ChannelSettings. */
38 38
     public ChannelSettings() {

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/channel/Cycle.java 查看文件

@@ -32,7 +32,7 @@ import uk.org.ownage.dmdirc.commandparser.CommandWindow;
32 32
  * The cycle command allows users to rapidly part and rejoin a channel.
33 33
  * @author chris
34 34
  */
35
-public class Cycle extends ChannelCommand {
35
+public final class Cycle extends ChannelCommand {
36 36
     
37 37
     /** Creates a new instance of Cycle. */
38 38
     public Cycle() {

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/channel/Me.java 查看文件

@@ -31,7 +31,7 @@ import uk.org.ownage.dmdirc.commandparser.CommandWindow;
31 31
  * The me command sends a CTCP action to the current channel.
32 32
  * @author chris
33 33
  */
34
-public class Me extends ChannelCommand {
34
+public final class Me extends ChannelCommand {
35 35
     
36 36
     /** Creates a new instance of Me. */
37 37
     public Me() {

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/channel/MeEmpty.java 查看文件

@@ -33,7 +33,7 @@ import uk.org.ownage.dmdirc.commandparser.CommandWindow;
33 33
  * they pass an action to perform.
34 34
  * @author chris
35 35
  */
36
-public class MeEmpty extends ChannelCommand {
36
+public final class MeEmpty extends ChannelCommand {
37 37
     
38 38
     /** Creates a new instance of MeEmpty. */
39 39
     public MeEmpty() {

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/channel/Part.java 查看文件

@@ -31,7 +31,7 @@ import uk.org.ownage.dmdirc.commandparser.CommandWindow;
31 31
  * The part command parts the current channel with a specified part message.
32 32
  * @author chris
33 33
  */
34
-public class Part extends ChannelCommand {
34
+public final class Part extends ChannelCommand {
35 35
     
36 36
     /** Creates a new instance of Part. */
37 37
     public Part() {

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/channel/PartDefault.java 查看文件

@@ -35,7 +35,7 @@ import uk.org.ownage.dmdirc.commandparser.CommandWindow;
35 35
  * and calls the main Part command.
36 36
  * @author chris
37 37
  */
38
-public class PartDefault extends ChannelCommand {
38
+public final class PartDefault extends ChannelCommand {
39 39
     
40 40
     /** Creates a new instance of PartDefault. */
41 41
     public PartDefault() {

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/query/QueryMe.java 查看文件

@@ -31,7 +31,7 @@ import uk.org.ownage.dmdirc.commandparser.QueryCommand;
31 31
  * Represents the /me command used in a query window.
32 32
  * @author chris
33 33
  */
34
-public class QueryMe extends QueryCommand {
34
+public final class QueryMe extends QueryCommand {
35 35
     
36 36
     /** Creates a new instance of QueryMe. */
37 37
     public QueryMe() {

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/query/QueryMeEmpty.java 查看文件

@@ -33,7 +33,7 @@ import uk.org.ownage.dmdirc.commandparser.QueryCommand;
33 33
  * Informs the user of the correct usage
34 34
  * @author chris
35 35
  */
36
-public class QueryMeEmpty extends QueryCommand {
36
+public final class QueryMeEmpty extends QueryCommand {
37 37
     
38 38
     /** Creates a new instance of QueryMeEmpty. */
39 39
     public QueryMeEmpty() {

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/server/Help.java 查看文件

@@ -36,7 +36,7 @@ import uk.org.ownage.dmdirc.ui.QueryFrame;
36 36
  * are only displayed when in a channel window, for example.
37 37
  * @author chris
38 38
  */
39
-public class Help extends ServerCommand {
39
+public final class Help extends ServerCommand {
40 40
     
41 41
     /**
42 42
      * Creates a new instance of Help.

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/server/Join.java 查看文件

@@ -31,7 +31,7 @@ import uk.org.ownage.dmdirc.commandparser.ServerCommand;
31 31
  * of channels.
32 32
  * @author chris
33 33
  */
34
-public class Join extends ServerCommand {
34
+public final class Join extends ServerCommand {
35 35
     
36 36
     /**
37 37
      * Creates a new instance of Join.

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/server/LoadFormatter.java 查看文件

@@ -31,7 +31,7 @@ import uk.org.ownage.dmdirc.ui.messages.Formatter;
31 31
  * Allows the user to load a message formatter from a file.
32 32
  * @author chris
33 33
  */
34
-public class LoadFormatter extends ServerCommand {
34
+public final class LoadFormatter extends ServerCommand {
35 35
     
36 36
     /**
37 37
      * Creates a new instance of LoadFormatter.

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/server/Nick.java 查看文件

@@ -30,7 +30,7 @@ import uk.org.ownage.dmdirc.commandparser.ServerCommand;
30 30
  * Allows the user to change nickname.
31 31
  * @author chris
32 32
  */
33
-public class Nick extends ServerCommand {
33
+public final class Nick extends ServerCommand {
34 34
     
35 35
     /**
36 36
      * Creates a new instance of Join.

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/server/Quit.java 查看文件

@@ -34,7 +34,7 @@ import uk.org.ownage.dmdirc.commandparser.ServerCommand;
34 34
  * supplied) and saves the config file.
35 35
  * @author chris
36 36
  */
37
-public class Quit extends ServerCommand {
37
+public final class Quit extends ServerCommand {
38 38
     
39 39
     /**
40 40
      * Creates a new instance of Quit.

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/server/QuitDefault.java 查看文件

@@ -34,7 +34,7 @@ import uk.org.ownage.dmdirc.commandparser.ServerCommand;
34 34
  * with it as an argument.
35 35
  * @author chris
36 36
  */
37
-public class QuitDefault extends ServerCommand {
37
+public final class QuitDefault extends ServerCommand {
38 38
     
39 39
     /**
40 40
      * Creates a new instance of QuitDefault.

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/server/Raw.java 查看文件

@@ -32,7 +32,7 @@ import uk.org.ownage.dmdirc.commandparser.ServerCommand;
32 32
  * supplied) and saves the config file.
33 33
  * @author chris
34 34
  */
35
-public class Raw extends ServerCommand {
35
+public final class Raw extends ServerCommand {
36 36
     
37 37
     /**
38 38
      * Creates a new instance of Quit.

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/server/ReloadFormatter.java 查看文件

@@ -31,7 +31,7 @@ import uk.org.ownage.dmdirc.ui.messages.Formatter;
31 31
  * Allows the user to reload the message formatter.
32 32
  * @author chris
33 33
  */
34
-public class ReloadFormatter extends ServerCommand {
34
+public final class ReloadFormatter extends ServerCommand {
35 35
     
36 36
     /**
37 37
      * Creates a new instance of ReloadFormatter.

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/commands/server/SaveFormatter.java 查看文件

@@ -31,7 +31,7 @@ import uk.org.ownage.dmdirc.ui.messages.Formatter;
31 31
  * Allows the user to save the message formatter to a file.
32 32
  * @author chris
33 33
  */
34
-public class SaveFormatter extends ServerCommand {
34
+public final class SaveFormatter extends ServerCommand {
35 35
     
36 36
     /**
37 37
      * Creates a new instance of SaveFormatter.

+ 0
- 1
src/uk/org/ownage/dmdirc/ui/PreferencesDialog.java 查看文件

@@ -26,7 +26,6 @@ import java.awt.Frame;
26 26
 
27 27
 /**
28 28
  * Allows the user to modify global client preferences.
29
- * @author chris
30 29
  */
31 30
 public class PreferencesDialog extends StandardDialog {
32 31
     

+ 18
- 11
src/uk/org/ownage/dmdirc/ui/framemanager/tree/TreeViewModel.java 查看文件

@@ -22,7 +22,6 @@
22 22
 
23 23
 package uk.org.ownage.dmdirc.ui.framemanager.tree;
24 24
 
25
-import java.util.Enumeration;
26 25
 
27 26
 import javax.swing.tree.DefaultMutableTreeNode;
28 27
 import javax.swing.tree.DefaultTreeModel;
@@ -71,7 +70,8 @@ public class TreeViewModel extends DefaultTreeModel {
71 70
      * @param newChild child to be added.
72 71
      * @param parent parent child is to be added too.
73 72
      */
74
-    public final void insertNodeInto(final DefaultMutableTreeNode newChild, final DefaultMutableTreeNode parent) {
73
+    public final void insertNodeInto(final DefaultMutableTreeNode newChild,
74
+            final DefaultMutableTreeNode parent) {
75 75
         int index = 0;
76 76
         index = getIndex(newChild, parent);
77 77
         super.insertNodeInto(newChild, parent, index);
@@ -85,18 +85,23 @@ public class TreeViewModel extends DefaultTreeModel {
85 85
      * @param parent node the new node will be inserted into.
86 86
      * @return index where new node is to be inserted.
87 87
      */
88
-    private int getIndex(final DefaultMutableTreeNode newChild, final DefaultMutableTreeNode parent) {      
88
+    private int getIndex(final DefaultMutableTreeNode newChild,
89
+            final DefaultMutableTreeNode parent) {
89 90
         
90
-        if (parent.equals(root) && !Boolean.parseBoolean(Config.getOption("ui", "sortservers"))) {
91
+        if (parent.equals(root) 
92
+        && !Boolean.parseBoolean(Config.getOption("ui", "sortservers"))) {
91 93
             return parent.getChildCount();
92 94
         }
93
-                
95
+        
94 96
         for (int i = 0; i < parent.getChildCount(); i++) {
95
-            DefaultMutableTreeNode child = (DefaultMutableTreeNode) parent.getChildAt(i);
97
+            final DefaultMutableTreeNode child = 
98
+                    (DefaultMutableTreeNode) parent.getChildAt(i);
96 99
             if (sortBefore(newChild, child)) {
97 100
                 return i;
98
-            } else if (!sortAfter(newChild, child) && Boolean.parseBoolean(Config.getOption("ui", "sortwindows"))) {
99
-                if (newChild.getUserObject().toString().compareToIgnoreCase(child.getUserObject().toString()) < 0) {
101
+            } else if (!sortAfter(newChild, child)
102
+            && Boolean.parseBoolean(Config.getOption("ui", "sortwindows"))) {
103
+                if (newChild.getUserObject().toString()
104
+                .compareToIgnoreCase(child.getUserObject().toString()) < 0) {
100 105
                     return i;
101 106
                 }
102 107
             }
@@ -115,7 +120,8 @@ public class TreeViewModel extends DefaultTreeModel {
115 120
     private boolean sortBefore(final DefaultMutableTreeNode newChild,
116 121
             final DefaultMutableTreeNode child) {
117 122
         
118
-        return getPosition(newChild.getUserObject()) < getPosition(child.getUserObject());
123
+        return getPosition(newChild.getUserObject()) 
124
+        < getPosition(child.getUserObject());
119 125
     }
120 126
     
121 127
     /**
@@ -128,8 +134,9 @@ public class TreeViewModel extends DefaultTreeModel {
128 134
     private boolean sortAfter(final DefaultMutableTreeNode newChild,
129 135
             final DefaultMutableTreeNode child) {
130 136
         
131
-        return getPosition(newChild.getUserObject()) > getPosition(child.getUserObject());
132
-    }    
137
+        return getPosition(newChild.getUserObject()) 
138
+        > getPosition(child.getUserObject());
139
+    }
133 140
     
134 141
     /**
135 142
      * Returns an integer corresponding to the expected order of an object.

Loading…
取消
儲存