瀏覽代碼

Rework FrameContainer/UI interaction

- FrameContainers are no longer parameterised
- Introduced notion of window "Components"
- Removed per-window interfaces - fixes CLIENT-218

Change-Id: Ieefbf2d1e157e3638dbe8fdedbd4f32642061329
Depends-On: Iecbb2941c99a3412dc2eb3b7f56fc584d2db483e
Reviewed-on: http://gerrit.dmdirc.com/1885
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
tags/0.6.6b1
Chris Smith 13 年之前
父節點
當前提交
198a1597cc
共有 100 個文件被更改,包括 452 次插入435 次删除
  1. 9
    6
      src/com/dmdirc/Channel.java
  2. 10
    6
      src/com/dmdirc/CustomWindow.java
  3. 64
    34
      src/com/dmdirc/FrameContainer.java
  4. 13
    13
      src/com/dmdirc/FrameContainerComparator.java
  5. 7
    2
      src/com/dmdirc/GlobalWindow.java
  6. 8
    7
      src/com/dmdirc/MessageTarget.java
  7. 8
    5
      src/com/dmdirc/Query.java
  8. 6
    3
      src/com/dmdirc/Raw.java
  9. 18
    7
      src/com/dmdirc/Server.java
  10. 14
    14
      src/com/dmdirc/WritableFrameContainer.java
  11. 6
    10
      src/com/dmdirc/actions/ActionModel.java
  12. 5
    5
      src/com/dmdirc/actions/ActionSubstitutor.java
  13. 2
    2
      src/com/dmdirc/actions/CoreActionComponent.java
  14. 3
    3
      src/com/dmdirc/commandparser/commands/Command.java
  15. 1
    1
      src/com/dmdirc/commandparser/commands/ExternalCommand.java
  16. 1
    1
      src/com/dmdirc/commandparser/commands/channel/Ban.java
  17. 1
    1
      src/com/dmdirc/commandparser/commands/channel/ChannelSettings.java
  18. 1
    1
      src/com/dmdirc/commandparser/commands/channel/Cycle.java
  19. 2
    2
      src/com/dmdirc/commandparser/commands/channel/Invite.java
  20. 1
    1
      src/com/dmdirc/commandparser/commands/channel/KickReason.java
  21. 2
    2
      src/com/dmdirc/commandparser/commands/channel/Mode.java
  22. 2
    2
      src/com/dmdirc/commandparser/commands/channel/Names.java
  23. 1
    1
      src/com/dmdirc/commandparser/commands/channel/Part.java
  24. 1
    1
      src/com/dmdirc/commandparser/commands/channel/SetNickColour.java
  25. 2
    2
      src/com/dmdirc/commandparser/commands/channel/ShowTopic.java
  26. 3
    4
      src/com/dmdirc/commandparser/commands/chat/Me.java
  27. 3
    4
      src/com/dmdirc/commandparser/commands/context/ChatCommandContext.java
  28. 4
    4
      src/com/dmdirc/commandparser/commands/flags/CommandFlagHandler.java
  29. 4
    4
      src/com/dmdirc/commandparser/commands/global/Active.java
  30. 1
    1
      src/com/dmdirc/commandparser/commands/global/AliasCommand.java
  31. 1
    1
      src/com/dmdirc/commandparser/commands/global/AllServers.java
  32. 1
    1
      src/com/dmdirc/commandparser/commands/global/Clear.java
  33. 6
    6
      src/com/dmdirc/commandparser/commands/global/Echo.java
  34. 1
    1
      src/com/dmdirc/commandparser/commands/global/Exit.java
  35. 4
    4
      src/com/dmdirc/commandparser/commands/global/Help.java
  36. 2
    2
      src/com/dmdirc/commandparser/commands/global/Ifplugin.java
  37. 1
    1
      src/com/dmdirc/commandparser/commands/global/Input.java
  38. 1
    1
      src/com/dmdirc/commandparser/commands/global/LoadPlugin.java
  39. 2
    2
      src/com/dmdirc/commandparser/commands/global/NewServer.java
  40. 1
    1
      src/com/dmdirc/commandparser/commands/global/Notify.java
  41. 3
    3
      src/com/dmdirc/commandparser/commands/global/OpenWindow.java
  42. 1
    1
      src/com/dmdirc/commandparser/commands/global/ReloadActions.java
  43. 1
    1
      src/com/dmdirc/commandparser/commands/global/ReloadIdentities.java
  44. 1
    1
      src/com/dmdirc/commandparser/commands/global/ReloadPlugin.java
  45. 1
    1
      src/com/dmdirc/commandparser/commands/global/SaveConfig.java
  46. 7
    7
      src/com/dmdirc/commandparser/commands/global/Set.java
  47. 1
    1
      src/com/dmdirc/commandparser/commands/global/UnloadPlugin.java
  48. 1
    1
      src/com/dmdirc/commandparser/commands/server/AllChannels.java
  49. 1
    1
      src/com/dmdirc/commandparser/commands/server/Away.java
  50. 1
    1
      src/com/dmdirc/commandparser/commands/server/Back.java
  51. 1
    1
      src/com/dmdirc/commandparser/commands/server/ChangeServer.java
  52. 1
    1
      src/com/dmdirc/commandparser/commands/server/Ctcp.java
  53. 1
    1
      src/com/dmdirc/commandparser/commands/server/Disconnect.java
  54. 5
    5
      src/com/dmdirc/commandparser/commands/server/Ignore.java
  55. 7
    7
      src/com/dmdirc/commandparser/commands/server/JoinChannelCommand.java
  56. 1
    1
      src/com/dmdirc/commandparser/commands/server/Message.java
  57. 1
    1
      src/com/dmdirc/commandparser/commands/server/Nick.java
  58. 1
    1
      src/com/dmdirc/commandparser/commands/server/Notice.java
  59. 1
    1
      src/com/dmdirc/commandparser/commands/server/OpenQuery.java
  60. 1
    1
      src/com/dmdirc/commandparser/commands/server/Raw.java
  61. 1
    1
      src/com/dmdirc/commandparser/commands/server/RawServerCommand.java
  62. 1
    1
      src/com/dmdirc/commandparser/commands/server/Reconnect.java
  63. 1
    1
      src/com/dmdirc/commandparser/commands/server/ServerSettings.java
  64. 1
    1
      src/com/dmdirc/commandparser/commands/server/Umode.java
  65. 2
    2
      src/com/dmdirc/commandparser/parsers/ChannelCommandParser.java
  66. 5
    5
      src/com/dmdirc/commandparser/parsers/ChatCommandParser.java
  67. 8
    8
      src/com/dmdirc/commandparser/parsers/CommandParser.java
  68. 3
    3
      src/com/dmdirc/commandparser/parsers/GlobalCommandParser.java
  69. 2
    2
      src/com/dmdirc/commandparser/parsers/QueryCommandParser.java
  70. 3
    3
      src/com/dmdirc/commandparser/parsers/ServerCommandParser.java
  71. 1
    1
      src/com/dmdirc/interfaces/FrameCloseListener.java
  72. 3
    4
      src/com/dmdirc/interfaces/FrameInfoListener.java
  73. 2
    2
      src/com/dmdirc/interfaces/NotificationListener.java
  74. 1
    3
      src/com/dmdirc/interfaces/SelectionListener.java
  75. 28
    28
      src/com/dmdirc/ui/WindowManager.java
  76. 62
    0
      src/com/dmdirc/ui/core/components/WindowComponent.java
  77. 0
    30
      src/com/dmdirc/ui/interfaces/ChannelWindow.java
  78. 4
    4
      src/com/dmdirc/ui/interfaces/FrameListener.java
  79. 1
    1
      src/com/dmdirc/ui/interfaces/InputWindow.java
  80. 0
    30
      src/com/dmdirc/ui/interfaces/QueryWindow.java
  81. 0
    30
      src/com/dmdirc/ui/interfaces/ServerWindow.java
  82. 0
    8
      src/com/dmdirc/ui/interfaces/UIController.java
  83. 1
    1
      src/com/dmdirc/ui/interfaces/Window.java
  84. 1
    1
      src/com/dmdirc/ui/messages/Styliser.java
  85. 4
    4
      test/com/dmdirc/WritableFrameContainerTest.java
  86. 3
    3
      test/com/dmdirc/commandparser/commands/channel/BanTest.java
  87. 4
    4
      test/com/dmdirc/commandparser/commands/channel/KickReasonTest.java
  88. 4
    4
      test/com/dmdirc/commandparser/commands/channel/ModeTest.java
  89. 1
    1
      test/com/dmdirc/commandparser/commands/channel/PartTest.java
  90. 3
    3
      test/com/dmdirc/commandparser/commands/channel/SetNickColourTest.java
  91. 1
    1
      test/com/dmdirc/commandparser/commands/chat/MeTest.java
  92. 1
    1
      test/com/dmdirc/commandparser/commands/flags/CommandFlagHandlerTest.java
  93. 2
    2
      test/com/dmdirc/commandparser/commands/global/AliasCommandTest.java
  94. 2
    2
      test/com/dmdirc/commandparser/commands/global/IfpluginTest.java
  95. 4
    4
      test/com/dmdirc/commandparser/commands/global/NewServerTest.java
  96. 1
    1
      test/com/dmdirc/commandparser/commands/server/ChangeServerTest.java
  97. 4
    4
      test/com/dmdirc/harness/TestCommandParser.java
  98. 7
    5
      test/com/dmdirc/harness/TestWritableFrameContainer.java
  99. 19
    19
      test/com/dmdirc/ui/WindowManagerTest.java
  100. 0
    0
      test/com/dmdirc/ui/messages/IntelligentLinkingTest.java

+ 9
- 6
src/com/dmdirc/Channel.java 查看文件

@@ -35,9 +35,10 @@ import com.dmdirc.parser.interfaces.ChannelClientInfo;
35 35
 import com.dmdirc.parser.interfaces.ChannelInfo;
36 36
 import com.dmdirc.parser.interfaces.ClientInfo;
37 37
 import com.dmdirc.ui.WindowManager;
38
+import com.dmdirc.ui.core.components.WindowComponent;
38 39
 import com.dmdirc.ui.input.TabCompleter;
39 40
 import com.dmdirc.ui.input.TabCompletionType;
40
-import com.dmdirc.ui.interfaces.ChannelWindow;
41
+import com.dmdirc.ui.interfaces.InputWindow;
41 42
 import com.dmdirc.ui.messages.ColourManager;
42 43
 import com.dmdirc.ui.messages.Styliser;
43 44
 import com.dmdirc.util.RollingList;
@@ -53,10 +54,8 @@ import java.util.Map;
53 54
  * The Channel class represents the client's view of the channel. It handles
54 55
  * callbacks for channel events from the parser, maintains the corresponding
55 56
  * ChannelWindow, and handles user input for the channel.
56
- *
57
- * @author chris
58 57
  */
59
-public class Channel extends MessageTarget<ChannelWindow> implements ConfigChangeListener {
58
+public class Channel extends MessageTarget implements ConfigChangeListener {
60 59
 
61 60
     /** The parser's pChannel class. */
62 61
     private ChannelInfo channelInfo;
@@ -97,10 +96,14 @@ public class Channel extends MessageTarget<ChannelWindow> implements ConfigChang
97 96
             final boolean focus) {
98 97
         super("channel-inactive", newChannelInfo.getName(),
99 98
                 Styliser.stipControlCodes(newChannelInfo.getName()),
100
-                ChannelWindow.class,
99
+                InputWindow.class,
101 100
                 new ConfigManager(newServer.getProtocol(), newServer.getIrcd(),
102 101
                 newServer.getNetwork(), newServer.getAddress(), newChannelInfo.getName()),
103
-                new ChannelCommandParser(newServer));
102
+                new ChannelCommandParser(newServer),
103
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
104
+                WindowComponent.INPUTFIELD.getIdentifier(),
105
+                WindowComponent.TOPICBAR.getIdentifier(),
106
+                WindowComponent.USERLIST.getIdentifier()));
104 107
 
105 108
         channelInfo = newChannelInfo;
106 109
         server = newServer;

+ 10
- 6
src/com/dmdirc/CustomWindow.java 查看文件

@@ -24,14 +24,15 @@ package com.dmdirc;
24 24
 
25 25
 import com.dmdirc.config.IdentityManager;
26 26
 import com.dmdirc.ui.WindowManager;
27
+import com.dmdirc.ui.core.components.WindowComponent;
27 28
 import com.dmdirc.ui.interfaces.Window;
28 29
 
30
+import java.util.Arrays;
31
+
29 32
 /**
30 33
  * A generic custom window implementation.
31
- *
32
- * @author chris
33 34
  */
34
-public class CustomWindow extends FrameContainer<Window> {
35
+public class CustomWindow extends FrameContainer {
35 36
 
36 37
     /**
37 38
      * Creates a new custom window as a child of the specified window.
@@ -41,8 +42,9 @@ public class CustomWindow extends FrameContainer<Window> {
41 42
      * @param parent The parent of this custom window
42 43
      */
43 44
     public CustomWindow(final String name, final String title,
44
-            final FrameContainer<?> parent) {
45
-        super("custom", name, title, Window.class, parent.getConfigManager());
45
+            final FrameContainer parent) {
46
+        super("custom", name, title, Window.class, parent.getConfigManager(),
47
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier()));
46 48
 
47 49
         WindowManager.addWindow(parent, this);
48 50
     }
@@ -54,7 +56,9 @@ public class CustomWindow extends FrameContainer<Window> {
54 56
      * @param title The parent of this custom window
55 57
      */
56 58
     public CustomWindow(final String name, final String title) {
57
-        super("custom", name, title, Window.class, IdentityManager.getGlobalConfig());
59
+        super("custom", name, title, Window.class,
60
+                IdentityManager.getGlobalConfig(),
61
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier()));
58 62
 
59 63
         WindowManager.addWindow(this);
60 64
     }

+ 64
- 34
src/com/dmdirc/FrameContainer.java 查看文件

@@ -41,41 +41,50 @@ import java.awt.Color;
41 41
 import java.util.Collection;
42 42
 import java.util.Collections;
43 43
 import java.util.Date;
44
+import java.util.HashSet;
44 45
 import java.util.LinkedList;
45 46
 import java.util.List;
47
+import java.util.Set;
46 48
 import java.util.concurrent.CopyOnWriteArrayList;
47 49
 
48 50
 /**
49 51
  * The frame container implements basic methods that should be present in
50 52
  * all objects that handle a frame.
51
- *
52
- * @param <T> The type of window which should be used for this frame container.
53
- * @author chris
54 53
  */
55
-public abstract class FrameContainer<T extends Window> {
54
+public abstract class FrameContainer {
56 55
 
57 56
     /** The colour of our frame's notifications. */
58 57
     protected Color notification = Color.BLACK;
59 58
 
60
-    /** A list of listeners for this containers's events. */
59
+    /** A list of listeners for this container's events. */
61 60
     protected final ListenerList listeners = new ListenerList();
62 61
 
63 62
     /** The document used to store this container's content. */
64 63
     protected IRCDocument document;
65 64
 
66 65
     /** The children of this frame. */
67
-    protected final Collection<FrameContainer<?>> children
68
-            = new CopyOnWriteArrayList<FrameContainer<?>>();
66
+    protected final Collection<FrameContainer> children
67
+            = new CopyOnWriteArrayList<FrameContainer>();
69 68
 
70
-    /** The windows representing of this frame. */
71
-    protected final Collection<T> windows
72
-            = new CopyOnWriteArrayList<T>();
69
+    /**
70
+     * The windows representing of this frame.
71
+     *
72
+     * @deprecated The core should not need to know about UI implementations
73
+     */
74
+    @Deprecated
75
+    protected final Collection<Window> windows
76
+            = new CopyOnWriteArrayList<Window>();
73 77
 
74
-    /** The class of windows we want to represent this container. */
75
-    protected final Class<T> windowClass;
78
+    /**
79
+     * The class of windows we want to represent this container.
80
+     * 
81
+     * @deprecated Replaced with {@link #components}
82
+     */
83
+    @Deprecated
84
+    protected final Class<? extends Window> windowClass;
76 85
 
77 86
     /** The parent of this frame. */
78
-    protected FrameContainer<?> parent;
87
+    protected FrameContainer parent;
79 88
 
80 89
     /** The name of the icon being used for this container's frame. */
81 90
     private String icon;
@@ -91,6 +100,9 @@ public abstract class FrameContainer<T extends Window> {
91 100
 
92 101
     /** The IconChanger for this container. */
93 102
     private final IconChanger changer = new IconChanger();
103
+    
104
+    /** The UI components that this frame requires. */
105
+    private final Set<String> components;
94 106
 
95 107
     /** The styliser used by this container. */
96 108
     private Styliser styliser;
@@ -107,15 +119,17 @@ public abstract class FrameContainer<T extends Window> {
107 119
      * @param title The title of this container
108 120
      * @param windowClass The class of windows required to represent this container
109 121
      * @param config The config manager for this container
122
+     * @param components The UI components that this frame requires
110 123
      * @since 0.6.4
111 124
      */
112 125
     protected FrameContainer(final String icon, final String name,
113
-            final String title, final Class<T> windowClass,
114
-            final ConfigManager config) {
126
+            final String title, final Class<? extends Window> windowClass,
127
+            final ConfigManager config, final Collection<String> components) {
115 128
         this.config = config;
116 129
         this.name = name;
117 130
         this.title = title;
118 131
         this.windowClass = windowClass;
132
+        this.components = new HashSet<String>(components);
119 133
 
120 134
         setIcon(icon);
121 135
     }
@@ -126,7 +140,7 @@ public abstract class FrameContainer<T extends Window> {
126 140
      * @return This frame's children
127 141
      * @since 0.6.4
128 142
      */
129
-    public Collection<FrameContainer<?>> getChildren() {
143
+    public Collection<FrameContainer> getChildren() {
130 144
         return Collections.unmodifiableCollection(children);
131 145
     }
132 146
 
@@ -137,12 +151,12 @@ public abstract class FrameContainer<T extends Window> {
137 151
      * @param target The window to be tested
138 152
      * @return True if the specified container is a child of this one
139 153
      */
140
-    public boolean isChild(final FrameContainer<?> target) {
154
+    public boolean isChild(final FrameContainer target) {
141 155
         if (children.contains(target)) {
142 156
             return true;
143 157
         }
144 158
 
145
-        for (FrameContainer<?> child : children) {
159
+        for (FrameContainer child : children) {
146 160
             if (child.isChild(target)) {
147 161
                 return true;
148 162
             }
@@ -157,7 +171,7 @@ public abstract class FrameContainer<T extends Window> {
157 171
      * @param child The window to be added
158 172
      * @since 0.6.4
159 173
      */
160
-    public void addChild(final FrameContainer<?> child) {
174
+    public void addChild(final FrameContainer child) {
161 175
         children.add(child);
162 176
         child.setParent(this);
163 177
     }
@@ -168,7 +182,7 @@ public abstract class FrameContainer<T extends Window> {
168 182
      * @param child The window to be removed
169 183
      * @since 0.6.4
170 184
      */
171
-    public void removeChild(final FrameContainer<?> child) {
185
+    public void removeChild(final FrameContainer child) {
172 186
         children.remove(child);
173 187
     }
174 188
 
@@ -180,7 +194,7 @@ public abstract class FrameContainer<T extends Window> {
180 194
      * @param parent The new parent for this container
181 195
      * @since 0.6.4
182 196
      */
183
-    public synchronized void setParent(final FrameContainer<?> parent) {
197
+    public synchronized void setParent(final FrameContainer parent) {
184 198
         if (this.parent != null && !parent.equals(this.parent)) {
185 199
             this.parent.removeChild(this);
186 200
         }
@@ -194,7 +208,7 @@ public abstract class FrameContainer<T extends Window> {
194 208
      * @return This container's parent, or null if it is a top level window.
195 209
      * @since 0.6.4
196 210
      */
197
-    public FrameContainer<?> getParent() {
211
+    public FrameContainer getParent() {
198 212
         return parent;
199 213
     }
200 214
 
@@ -213,12 +227,6 @@ public abstract class FrameContainer<T extends Window> {
213 227
         }
214 228
     }
215 229
 
216
-    /** {@inheritDoc} */
217
-    @Override
218
-    public String toString() {
219
-        return name;
220
-    }
221
-
222 230
     /**
223 231
      * Retrieves the name of this container.
224 232
      *
@@ -268,6 +276,17 @@ public abstract class FrameContainer<T extends Window> {
268 276
             listener.titleChanged(this, title);
269 277
         }
270 278
     }
279
+    
280
+    /**
281
+     * Returns the collection of UI component identifiers that this frame
282
+     * container requires for its display.
283
+     *
284
+     * @since 0.6.6
285
+     * @return Collection of UI component identifiers
286
+     */
287
+    public Set<String> getComponents() {
288
+        return Collections.unmodifiableSet(components);
289
+    }
271 290
 
272 291
     /**
273 292
      * Closes this container (and it's associated frame).
@@ -369,7 +388,7 @@ public abstract class FrameContainer<T extends Window> {
369 388
      * @param colour The colour to use for the notification
370 389
      */
371 390
     public void sendNotification(final Color colour) {
372
-        final FrameContainer<?> activeWindow = WindowManager.getActiveWindow();
391
+        final FrameContainer activeWindow = WindowManager.getActiveWindow();
373 392
 
374 393
         if (activeWindow != null && !activeWindow.equals(this)
375 394
                 && !colour.equals(notification)) {
@@ -396,7 +415,9 @@ public abstract class FrameContainer<T extends Window> {
396 415
      *
397 416
      * @param target Window to check ownership of
398 417
      * @return True iff frame is owned by this container, false otherwise
418
+     * @deprecated The core should not need to know about UI implementations
399 419
      */
420
+    @Deprecated
400 421
     @SuppressWarnings("element-type-mismatch")
401 422
     public boolean ownsFrame(final Window target) {
402 423
         return windows.contains(target);
@@ -652,9 +673,11 @@ public abstract class FrameContainer<T extends Window> {
652 673
      * Adds a new window to this container.
653 674
      *
654 675
      * @param window The window to be added
676
+     * @deprecated The core should not need to know about UI methods
655 677
      * @since 0.6.4
656 678
      */
657
-    public void addWindow(final T window) {
679
+    @Deprecated
680
+    public void addWindow(final Window window) {
658 681
         windows.add(window);
659 682
     }
660 683
 
@@ -662,9 +685,11 @@ public abstract class FrameContainer<T extends Window> {
662 685
      * Removes the specified window from this container.
663 686
      *
664 687
      * @param window The window to be removed
688
+     * @deprecated The core should not need to know about UI methods
665 689
      * @since 0.6.4
666 690
      */
667
-    public void removeWindow(final T window) {
691
+    @Deprecated
692
+    public void removeWindow(final Window window) {
668 693
         windows.remove(window);
669 694
     }
670 695
 
@@ -672,10 +697,12 @@ public abstract class FrameContainer<T extends Window> {
672 697
      * Retrieves a collection of windows that represent this container.
673 698
      *
674 699
      * @return The collection of windows currently representing this container
700
+     * @deprecated The core should not need to know about UI methods
675 701
      * @since 0.6.4
676 702
      */
677
-    public Collection<T> getWindows() {
678
-        return windows;
703
+    @Deprecated
704
+    public Collection<Window> getWindows() {
705
+        return Collections.unmodifiableCollection(windows);
679 706
     }
680 707
 
681 708
     /**
@@ -683,9 +710,12 @@ public abstract class FrameContainer<T extends Window> {
683 710
      * container.
684 711
      *
685 712
      * @return This container's window class
713
+     * @deprecated UIs should base their implementations on the value of
714
+     * {@link #getComponents()}
686 715
      * @since 0.6.4
687 716
      */
688
-    public Class<T> getWindowClass() {
717
+    @Deprecated
718
+    public Class<? extends Window> getWindowClass() {
689 719
         return windowClass;
690 720
     }
691 721
 

+ 13
- 13
src/com/dmdirc/FrameContainerComparator.java 查看文件

@@ -30,7 +30,7 @@ import java.util.Comparator;
30 30
 /**
31 31
  * Compares FrameContainers by name.
32 32
  */
33
-public final class FrameContainerComparator implements Comparator<FrameContainer<?>>,
33
+public final class FrameContainerComparator implements Comparator<FrameContainer>,
34 34
         Serializable {
35 35
 
36 36
     /**
@@ -55,22 +55,22 @@ public final class FrameContainerComparator implements Comparator<FrameContainer
55 55
         "item1.toString() returns a non-null value",
56 56
         "item2.toString() returns a non-null value"
57 57
     })
58
-    public int compare(final FrameContainer<?> item1, final FrameContainer<?> item2) {
58
+    public int compare(final FrameContainer item1, final FrameContainer item2) {
59 59
         Logger.assertTrue(item1 != null);
60 60
         Logger.assertTrue(item2 != null);
61
-        Logger.assertTrue(item1.toString() != null);
62
-        Logger.assertTrue(item2.toString() != null);
61
+        Logger.assertTrue(item1.getName() != null);
62
+        Logger.assertTrue(item2.getName() != null);
63 63
 
64 64
         if (sortBefore(item1, item2)) {
65 65
             return -1;
66 66
         } else if (sortAfter(item1, item2)) {
67 67
             return 1;
68 68
         } else {
69
-            final int position = item1.toString().compareToIgnoreCase(
70
-                    item2.toString());
69
+            final int position = item1.getName()
70
+                    .compareToIgnoreCase(item2.getName());
71 71
             if (position == 0) {
72
-                return Integer.valueOf(item1.hashCode()).compareTo(
73
-                        Integer.valueOf(item2.hashCode()));
72
+                return Integer.valueOf(item1.hashCode())
73
+                        .compareTo(Integer.valueOf(item2.hashCode()));
74 74
             } else {
75 75
                 return position;
76 76
             }
@@ -84,8 +84,8 @@ public final class FrameContainerComparator implements Comparator<FrameContainer
84 84
      * @param item2 The existing container to test against
85 85
      * @return True iff the new container should be before the old container
86 86
      */
87
-    private static boolean sortBefore(final FrameContainer<?> item1,
88
-            final FrameContainer<?> item2) {
87
+    private static boolean sortBefore(final FrameContainer item1,
88
+            final FrameContainer item2) {
89 89
 
90 90
         return getPosition(item1) < getPosition(item2);
91 91
     }
@@ -97,8 +97,8 @@ public final class FrameContainerComparator implements Comparator<FrameContainer
97 97
      * @param item2 The existing container to test against
98 98
      * @return True iff the new container should be after the old container
99 99
      */
100
-    private static boolean sortAfter(final FrameContainer<?> item1,
101
-            final FrameContainer<?> item2) {
100
+    private static boolean sortAfter(final FrameContainer item1,
101
+            final FrameContainer item2) {
102 102
         return getPosition(item1) > getPosition(item2);
103 103
     }
104 104
 
@@ -109,7 +109,7 @@ public final class FrameContainerComparator implements Comparator<FrameContainer
109 109
      * @param item The frame container to be tested
110 110
      * @return Position of the frame container
111 111
      */
112
-    private static int getPosition(final FrameContainer<?> item) {
112
+    private static int getPosition(final FrameContainer item) {
113 113
         if (item instanceof GlobalWindow) {
114 114
             return 0;
115 115
         } else if (item instanceof Server) {

+ 7
- 2
src/com/dmdirc/GlobalWindow.java 查看文件

@@ -29,16 +29,19 @@ import com.dmdirc.commandparser.parsers.GlobalCommandParser;
29 29
 import com.dmdirc.config.IdentityManager;
30 30
 import com.dmdirc.interfaces.ConfigChangeListener;
31 31
 import com.dmdirc.ui.WindowManager;
32
+import com.dmdirc.ui.core.components.WindowComponent;
32 33
 import com.dmdirc.ui.input.TabCompleter;
33 34
 import com.dmdirc.ui.input.TabCompletionType;
34 35
 import com.dmdirc.ui.interfaces.InputWindow;
35 36
 
37
+import java.util.Arrays;
38
+
36 39
 /**
37 40
  * A window which can be used to execute global commands.
38 41
  *
39 42
  * @author chris
40 43
  */
41
-public class GlobalWindow extends WritableFrameContainer<InputWindow> {
44
+public class GlobalWindow extends WritableFrameContainer {
42 45
 
43 46
     /** The global window that's in use, if any. */
44 47
     private static GlobalWindow globalWindow;
@@ -50,7 +53,9 @@ public class GlobalWindow extends WritableFrameContainer<InputWindow> {
50 53
     public GlobalWindow() {
51 54
         super("icon", "Global", "(Global)", InputWindow.class,
52 55
                 IdentityManager.getGlobalConfig(),
53
-                GlobalCommandParser.getGlobalCommandParser());
56
+                GlobalCommandParser.getGlobalCommandParser(),
57
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
58
+                WindowComponent.INPUTFIELD.getIdentifier()));
54 59
 
55 60
         tabCompleter = new TabCompleter();
56 61
         tabCompleter.addEntries(TabCompletionType.COMMAND,

+ 8
- 7
src/com/dmdirc/MessageTarget.java 查看文件

@@ -26,14 +26,13 @@ import com.dmdirc.commandparser.parsers.CommandParser;
26 26
 import com.dmdirc.config.ConfigManager;
27 27
 import com.dmdirc.ui.interfaces.InputWindow;
28 28
 
29
+import java.util.Collection;
30
+
29 31
 /**
30 32
  * Defines common methods for objects that you can send messages to (such as
31 33
  * channels and queries).
32
- *
33
- * @param <T> The type of window which should be used for this frame container.
34
- * @author Chris
35 34
  */
36
-public abstract class MessageTarget<T extends InputWindow> extends WritableFrameContainer<T> {
35
+public abstract class MessageTarget extends WritableFrameContainer {
37 36
 
38 37
     /**
39 38
      * Creates a new MessageTarget.
@@ -44,12 +43,14 @@ public abstract class MessageTarget<T extends InputWindow> extends WritableFrame
44 43
      * @param windowClass The class of window to use to represent this container
45 44
      * @param config The config manager to use for this target
46 45
      * @param parser The command parser for this container
46
+     * @param components The UI components that this frame requires
47 47
      * @since 0.6.4
48 48
      */
49 49
     public MessageTarget(final String icon, final String name,
50
-            final String title, final Class<T> windowClass,
51
-            final ConfigManager config, final CommandParser parser) {
52
-        super(icon, name, title, windowClass, config, parser);
50
+            final String title, final Class<? extends InputWindow> windowClass,
51
+            final ConfigManager config, final CommandParser parser,
52
+            final Collection<String> components) {
53
+        super(icon, name, title, windowClass, config, parser, components);
53 54
     }
54 55
 
55 56
     /**

+ 8
- 5
src/com/dmdirc/Query.java 查看文件

@@ -38,11 +38,13 @@ import com.dmdirc.parser.interfaces.callbacks.PrivateActionListener;
38 38
 import com.dmdirc.parser.interfaces.callbacks.PrivateMessageListener;
39 39
 import com.dmdirc.parser.interfaces.callbacks.QuitListener;
40 40
 import com.dmdirc.ui.WindowManager;
41
+import com.dmdirc.ui.core.components.WindowComponent;
41 42
 import com.dmdirc.ui.input.TabCompleter;
42 43
 import com.dmdirc.ui.input.TabCompletionType;
43
-import com.dmdirc.ui.interfaces.QueryWindow;
44
+import com.dmdirc.ui.interfaces.InputWindow;
44 45
 
45 46
 import java.awt.Toolkit;
47
+import java.util.Arrays;
46 48
 import java.util.Date;
47 49
 import java.util.List;
48 50
 
@@ -50,9 +52,8 @@ import java.util.List;
50 52
  * The Query class represents the client's view of a query with another user.
51 53
  * It handles callbacks for query events from the parser, maintains the
52 54
  * corresponding QueryWindow, and handles user input for the query.
53
- * @author chris
54 55
  */
55
-public class Query extends MessageTarget<QueryWindow> implements PrivateActionListener,
56
+public class Query extends MessageTarget implements PrivateActionListener,
56 57
         PrivateMessageListener, NickChangeListener, QuitListener {
57 58
 
58 59
     /** The Server this Query is on. */
@@ -73,8 +74,10 @@ public class Query extends MessageTarget<QueryWindow> implements PrivateActionLi
73 74
     public Query(final Server newServer, final String newHost) {
74 75
         super("query", newServer.parseHostmask(newHost)[0],
75 76
                 newServer.parseHostmask(newHost)[0],
76
-                QueryWindow.class, newServer.getConfigManager(),
77
-                new QueryCommandParser(newServer));
77
+                InputWindow.class, newServer.getConfigManager(),
78
+                new QueryCommandParser(newServer),
79
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
80
+                WindowComponent.INPUTFIELD.getIdentifier()));
78 81
 
79 82
         this.server = newServer;
80 83
         this.host = newHost;

+ 6
- 3
src/com/dmdirc/Raw.java 查看文件

@@ -30,17 +30,18 @@ import com.dmdirc.parser.interfaces.Parser;
30 30
 import com.dmdirc.parser.interfaces.callbacks.DataInListener;
31 31
 import com.dmdirc.parser.interfaces.callbacks.DataOutListener;
32 32
 import com.dmdirc.ui.WindowManager;
33
+import com.dmdirc.ui.core.components.WindowComponent;
33 34
 import com.dmdirc.ui.input.TabCompleter;
34 35
 import com.dmdirc.ui.interfaces.InputWindow;
36
+import java.util.Arrays;
35 37
 
36 38
 import java.util.Date;
37 39
 
38 40
 /**
39 41
  * Handles the raw window (which shows the user raw data being sent and
40 42
  * received to/from the server).
41
- * @author chris
42 43
  */
43
-public final class Raw extends WritableFrameContainer<InputWindow>
44
+public final class Raw extends WritableFrameContainer
44 45
         implements DataInListener, DataOutListener {
45 46
 
46 47
     /** The server object that's being monitored. */
@@ -53,7 +54,9 @@ public final class Raw extends WritableFrameContainer<InputWindow>
53 54
      */
54 55
     public Raw(final Server newServer) {
55 56
         super("raw", "Raw", "(Raw log)", InputWindow.class,
56
-                newServer.getConfigManager(), new ServerCommandParser());
57
+                newServer.getConfigManager(), new ServerCommandParser(),
58
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
59
+                WindowComponent.INPUTFIELD.getIdentifier()));
57 60
 
58 61
         this.server = newServer;
59 62
 

+ 18
- 7
src/com/dmdirc/Server.java 查看文件

@@ -53,9 +53,10 @@ import com.dmdirc.tls.CertificateProblemListener;
53 53
 import com.dmdirc.ui.StatusMessage;
54 54
 import com.dmdirc.ui.WindowManager;
55 55
 import com.dmdirc.ui.core.components.StatusBarManager;
56
+import com.dmdirc.ui.core.components.WindowComponent;
56 57
 import com.dmdirc.ui.input.TabCompleter;
57 58
 import com.dmdirc.ui.input.TabCompletionType;
58
-import com.dmdirc.ui.interfaces.ServerWindow;
59
+import com.dmdirc.ui.interfaces.InputWindow;
59 60
 import com.dmdirc.ui.interfaces.Window;
60 61
 import com.dmdirc.ui.messages.Formatter;
61 62
 
@@ -64,6 +65,7 @@ import java.net.URISyntaxException;
64 65
 import java.security.cert.CertificateException;
65 66
 import java.security.cert.X509Certificate;
66 67
 import java.util.ArrayList;
68
+import java.util.Arrays;
67 69
 import java.util.Collection;
68 70
 import java.util.Collections;
69 71
 import java.util.HashSet;
@@ -84,7 +86,7 @@ import javax.net.ssl.TrustManager;
84 86
  * a list of all channels, queries, etc, and handles parser callbacks pertaining
85 87
  * to the server.
86 88
  */
87
-public class Server extends WritableFrameContainer<ServerWindow>
89
+public class Server extends WritableFrameContainer
88 90
         implements ConfigChangeListener, CertificateProblemListener {
89 91
 
90 92
     // <editor-fold defaultstate="collapsed" desc="Properties">
@@ -149,8 +151,9 @@ public class Server extends WritableFrameContainer<ServerWindow>
149 151
 
150 152
     /** The tabcompleter used for this server. */
151 153
     private final TabCompleter tabCompleter = new TabCompleter();
154
+
152 155
     /** The last activated internal frame for this server. */
153
-    private FrameContainer<?> activeFrame = this;
156
+    private FrameContainer activeFrame = this;
154 157
 
155 158
     /** Our reason for being away, if any. */
156 159
     private String awayMessage;
@@ -189,9 +192,12 @@ public class Server extends WritableFrameContainer<ServerWindow>
189 192
      */
190 193
     public Server(final URI uri, final Identity profile) {
191 194
         super("server-disconnected", getHost(uri), getHost(uri),
192
-                ServerWindow.class,
195
+                InputWindow.class,
193 196
                 new ConfigManager(uri.getScheme(), "", "", uri.getHost()),
194
-                new ServerCommandParser());
197
+                new ServerCommandParser(),
198
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
199
+                WindowComponent.INPUTFIELD.getIdentifier(),
200
+                WindowComponent.CERTIFICATE_VIEWER.getIdentifier()));
195 201
 
196 202
         setConnectionDetails(uri, profile);
197 203
 
@@ -667,8 +673,13 @@ public class Server extends WritableFrameContainer<ServerWindow>
667 673
         return getChannel(chan.getName());
668 674
     }
669 675
 
670
-    /** {@inheritDoc} */
676
+    /**
677
+     * {@inheritDoc}
678
+     *
679
+     * @deprecated The core should not need to know about UI implementations
680
+     */
671 681
     @Override
682
+    @Deprecated
672 683
     @SuppressWarnings("element-type-mismatch")
673 684
     public boolean ownsFrame(final Window target) {
674 685
         // Check if it's our server frame
@@ -691,7 +702,7 @@ public class Server extends WritableFrameContainer<ServerWindow>
691 702
      *
692 703
      * @param source The frame that was activated
693 704
      */
694
-    public void setActiveFrame(final FrameContainer<?> source) {
705
+    public void setActiveFrame(final FrameContainer source) {
695 706
         activeFrame = source;
696 707
     }
697 708
 

+ 14
- 14
src/com/dmdirc/WritableFrameContainer.java 查看文件

@@ -33,6 +33,7 @@ import com.dmdirc.ui.input.TabCompleter;
33 33
 import com.dmdirc.ui.interfaces.InputWindow;
34 34
 
35 35
 import java.util.ArrayList;
36
+import java.util.Collection;
36 37
 import java.util.Date;
37 38
 import java.util.List;
38 39
 
@@ -40,11 +41,8 @@ import java.util.List;
40 41
  * The writable frame container adds additional methods to the frame container
41 42
  * class that allow the sending of lines back to whatever the container's
42 43
  * data source is (e.g. an IRC channel or server).
43
- *
44
- * @param <T> The type of window which should be used for this frame container.
45
- * @author chris
46 44
  */
47
-public abstract class WritableFrameContainer<T extends InputWindow> extends FrameContainer<T> {
45
+public abstract class WritableFrameContainer extends FrameContainer {
48 46
 
49 47
     /** The name of the server notification target. */
50 48
     protected static final String NOTIFICATION_SERVER = "server".intern();
@@ -64,12 +62,14 @@ public abstract class WritableFrameContainer<T extends InputWindow> extends Fram
64 62
      * @param windowClass The class of window to use to represent this container
65 63
      * @param config The config manager for this container
66 64
      * @param parser The command parser for this container
65
+     * @param components The UI components that this frame requires
67 66
      * @since 0.6.4
68 67
      */
69 68
     public WritableFrameContainer(final String icon, final String name,
70
-            final String title, final Class<T> windowClass,
71
-            final ConfigManager config, final CommandParser parser) {
72
-        super(icon, name, title, windowClass, config);
69
+            final String title, final Class<? extends InputWindow> windowClass,
70
+            final ConfigManager config, final CommandParser parser,
71
+            final Collection<String> components) {
72
+        super(icon, name, title, windowClass, config, components);
73 73
 
74 74
         this.commandParser = parser;
75 75
         parser.setOwner(this);
@@ -305,7 +305,7 @@ public abstract class WritableFrameContainer<T extends InputWindow> extends Fram
305 305
         } else if (target.startsWith("window:")) {
306 306
             final String windowName = target.substring(7);
307 307
 
308
-            FrameContainer<?> targetWindow = WindowManager.findCustomWindow(getServer(), windowName);
308
+            FrameContainer targetWindow = WindowManager.findCustomWindow(getServer(), windowName);
309 309
 
310 310
             if (targetWindow == null) {
311 311
                 targetWindow = new CustomWindow(windowName, windowName, getServer());
@@ -321,24 +321,24 @@ public abstract class WritableFrameContainer<T extends InputWindow> extends Fram
321 321
 
322 322
             final String command = String.format(target.substring(12), escapedargs);
323 323
 
324
-            WritableFrameContainer<?> best = this;
324
+            WritableFrameContainer best = this;
325 325
             long besttime = 0;
326 326
 
327
-            final List<FrameContainer<?>> containers = new ArrayList<FrameContainer<?>>();
327
+            final List<FrameContainer> containers = new ArrayList<FrameContainer>();
328 328
 
329 329
             containers.add(getServer());
330 330
             containers.addAll(getServer().getChildren());
331 331
 
332
-            for (FrameContainer<?> container : containers) {
333
-                if (!(container instanceof WritableFrameContainer<?>)) {
332
+            for (FrameContainer container : containers) {
333
+                if (!(container instanceof WritableFrameContainer)) {
334 334
                     continue;
335 335
                 }
336 336
 
337
-                final long time = ((WritableFrameContainer<?>) container)
337
+                final long time = ((WritableFrameContainer) container)
338 338
                         .getCommandParser().getCommandTime(command);
339 339
                 if (time > besttime) {
340 340
                     besttime = time;
341
-                    best = (WritableFrameContainer<?>) container;
341
+                    best = (WritableFrameContainer) container;
342 342
                 }
343 343
             }
344 344
 

+ 6
- 10
src/com/dmdirc/actions/ActionModel.java 查看文件

@@ -34,7 +34,6 @@ import com.dmdirc.ui.interfaces.Window;
34 34
 
35 35
 import java.util.ArrayList;
36 36
 import java.util.Arrays;
37
-import java.util.Collection;
38 37
 import java.util.List;
39 38
 
40 39
 /**
@@ -132,25 +131,22 @@ public class ActionModel {
132 131
             return false;
133 132
         }
134 133
 
135
-        final FrameContainer<?> active = WindowManager.getActiveWindow();
134
+        final FrameContainer active = WindowManager.getActiveWindow();
136 135
         Window window = null;
137
-        WritableFrameContainer<? extends Window> container = null;
136
+        WritableFrameContainer container = null;
138 137
         CommandParser cp = null;
139 138
 
140 139
         if (arguments.length > 0
141
-                && arguments[0] instanceof WritableFrameContainer<?>) {
142
-            container = (WritableFrameContainer<?>) arguments[0];
143
-        } else if (active instanceof WritableFrameContainer<?>) {
144
-            container = (WritableFrameContainer<?>) active;
140
+                && arguments[0] instanceof WritableFrameContainer) {
141
+            container = (WritableFrameContainer) arguments[0];
142
+        } else if (active instanceof WritableFrameContainer) {
143
+            container = (WritableFrameContainer) active;
145 144
         } else if (ServerManager.getServerManager().numServers() > 0) {
146 145
             container = ServerManager.getServerManager().getServers().get(0);
147 146
         }
148 147
 
149 148
         if (arguments.length > 0 && arguments[0] instanceof Window) {
150 149
             window = (Window) arguments[0];
151
-        } else if (container != null) {
152
-            final Collection<? extends Window> windows = container.getWindows();
153
-            window = windows.isEmpty() ? null : windows.iterator().next();
154 150
         }
155 151
 
156 152
         if (container == null) {

+ 5
- 5
src/com/dmdirc/actions/ActionSubstitutor.java 查看文件

@@ -264,7 +264,7 @@ public class ActionSubstitutor {
264 264
         }
265 265
 
266 266
         if (hasFrameContainer() && serverMatcher.matches()) {
267
-            final Server server = ((FrameContainer<?>) args[0]).getServer();
267
+            final Server server = ((FrameContainer) args[0]).getServer();
268 268
 
269 269
             if (server != null) {
270 270
                 try {
@@ -295,8 +295,8 @@ public class ActionSubstitutor {
295 295
      */
296 296
     protected String checkConnection(final ActionComponentChain chain,
297 297
             final Object[] args, final Object argument) {
298
-        if ((chain.requiresConnection() && args[0] instanceof FrameContainer<?>
299
-                    && ((FrameContainer<?>) args[0]).getServer().getState()
298
+        if ((chain.requiresConnection() && args[0] instanceof FrameContainer
299
+                    && ((FrameContainer) args[0]).getServer().getState()
300 300
                     == ServerState.CONNECTED) || !chain.requiresConnection()) {
301 301
             final Object res = chain.get(argument);
302 302
             return res == null ? ERR_NULL_CHAIN : res.toString();
@@ -317,8 +317,8 @@ public class ActionSubstitutor {
317 317
      */
318 318
     protected ConfigManager getConfigManager(final Object ... args) {
319 319
         for (Object arg : args) {
320
-            if (arg instanceof FrameContainer<?>) {
321
-                return ((FrameContainer<?>) arg).getConfigManager();
320
+            if (arg instanceof FrameContainer) {
321
+                return ((FrameContainer) arg).getConfigManager();
322 322
             } else if (arg instanceof Window) {
323 323
                 return ((Window) arg).getContainer().getConfigManager();
324 324
             }

+ 2
- 2
src/com/dmdirc/actions/CoreActionComponent.java 查看文件

@@ -480,7 +480,7 @@ public enum CoreActionComponent implements ActionComponent {
480 480
     QUERY_NICK {
481 481
         /** {@inheritDoc} */
482 482
         @Override
483
-        public Object get(final Object argument) { return ((Query) argument).toString(); }
483
+        public Object get(final Object argument) { return ((Query) argument).getName(); }
484 484
         /** {@inheritDoc} */
485 485
         @Override
486 486
         public Class<?> appliesTo() { return Query.class; }
@@ -512,7 +512,7 @@ public enum CoreActionComponent implements ActionComponent {
512 512
     WINDOW_NAME {
513 513
         /** {@inheritDoc} */
514 514
         @Override
515
-        public Object get(final Object argument) { return ((FrameContainer) argument).toString(); }
515
+        public Object get(final Object argument) { return ((FrameContainer) argument).getName(); }
516 516
         /** {@inheritDoc} */
517 517
         @Override
518 518
         public Class<?> appliesTo() { return FrameContainer.class; }

+ 3
- 3
src/com/dmdirc/commandparser/commands/Command.java 查看文件

@@ -48,7 +48,7 @@ public abstract class Command {
48 48
      * @param type The type of message to send
49 49
      * @param args The arguments of the message
50 50
      */
51
-    protected final void sendLine(final FrameContainer<?> target,
51
+    protected final void sendLine(final FrameContainer target,
52 52
             final boolean isSilent, final String type, final Object ... args) {
53 53
         if (!isSilent && target != null) {
54 54
             target.addLine(type, args);
@@ -63,7 +63,7 @@ public abstract class Command {
63 63
      * @param name The name of the command that's raising the error
64 64
      * @param args The arguments that the command accepts or expects
65 65
      */
66
-    protected final void showUsage(final FrameContainer<?> target,
66
+    protected final void showUsage(final FrameContainer target,
67 67
             final boolean isSilent, final String name, final String args) {
68 68
         sendLine(target, isSilent, "commandUsage", CommandManager.getCommandChar(),
69 69
                 name, args);
@@ -132,7 +132,7 @@ public abstract class Command {
132 132
      * @param context The context the command was executed in
133 133
      * @since 0.6.4
134 134
      */
135
-    public abstract void execute(FrameContainer<?> origin,
135
+    public abstract void execute(FrameContainer origin,
136 136
             CommandArguments args, CommandContext context);
137 137
 
138 138
 }

+ 1
- 1
src/com/dmdirc/commandparser/commands/ExternalCommand.java 查看文件

@@ -43,7 +43,7 @@ public interface ExternalCommand {
43 43
      * @param args Arguments passed to this command
44 44
      * @since 0.6.3m1
45 45
      */
46
-    void execute(FrameContainer<?> origin, Server server, String channel,
46
+    void execute(FrameContainer origin, Server server, String channel,
47 47
             boolean isSilent, CommandArguments args);
48 48
 
49 49
 }

+ 1
- 1
src/com/dmdirc/commandparser/commands/channel/Ban.java 查看文件

@@ -49,7 +49,7 @@ public final class Ban extends Command implements IntelligentCommand, CommandInf
49 49
 
50 50
     /** {@inheritDoc} */
51 51
     @Override
52
-    public void execute(final FrameContainer<?> origin,
52
+    public void execute(final FrameContainer origin,
53 53
             final CommandArguments args, final CommandContext context) {
54 54
         final Channel channel = ((ChannelCommandContext) context).getChannel();
55 55
 

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

@@ -48,7 +48,7 @@ public final class ChannelSettings extends Command implements
48 48
     
49 49
     /** {@inheritDoc} */
50 50
     @Override
51
-    public void execute(final FrameContainer<?> origin,
51
+    public void execute(final FrameContainer origin,
52 52
             final CommandArguments args, final CommandContext context) {
53 53
         context.getSource().getController().showChannelSettingsDialog(
54 54
                 ((ChannelCommandContext) context).getChannel());

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

@@ -47,7 +47,7 @@ public final class Cycle extends Command implements CommandInfo {
47 47
     
48 48
     /** {@inheritDoc} */
49 49
     @Override
50
-    public void execute(final FrameContainer<?> origin,
50
+    public void execute(final FrameContainer origin,
51 51
             final CommandArguments args, final CommandContext context) {
52 52
         final Channel channel = ((ChannelCommandContext) context).getChannel();
53 53
         channel.part(args.getArguments().length > 0 ? args.getArgumentsAsString()

+ 2
- 2
src/com/dmdirc/commandparser/commands/channel/Invite.java 查看文件

@@ -51,7 +51,7 @@ public final class Invite extends Command implements ExternalCommand, CommandInf
51 51
 
52 52
     /** {@inheritDoc} */
53 53
     @Override
54
-    public void execute(final FrameContainer<?> origin,
54
+    public void execute(final FrameContainer origin,
55 55
             final CommandArguments args, final CommandContext context) {
56 56
         if (args.getArguments().length < 1) {
57 57
             sendLine(origin, args.isSilent(), FORMAT_ERROR,
@@ -66,7 +66,7 @@ public final class Invite extends Command implements ExternalCommand, CommandInf
66 66
 
67 67
     /** {@inheritDoc} */
68 68
     @Override
69
-    public void execute(final FrameContainer<?> origin, final Server server,
69
+    public void execute(final FrameContainer origin, final Server server,
70 70
             final String channel, final boolean isSilent, final CommandArguments args) {
71 71
         if (args.getArguments().length < 1) {
72 72
             sendLine(origin, isSilent, FORMAT_ERROR,

+ 1
- 1
src/com/dmdirc/commandparser/commands/channel/KickReason.java 查看文件

@@ -52,7 +52,7 @@ public final class KickReason extends Command implements IntelligentCommand,
52 52
 
53 53
     /** {@inheritDoc} */
54 54
     @Override
55
-    public void execute(final FrameContainer<?> origin,
55
+    public void execute(final FrameContainer origin,
56 56
             final CommandArguments args, final CommandContext context) {
57 57
         final Channel channel = ((ChannelCommandContext) context).getChannel();
58 58
         if (args.getArguments().length == 0) {

+ 2
- 2
src/com/dmdirc/commandparser/commands/channel/Mode.java 查看文件

@@ -53,7 +53,7 @@ public final class Mode extends Command implements IntelligentCommand,
53 53
 
54 54
     /** {@inheritDoc} */
55 55
     @Override
56
-    public void execute(final FrameContainer<?> origin,
56
+    public void execute(final FrameContainer origin,
57 57
             final CommandArguments args, final CommandContext context) {
58 58
         final Channel channel = ((ChannelCommandContext) context).getChannel();
59 59
         final ChannelInfo cChannel = channel.getChannelInfo();
@@ -68,7 +68,7 @@ public final class Mode extends Command implements IntelligentCommand,
68 68
 
69 69
     /** {@inheritDoc} */
70 70
     @Override
71
-    public void execute(final FrameContainer<?> origin, final Server server,
71
+    public void execute(final FrameContainer origin, final Server server,
72 72
             final String channel, final boolean isSilent, final CommandArguments args) {
73 73
         if (args.getArguments().length == 0) {
74 74
             server.getParser().sendRawMessage("MODE " + channel);

+ 2
- 2
src/com/dmdirc/commandparser/commands/channel/Names.java 查看文件

@@ -54,7 +54,7 @@ public class Names extends Command implements IntelligentCommand,
54 54
 
55 55
     /** {@inheritDoc} */
56 56
     @Override
57
-    public void execute(final FrameContainer<?> origin,
57
+    public void execute(final FrameContainer origin,
58 58
             final CommandArguments args, final CommandContext context) {
59 59
         final Channel channel = ((ChannelCommandContext) context).getChannel();
60 60
         channel.getServer().getParser().sendRawMessage("NAMES "
@@ -64,7 +64,7 @@ public class Names extends Command implements IntelligentCommand,
64 64
 
65 65
     /** {@inheritDoc} */
66 66
     @Override
67
-    public void execute(final FrameContainer<?> origin, final Server server,
67
+    public void execute(final FrameContainer origin, final Server server,
68 68
             final String channel, final boolean isSilent, final CommandArguments args) {
69 69
         server.getParser().sendRawMessage("NAMES " + channel);
70 70
     }

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

@@ -46,7 +46,7 @@ public final class Part extends Command implements CommandInfo {
46 46
     
47 47
     /** {@inheritDoc} */
48 48
     @Override
49
-    public void execute(final FrameContainer<?> origin,
49
+    public void execute(final FrameContainer origin,
50 50
             final CommandArguments args, final CommandContext context) {
51 51
         final Channel channel = ((ChannelCommandContext) context).getChannel();
52 52
         channel.part(args.getArguments().length > 0 ? args.getArgumentsAsString()

+ 1
- 1
src/com/dmdirc/commandparser/commands/channel/SetNickColour.java 查看文件

@@ -53,7 +53,7 @@ public final class SetNickColour extends Command implements IntelligentCommand,
53 53
 
54 54
     /** {@inheritDoc} */
55 55
     @Override
56
-    public void execute(final FrameContainer<?> origin,
56
+    public void execute(final FrameContainer origin,
57 57
             final CommandArguments args, final CommandContext context) {
58 58
         final Channel channel = ((ChannelCommandContext) context).getChannel();
59 59
 

+ 2
- 2
src/com/dmdirc/commandparser/commands/channel/ShowTopic.java 查看文件

@@ -50,7 +50,7 @@ public final class ShowTopic extends Command implements ExternalCommand,
50 50
 
51 51
     /** {@inheritDoc} */
52 52
     @Override
53
-    public void execute(final FrameContainer<?> origin,
53
+    public void execute(final FrameContainer origin,
54 54
             final CommandArguments args, final CommandContext context) {
55 55
         final Channel channel = ((ChannelCommandContext) context).getChannel();
56 56
         if (args.getArguments().length == 0) {
@@ -72,7 +72,7 @@ public final class ShowTopic extends Command implements ExternalCommand,
72 72
 
73 73
     /** {@inheritDoc} */
74 74
     @Override
75
-    public void execute(final FrameContainer<?> origin, final Server server,
75
+    public void execute(final FrameContainer origin, final Server server,
76 76
             final String channel, final boolean isSilent, final CommandArguments args) {
77 77
         if (args.getArguments().length == 0) {
78 78
             server.getParser().sendRawMessage("TOPIC " + channel);

+ 3
- 4
src/com/dmdirc/commandparser/commands/chat/Me.java 查看文件

@@ -36,7 +36,6 @@ import com.dmdirc.util.validators.ValidationResponse;
36 36
 
37 37
 /**
38 38
  * The me command sends a CTCP action to the current channel.
39
- * @author chris
40 39
  */
41 40
 public final class Me extends Command implements ValidatingCommand, CommandInfo {
42 41
 
@@ -47,9 +46,9 @@ public final class Me extends Command implements ValidatingCommand, CommandInfo
47 46
 
48 47
     /** {@inheritDoc} */
49 48
     @Override
50
-    public void execute(final FrameContainer<?> origin,
49
+    public void execute(final FrameContainer origin,
51 50
             final CommandArguments args, final CommandContext context) {
52
-        final MessageTarget<?> target = ((ChatCommandContext) context).getChat();
51
+        final MessageTarget target = ((ChatCommandContext) context).getChat();
53 52
         if (args.getArguments().length == 0) {
54 53
             showUsage(origin, args.isSilent(), "me", "<action>");
55 54
         } else {
@@ -93,7 +92,7 @@ public final class Me extends Command implements ValidatingCommand, CommandInfo
93 92
         final int length = 2 + arguments.getArgumentsAsString().length();
94 93
 
95 94
         if (origin.getContainer().getServer().getParser().getMaxLength("PRIVMSG",
96
-                origin.getContainer().toString()) <= length) {
95
+                origin.getContainer().getName()) <= length) {
97 96
             return new ValidationResponse("Too long");
98 97
         } else {
99 98
             return new ValidationResponse();

+ 3
- 4
src/com/dmdirc/commandparser/commands/context/ChatCommandContext.java 查看文件

@@ -30,12 +30,11 @@ import com.dmdirc.ui.interfaces.Window;
30 30
  * A command context specific to chat windows.
31 31
  *
32 32
  * @since 0.6.4
33
- * @author chris
34 33
  */
35 34
 public class ChatCommandContext extends ServerCommandContext {
36 35
 
37 36
     /** The chat container associated with this context. */
38
-    private final MessageTarget<?> chat;
37
+    private final MessageTarget chat;
39 38
 
40 39
     /**
41 40
      * Creates a new chat command context.
@@ -45,7 +44,7 @@ public class ChatCommandContext extends ServerCommandContext {
45 44
      * @param chat The chat container associated with the command
46 45
      */
47 46
     public ChatCommandContext(final Window source, final CommandInfo commandInfo,
48
-            final MessageTarget<?> chat) {
47
+            final MessageTarget chat) {
49 48
         super(source, commandInfo, chat.getServer());
50 49
         this.chat = chat;
51 50
     }
@@ -55,7 +54,7 @@ public class ChatCommandContext extends ServerCommandContext {
55 54
      *
56 55
      * @return This context's associated container
57 56
      */
58
-    public MessageTarget<?> getChat() {
57
+    public MessageTarget getChat() {
59 58
         return chat;
60 59
     }
61 60
 }

+ 4
- 4
src/com/dmdirc/commandparser/commands/flags/CommandFlagHandler.java 查看文件

@@ -71,7 +71,7 @@ public class CommandFlagHandler {
71 71
      * @return A corresponding {@link CommandFlagResult} object, or null
72 72
      * if some problem was encountered.
73 73
      */
74
-    public CommandFlagResult process(final FrameContainer<?> origin,
74
+    public CommandFlagResult process(final FrameContainer origin,
75 75
             final CommandArguments arguments) {
76 76
         final Map<CommandFlag, Integer> results = parse(origin, arguments);
77 77
 
@@ -88,7 +88,7 @@ public class CommandFlagHandler {
88 88
      * first argument within the <code>arguments</code> object. If an error
89 89
      * occurs, null is returned.
90 90
      */
91
-    protected Map<CommandFlag, Integer> parse(final FrameContainer<?> origin,
91
+    protected Map<CommandFlag, Integer> parse(final FrameContainer origin,
92 92
             final CommandArguments arguments) {
93 93
         enabledFlags.clear();
94 94
         disabledBy.clear();
@@ -171,7 +171,7 @@ public class CommandFlagHandler {
171 171
      */
172 172
     protected int readArguments(final CommandFlag flag,
173 173
             final CommandArguments arguments, final int offset, final int argCount,
174
-            final FrameContainer<?> origin, final Map<CommandFlag, Integer> results) {
174
+            final FrameContainer origin, final Map<CommandFlag, Integer> results) {
175 175
         final int lastArg = argCount + offset - 1;
176 176
 
177 177
         if (arguments.getArguments().length <= lastArg) {
@@ -251,7 +251,7 @@ public class CommandFlagHandler {
251 251
      * @param messageType The type of the line to be sent
252 252
      * @param args The arguments for the specified messageType
253 253
      */
254
-    protected static void sendLine(final FrameContainer<?> origin, final boolean isSilent,
254
+    protected static void sendLine(final FrameContainer origin, final boolean isSilent,
255 255
             final String messageType, final Object ... args) {
256 256
         if (origin != null && !isSilent) {
257 257
             origin.addLine(messageType, args);

+ 4
- 4
src/com/dmdirc/commandparser/commands/global/Active.java 查看文件

@@ -50,14 +50,14 @@ public final class Active extends Command implements IntelligentCommand,
50 50
     
51 51
     /** {@inheritDoc} */
52 52
     @Override
53
-    public void execute(final FrameContainer<?> origin,
53
+    public void execute(final FrameContainer origin,
54 54
             final CommandArguments args, final CommandContext context) {
55 55
         final String command = args.getArgumentsAsString();
56 56
         
57
-        final FrameContainer<?> window = WindowManager.getActiveWindow();
57
+        final FrameContainer window = WindowManager.getActiveWindow();
58 58
         
59
-        if (window instanceof WritableFrameContainer<?>) {
60
-            ((WritableFrameContainer<?>) window).getCommandParser()
59
+        if (window instanceof WritableFrameContainer) {
60
+            ((WritableFrameContainer) window).getCommandParser()
61 61
                     .parseCommand(window, context.getSource(), command);
62 62
         }
63 63
     }

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/AliasCommand.java 查看文件

@@ -54,7 +54,7 @@ public final class AliasCommand extends Command implements
54 54
 
55 55
     /** {@inheritDoc} */
56 56
     @Override
57
-    public void execute(final FrameContainer<?> origin,
57
+    public void execute(final FrameContainer origin,
58 58
             final CommandArguments args, final CommandContext context) {
59 59
         if (args.getArguments().length < 2) {
60 60
             showUsage(origin, args.isSilent(), "alias", "[--remove] <name> [command]");

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/AllServers.java 查看文件

@@ -48,7 +48,7 @@ public final class AllServers extends Command implements IntelligentCommand,
48 48
 
49 49
     /** {@inheritDoc} */
50 50
     @Override
51
-    public void execute(final FrameContainer<?> origin,
51
+    public void execute(final FrameContainer origin,
52 52
             final CommandArguments args, final CommandContext context) {
53 53
         final String command = args.getArgumentsAsString();
54 54
 

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/Clear.java 查看文件

@@ -48,7 +48,7 @@ public final class Clear extends Command implements IntelligentCommand,
48 48
     
49 49
     /** {@inheritDoc} */
50 50
     @Override
51
-    public void execute(final FrameContainer<?> origin,
51
+    public void execute(final FrameContainer origin,
52 52
             final CommandArguments args, final CommandContext context) {
53 53
         origin.getDocument().clear();
54 54
     }

+ 6
- 6
src/com/dmdirc/commandparser/commands/global/Echo.java 查看文件

@@ -72,7 +72,7 @@ public final class Echo extends Command implements IntelligentCommand,
72 72
 
73 73
     /** {@inheritDoc} */
74 74
     @Override
75
-    public void execute(final FrameContainer<?> origin,
75
+    public void execute(final FrameContainer origin,
76 76
             final CommandArguments args, final CommandContext context) {
77 77
         final CommandFlagResult results = handler.process(origin, args);
78 78
 
@@ -92,12 +92,12 @@ public final class Echo extends Command implements IntelligentCommand,
92 92
 
93 93
         if (results.hasFlag(activeFlag)) {
94 94
             if (!args.isSilent()) {
95
-                final FrameContainer<?> frame = WindowManager.getActiveWindow();
95
+                final FrameContainer frame = WindowManager.getActiveWindow();
96 96
                 frame.addLine(FORMAT_OUTPUT, time, results.getArgumentsAsString());
97 97
             }
98 98
         } else if (results.hasFlag(targetFlag)) {
99
-            FrameContainer<?> frame = null;
100
-            FrameContainer<?> target = origin;
99
+            FrameContainer frame = null;
100
+            FrameContainer target = origin;
101 101
 
102 102
             while (frame == null && target != null) {
103 103
                 frame = WindowManager.findCustomWindow(target,
@@ -159,7 +159,7 @@ public final class Echo extends Command implements IntelligentCommand,
159 159
                 || (arg == 3 && context.getPreviousArgs().get(2).equals("--target")
160 160
                 && context.getPreviousArgs().get(0).equals("--ts"))) {
161 161
 
162
-            final List<FrameContainer<?>> windowList = new ArrayList<FrameContainer<?>>();
162
+            final List<FrameContainer> windowList = new ArrayList<FrameContainer>();
163 163
             final Server currentServer = context.getWindow().getContainer()
164 164
                     .getServer();
165 165
 
@@ -173,7 +173,7 @@ public final class Echo extends Command implements IntelligentCommand,
173 173
 
174 174
             //Global Windows
175 175
             windowList.addAll(WindowManager.getRootWindows());
176
-            for (FrameContainer<?> customWindow : windowList) {
176
+            for (FrameContainer customWindow : windowList) {
177 177
                 if (customWindow instanceof CustomWindow) {
178 178
                     targets.add(customWindow.getName());
179 179
                 }

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/Exit.java 查看文件

@@ -47,7 +47,7 @@ public final class Exit extends Command implements CommandInfo {
47 47
 
48 48
     /** {@inheritDoc} */
49 49
     @Override
50
-    public void execute(final FrameContainer<?> origin,
50
+    public void execute(final FrameContainer origin,
51 51
             final CommandArguments args, final CommandContext context) {
52 52
         Main.quit(args.getArguments().length > 0 ? args.getArgumentsAsString()
53 53
                 : origin.getConfigManager().getOption("general", "closemessage"));

+ 4
- 4
src/com/dmdirc/commandparser/commands/global/Help.java 查看文件

@@ -57,7 +57,7 @@ public final class Help extends Command implements IntelligentCommand, CommandIn
57 57
 
58 58
     /** {@inheritDoc} */
59 59
     @Override
60
-    public void execute(final FrameContainer<?> origin,
60
+    public void execute(final FrameContainer origin,
61 61
             final CommandArguments args, final CommandContext context) {
62 62
         if (args.getArguments().length == 0) {
63 63
             showAllCommands(origin, args.isSilent());
@@ -72,8 +72,8 @@ public final class Help extends Command implements IntelligentCommand, CommandIn
72 72
      * @param origin The window the command was executed in
73 73
      * @param isSilent Whether this command has been silenced or not
74 74
      */
75
-    private void showAllCommands(final FrameContainer<?> origin, final boolean isSilent) {
76
-        final List<String> commands = new ArrayList<String>(((WritableFrameContainer<?>) origin)
75
+    private void showAllCommands(final FrameContainer origin, final boolean isSilent) {
76
+        final List<String> commands = new ArrayList<String>(((WritableFrameContainer) origin)
77 77
                 .getCommandParser().getCommands().keySet());
78 78
 
79 79
         Collections.sort(commands);
@@ -109,7 +109,7 @@ public final class Help extends Command implements IntelligentCommand, CommandIn
109 109
      * @param isSilent Whether this command has been silenced or not
110 110
      * @param name The name of the command to display info for
111 111
      */
112
-    private void showCommand(final FrameContainer<?> origin, final boolean isSilent,
112
+    private void showCommand(final FrameContainer origin, final boolean isSilent,
113 113
             final String name) {
114 114
         Map.Entry<CommandInfo, Command> command = null;
115 115
 

+ 2
- 2
src/com/dmdirc/commandparser/commands/global/Ifplugin.java 查看文件

@@ -54,7 +54,7 @@ public final class Ifplugin extends Command implements IntelligentCommand,
54 54
 
55 55
     /** {@inheritDoc} */
56 56
     @Override
57
-    public void execute(final FrameContainer<?> origin,
57
+    public void execute(final FrameContainer origin,
58 58
             final CommandArguments args, final CommandContext context) {
59 59
         if (args.getArguments().length <= 1) {
60 60
             showUsage(origin, args.isSilent(), "ifplugin", "<[!]plugin> <command>");
@@ -78,7 +78,7 @@ public final class Ifplugin extends Command implements IntelligentCommand,
78 78
                 GlobalCommandParser.getGlobalCommandParser().parseCommand(null,
79 79
                         context.getSource(), args.getArgumentsAsString(1));
80 80
             } else {
81
-                ((WritableFrameContainer<?>) origin).getCommandParser()
81
+                ((WritableFrameContainer) origin).getCommandParser()
82 82
                         .parseCommand(origin, context.getSource(), args.getArgumentsAsString(1));
83 83
             }
84 84
         }

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/Input.java 查看文件

@@ -50,7 +50,7 @@ public class Input extends Command implements IntelligentCommand, CommandInfo {
50 50
 
51 51
     /** {@inheritDoc} */
52 52
     @Override
53
-    public void execute(final FrameContainer<?> origin,
53
+    public void execute(final FrameContainer origin,
54 54
             final CommandArguments args, final CommandContext context) {
55 55
         if (args.getArguments().length == 0) {
56 56
             showUsage(origin, args.isSilent(), "input",

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/LoadPlugin.java 查看文件

@@ -41,7 +41,7 @@ public final class LoadPlugin extends Command implements IntelligentCommand,
41 41
 
42 42
     /** {@inheritDoc} */
43 43
     @Override
44
-    public void execute(final FrameContainer<?> origin,
44
+    public void execute(final FrameContainer origin,
45 45
             final CommandArguments args, final CommandContext context) {
46 46
         if (args.getArguments().length == 0) {
47 47
             showUsage(origin, args.isSilent(), "loadplugin", "<plugin>");

+ 2
- 2
src/com/dmdirc/commandparser/commands/global/NewServer.java 查看文件

@@ -59,7 +59,7 @@ public final class NewServer extends Command implements IntelligentCommand,
59 59
 
60 60
     /** {@inheritDoc} */
61 61
     @Override
62
-    public void execute(final FrameContainer<?> origin,
62
+    public void execute(final FrameContainer origin,
63 63
             final CommandArguments args, final CommandContext context) {
64 64
         URI address = null;
65 65
 
@@ -137,7 +137,7 @@ public final class NewServer extends Command implements IntelligentCommand,
137 137
      *
138 138
      * @return URI is input was valid
139 139
      */
140
-    public static URI parseInput(final FrameContainer<?> origin, final boolean isSilent,
140
+    public static URI parseInput(final FrameContainer origin, final boolean isSilent,
141 141
             final CommandArguments args) {
142 142
 
143 143
         boolean ssl = false;

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/Notify.java 查看文件

@@ -52,7 +52,7 @@ public final class Notify extends Command implements IntelligentCommand,
52 52
 
53 53
     /** {@inheritDoc} */
54 54
     @Override
55
-    public void execute(final FrameContainer<?> origin,
55
+    public void execute(final FrameContainer origin,
56 56
             final CommandArguments args, final CommandContext context) {
57 57
         if (args.getArguments().length == 0) {
58 58
             showUsage(origin, args.isSilent(), "notify", "<colour>");

+ 3
- 3
src/com/dmdirc/commandparser/commands/global/OpenWindow.java 查看文件

@@ -49,10 +49,10 @@ public class OpenWindow extends Command implements IntelligentCommand, CommandIn
49 49
 
50 50
     /** {@inheritDoc} */
51 51
     @Override
52
-    public void execute(final FrameContainer<?> origin,
52
+    public void execute(final FrameContainer origin,
53 53
             final CommandArguments args, final CommandContext context) {
54 54
         int start = 0;
55
-        FrameContainer<?> parent = null;
55
+        FrameContainer parent = null;
56 56
 
57 57
         if (args.getArguments().length > 0 && "--server".equals(args.getArguments()[0])) {
58 58
             if (origin.getServer() == null) {
@@ -72,7 +72,7 @@ public class OpenWindow extends Command implements IntelligentCommand, CommandIn
72 72
             showUsage(origin, args.isSilent(), "openwindow",
73 73
                     "[--server|--child] <name> [title]");
74 74
         } else {
75
-            final FrameContainer<?> window;
75
+            final FrameContainer window;
76 76
 
77 77
             if (parent == null) {
78 78
                 window = WindowManager.findCustomWindow(args.getArguments()[start]);

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/ReloadActions.java 查看文件

@@ -49,7 +49,7 @@ public final class ReloadActions extends Command implements IntelligentCommand,
49 49
     
50 50
     /** {@inheritDoc} */
51 51
     @Override
52
-    public void execute(final FrameContainer<?> origin,
52
+    public void execute(final FrameContainer origin,
53 53
             final CommandArguments args, final CommandContext context) {
54 54
         ActionManager.getActionManager().loadUserActions();
55 55
         sendLine(origin, args.isSilent(), FORMAT_OUTPUT, "Actions reloaded.");

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/ReloadIdentities.java 查看文件

@@ -49,7 +49,7 @@ public class ReloadIdentities extends Command implements IntelligentCommand,
49 49
 
50 50
     /** {@inheritDoc} */
51 51
     @Override    
52
-    public void execute(final FrameContainer<?> origin,
52
+    public void execute(final FrameContainer origin,
53 53
             final CommandArguments args, final CommandContext context) {
54 54
         IdentityManager.loadUser();
55 55
         

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/ReloadPlugin.java 查看文件

@@ -50,7 +50,7 @@ public final class ReloadPlugin extends Command implements IntelligentCommand,
50 50
 
51 51
     /** {@inheritDoc} */
52 52
     @Override
53
-    public void execute(final FrameContainer<?> origin,
53
+    public void execute(final FrameContainer origin,
54 54
             final CommandArguments args, final CommandContext context) {
55 55
         if (args.getArguments().length == 0) {
56 56
             showUsage(origin, args.isSilent(), "reloadplugin", "<plugin>");

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/SaveConfig.java 查看文件

@@ -49,7 +49,7 @@ public final class SaveConfig extends Command implements IntelligentCommand,
49 49
 
50 50
     /** {@inheritDoc} */
51 51
     @Override
52
-    public void execute(final FrameContainer<?> origin,
52
+    public void execute(final FrameContainer origin,
53 53
             final CommandArguments args, final CommandContext context) {
54 54
         IdentityManager.save();
55 55
 

+ 7
- 7
src/com/dmdirc/commandparser/commands/global/Set.java 查看文件

@@ -77,7 +77,7 @@ public final class Set extends Command implements IntelligentCommand, CommandInf
77 77
 
78 78
     /** {@inheritDoc} */
79 79
     @Override
80
-    public void execute(final FrameContainer<?> origin,
80
+    public void execute(final FrameContainer origin,
81 81
             final CommandArguments args, final CommandContext context) {
82 82
         final CommandFlagResult res = handler.process(origin, args);
83 83
 
@@ -152,7 +152,7 @@ public final class Set extends Command implements IntelligentCommand, CommandInf
152 152
      * @param isSilent Whether or not the command is being silenced or not
153 153
      * @param manager The config manager to use to retrieve data
154 154
      */
155
-    private void doDomainList(final FrameContainer<?> origin, final boolean isSilent,
155
+    private void doDomainList(final FrameContainer origin, final boolean isSilent,
156 156
             final ConfigManager manager) {
157 157
         final StringBuffer output = new StringBuffer(67);
158 158
 
@@ -176,7 +176,7 @@ public final class Set extends Command implements IntelligentCommand, CommandInf
176 176
      * @param manager The config manager to use to retrieve data
177 177
      * @param domain The domain to be inspected
178 178
      */
179
-    private void doOptionsList(final FrameContainer<?> origin,
179
+    private void doOptionsList(final FrameContainer origin,
180 180
             final boolean isSilent, final ConfigManager manager, final String domain) {
181 181
         final StringBuffer output = new StringBuffer(24);
182 182
 
@@ -209,7 +209,7 @@ public final class Set extends Command implements IntelligentCommand, CommandInf
209 209
      * @param domain The domain of the option
210 210
      * @param option The name of the option
211 211
      */
212
-    private void doShowOption(final FrameContainer<?> origin,
212
+    private void doShowOption(final FrameContainer origin,
213 213
             final boolean isSilent, final ConfigManager manager,
214 214
             final String domain, final String option) {
215 215
         if (manager.hasOptionString(domain, option)) {
@@ -230,7 +230,7 @@ public final class Set extends Command implements IntelligentCommand, CommandInf
230 230
      * @param option The name of the option
231 231
      * @param newvalue The value the option should be set to
232 232
      */
233
-    private void doSetOption(final FrameContainer<?> origin,
233
+    private void doSetOption(final FrameContainer origin,
234 234
             final boolean isSilent, final Identity identity,
235 235
             final String domain, final String option, final String newvalue) {
236 236
         identity.setOption(domain, option, newvalue);
@@ -250,7 +250,7 @@ public final class Set extends Command implements IntelligentCommand, CommandInf
250 250
      * @param option The name of the option
251 251
      * @param data The data to be appended
252 252
      */
253
-    private void doAppendOption(final FrameContainer<?> origin,
253
+    private void doAppendOption(final FrameContainer origin,
254 254
             final boolean isSilent, final Identity identity, final ConfigManager manager,
255 255
             final String domain, final String option, final String data) {
256 256
         doSetOption(origin, isSilent, identity, domain, option,
@@ -267,7 +267,7 @@ public final class Set extends Command implements IntelligentCommand, CommandInf
267 267
      * @param domain The domain of the option
268 268
      * @param option The name of the option
269 269
      */
270
-    private void doUnsetOption(final FrameContainer<?> origin,
270
+    private void doUnsetOption(final FrameContainer origin,
271 271
             final boolean isSilent, final Identity identity, final String domain,
272 272
             final String option) {
273 273
         identity.unsetOption(domain, option);

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/UnloadPlugin.java 查看文件

@@ -50,7 +50,7 @@ public final class UnloadPlugin extends Command implements IntelligentCommand,
50 50
 
51 51
     /** {@inheritDoc} */
52 52
     @Override
53
-    public void execute(final FrameContainer<?> origin,
53
+    public void execute(final FrameContainer origin,
54 54
             final CommandArguments args, final CommandContext context) {
55 55
         if (args.getArguments().length == 0) {
56 56
             showUsage(origin, args.isSilent(), "unloadplugin", "<plugin>");

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/AllChannels.java 查看文件

@@ -49,7 +49,7 @@ public final class AllChannels extends Command implements IntelligentCommand,
49 49
     
50 50
     /** {@inheritDoc} */
51 51
     @Override
52
-    public void execute(final FrameContainer<?> origin,
52
+    public void execute(final FrameContainer origin,
53 53
             final CommandArguments args, final CommandContext context) {
54 54
         final Server server = ((ServerCommandContext) context).getServer();
55 55
         final String command = args.getArgumentsAsString();

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/Away.java 查看文件

@@ -48,7 +48,7 @@ public final class Away extends Command implements CommandInfo {
48 48
     
49 49
     /** {@inheritDoc} */
50 50
     @Override
51
-    public void execute(final FrameContainer<?> origin,
51
+    public void execute(final FrameContainer origin,
52 52
             final CommandArguments args, final CommandContext context) {
53 53
         final Server server = ((ServerCommandContext) context).getServer();
54 54
         final String line = args.getArgumentsAsString();

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/Back.java 查看文件

@@ -50,7 +50,7 @@ public final class Back extends Command implements IntelligentCommand, CommandIn
50 50
 
51 51
     /** {@inheritDoc} */
52 52
     @Override
53
-    public void execute(final FrameContainer<?> origin,
53
+    public void execute(final FrameContainer origin,
54 54
             final CommandArguments args, final CommandContext context) {
55 55
         final Server server = ((ServerCommandContext) context).getServer();
56 56
         server.getParser().getLocalClient().setBack();

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/ChangeServer.java 查看文件

@@ -51,7 +51,7 @@ public final class ChangeServer extends Command implements CommandInfo {
51 51
 
52 52
     /** {@inheritDoc} */
53 53
     @Override
54
-    public void execute(final FrameContainer<?> origin,
54
+    public void execute(final FrameContainer origin,
55 55
             final CommandArguments args, final CommandContext context) {
56 56
         final Server server = ((ServerCommandContext) context).getServer();
57 57
         URI address = null;

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/Ctcp.java 查看文件

@@ -52,7 +52,7 @@ public final class Ctcp extends Command implements IntelligentCommand,
52 52
     
53 53
     /** {@inheritDoc} */
54 54
     @Override
55
-    public void execute(final FrameContainer<?> origin,
55
+    public void execute(final FrameContainer origin,
56 56
             final CommandArguments args, final CommandContext context) {
57 57
         final Server server = ((ServerCommandContext) context).getServer();
58 58
         if (args.getArguments().length < 2) {

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/Disconnect.java 查看文件

@@ -46,7 +46,7 @@ public final class Disconnect extends Command implements CommandInfo {
46 46
 
47 47
     /** {@inheritDoc} */
48 48
     @Override
49
-    public void execute(final FrameContainer<?> origin,
49
+    public void execute(final FrameContainer origin,
50 50
             final CommandArguments args, final CommandContext context) {
51 51
         final Server server = ((ServerCommandContext) context).getServer();
52 52
         final String line;

+ 5
- 5
src/com/dmdirc/commandparser/commands/server/Ignore.java 查看文件

@@ -55,7 +55,7 @@ public final class Ignore extends Command implements IntelligentCommand,
55 55
     
56 56
     /** {@inheritDoc} */
57 57
     @Override
58
-    public void execute(final FrameContainer<?> origin,
58
+    public void execute(final FrameContainer origin,
59 59
             final CommandArguments args, final CommandContext context) {
60 60
         final Server server = ((ServerCommandContext) context).getServer();
61 61
 
@@ -70,7 +70,7 @@ public final class Ignore extends Command implements IntelligentCommand,
70 70
         }
71 71
     }
72 72
 
73
-    protected void executeView(final FrameContainer<?> origin, final Server server,
73
+    protected void executeView(final FrameContainer origin, final Server server,
74 74
             final boolean isSilent, final CommandArguments args, final boolean forceRegex) {
75 75
         final IgnoreList ignoreList = server.getIgnoreList();
76 76
 
@@ -97,7 +97,7 @@ public final class Ignore extends Command implements IntelligentCommand,
97 97
         }
98 98
     }
99 99
 
100
-    protected void executeAdd(final FrameContainer<?> origin, final Server server,
100
+    protected void executeAdd(final FrameContainer origin, final Server server,
101 101
             final boolean isSilent, final CommandArguments args) {
102 102
         final IgnoreList ignoreList = server.getIgnoreList();
103 103
         final String target = args.getArgumentsAsString();
@@ -107,7 +107,7 @@ public final class Ignore extends Command implements IntelligentCommand,
107 107
         sendLine(origin, args.isSilent(), FORMAT_OUTPUT, "Added " + target + " to the ignore list.");
108 108
     }
109 109
 
110
-    protected void executeRegex(final FrameContainer<?> origin, final Server server,
110
+    protected void executeRegex(final FrameContainer origin, final Server server,
111 111
             final boolean isSilent, final CommandArguments args) {
112 112
         if (args.getArguments().length == 1) {
113 113
             executeView(origin, server, args.isSilent(), args, true);
@@ -130,7 +130,7 @@ public final class Ignore extends Command implements IntelligentCommand,
130 130
         sendLine(origin, args.isSilent(), FORMAT_OUTPUT, "Added " + target + " to the ignore list.");
131 131
     }
132 132
 
133
-    protected void executeRemove(final FrameContainer<?> origin, final Server server,
133
+    protected void executeRemove(final FrameContainer origin, final Server server,
134 134
             final boolean isSilent, final CommandArguments args) {
135 135
         if (args.getArguments().length == 1) {
136 136
             showUsage(origin, args.isSilent(), "ignore", "--remove <host>");

+ 7
- 7
src/com/dmdirc/commandparser/commands/server/JoinChannelCommand.java 查看文件

@@ -53,8 +53,8 @@ public class JoinChannelCommand extends Command implements
53 53
         ActionListener, IntelligentCommand, CommandInfo {
54 54
 
55 55
     /** A map of channel name mentions. */
56
-    private final MapList<FrameContainer<?>, String> mentions
57
-            = new MapList<FrameContainer<?>, String>();
56
+    private final MapList<FrameContainer, String> mentions
57
+            = new MapList<FrameContainer, String>();
58 58
 
59 59
     /**
60 60
      * Creates a new instance of the join channel command.
@@ -68,7 +68,7 @@ public class JoinChannelCommand extends Command implements
68 68
 
69 69
     /** {@inheritDoc} */
70 70
     @Override
71
-    public void execute(final FrameContainer<?> origin,
71
+    public void execute(final FrameContainer origin,
72 72
             final CommandArguments args, final CommandContext context) {
73 73
         final Server server = ((ServerCommandContext) context).getServer();
74 74
         if (args.getArguments().length == 0) {
@@ -121,7 +121,7 @@ public class JoinChannelCommand extends Command implements
121 121
     @Override
122 122
     public void processEvent(final ActionType type, final StringBuffer format,
123 123
             final Object... arguments) {
124
-        final FrameContainer<?> source = (FrameContainer<?>) arguments[0];
124
+        final FrameContainer source = (FrameContainer) arguments[0];
125 125
         final String message = (String) arguments[1];
126 126
 
127 127
         final String[] parts = source.getStyliser().doLinks(message)
@@ -138,7 +138,7 @@ public class JoinChannelCommand extends Command implements
138 138
     @Override
139 139
     public AdditionalTabTargets getSuggestions(final int arg,
140 140
             final IntelligentCommandContext context) {
141
-        final FrameContainer<?> source = context.getWindow().getContainer();
141
+        final FrameContainer source = context.getWindow().getContainer();
142 142
         final Server server = source.getServer();
143 143
         final List<String> results = checkSource(source, true, true);
144 144
 
@@ -184,7 +184,7 @@ public class JoinChannelCommand extends Command implements
184 184
      * @return A list of channel names which have been mentioned in the hierarchy
185 185
      * @since 0.6.4
186 186
      */
187
-    protected List<String> checkSource(final FrameContainer<?> source,
187
+    protected List<String> checkSource(final FrameContainer source,
188 188
             final boolean checkParents, final boolean checkChildren) {
189 189
         final List<String> results = new ArrayList<String>();
190 190
 
@@ -200,7 +200,7 @@ public class JoinChannelCommand extends Command implements
200 200
 
201 201
         // Check the children window
202 202
         if (checkChildren) {
203
-            for (FrameContainer<?> child : source.getChildren()) {
203
+            for (FrameContainer child : source.getChildren()) {
204 204
                 results.addAll(checkSource(child, false, true));
205 205
             }
206 206
         }

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/Message.java 查看文件

@@ -55,7 +55,7 @@ public final class Message extends Command implements IntelligentCommand,
55 55
     
56 56
     /** {@inheritDoc} */
57 57
     @Override
58
-    public void execute(final FrameContainer<?> origin,
58
+    public void execute(final FrameContainer origin,
59 59
             final CommandArguments args, final CommandContext context) {
60 60
         final Server server = ((ServerCommandContext) context).getServer();
61 61
         if (args.getArguments().length < 2) {

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

@@ -52,7 +52,7 @@ public final class Nick extends Command implements IntelligentCommand,
52 52
 
53 53
     /** {@inheritDoc} */
54 54
     @Override
55
-    public void execute(final FrameContainer<?> origin,
55
+    public void execute(final FrameContainer origin,
56 56
             final CommandArguments args, final CommandContext context) {
57 57
         final Server server = ((ServerCommandContext) context).getServer();
58 58
         if (args.getArguments().length == 0) {

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/Notice.java 查看文件

@@ -52,7 +52,7 @@ public final class Notice extends Command implements IntelligentCommand,
52 52
 
53 53
     /** {@inheritDoc} */
54 54
     @Override
55
-    public void execute(final FrameContainer<?> origin,
55
+    public void execute(final FrameContainer origin,
56 56
             final CommandArguments args, final CommandContext context) {
57 57
         final Server server = ((ServerCommandContext) context).getServer();
58 58
         if (args.getArguments().length < 2) {

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/OpenQuery.java 查看文件

@@ -54,7 +54,7 @@ public final class OpenQuery extends Command implements IntelligentCommand,
54 54
 
55 55
     /** {@inheritDoc} */
56 56
     @Override
57
-    public void execute(final FrameContainer<?> origin,
57
+    public void execute(final FrameContainer origin,
58 58
             final CommandArguments args, final CommandContext context) {
59 59
         final Server server = ((ServerCommandContext) context).getServer();
60 60
         if (args.getArguments().length == 0) {

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

@@ -49,7 +49,7 @@ public final class Raw extends Command implements CommandInfo {
49 49
 
50 50
     /** {@inheritDoc} */
51 51
     @Override
52
-    public void execute(final FrameContainer<?> origin,
52
+    public void execute(final FrameContainer origin,
53 53
             final CommandArguments args, final CommandContext context) {
54 54
         final Server server = ((ServerCommandContext) context).getServer();
55 55
         final String line = args.getArgumentsAsString();

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/RawServerCommand.java 查看文件

@@ -57,7 +57,7 @@ public final class RawServerCommand extends Command implements CommandInfo {
57 57
 
58 58
     /** {@inheritDoc} */
59 59
     @Override
60
-    public void execute(final FrameContainer<?> origin,
60
+    public void execute(final FrameContainer origin,
61 61
             final CommandArguments args, final CommandContext context) {
62 62
         final Server server = ((ServerCommandContext) context).getServer();
63 63
         server.getParser().sendRawMessage(myName.toUpperCase() + " " + args.getArgumentsAsString());

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/Reconnect.java 查看文件

@@ -46,7 +46,7 @@ public final class Reconnect extends Command implements CommandInfo {
46 46
 
47 47
     /** {@inheritDoc} */
48 48
     @Override
49
-    public void execute(final FrameContainer<?> origin,
49
+    public void execute(final FrameContainer origin,
50 50
             final CommandArguments args, final CommandContext context) {
51 51
         final Server server = ((ServerCommandContext) context).getServer();
52 52
         final String line;

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/ServerSettings.java 查看文件

@@ -51,7 +51,7 @@ public class ServerSettings extends Command implements IntelligentCommand,
51 51
 
52 52
     /** {@inheritDoc} */
53 53
     @Override
54
-    public void execute(final FrameContainer<?> origin,
54
+    public void execute(final FrameContainer origin,
55 55
             final CommandArguments args, final CommandContext context) {
56 56
         context.getSource().getController().showServerSettingsDialog(
57 57
                 ((ServerCommandContext) context).getServer());

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/Umode.java 查看文件

@@ -50,7 +50,7 @@ public class Umode extends Command implements CommandInfo {
50 50
 
51 51
     /** {@inheritDoc} */
52 52
     @Override
53
-    public void execute(final FrameContainer<?> origin,
53
+    public void execute(final FrameContainer origin,
54 54
             final CommandArguments args, final CommandContext context) {
55 55
         final Server server = ((ServerCommandContext) context).getServer();
56 56
         if (server.getState() != ServerState.CONNECTED) {

+ 2
- 2
src/com/dmdirc/commandparser/parsers/ChannelCommandParser.java 查看文件

@@ -63,7 +63,7 @@ public class ChannelCommandParser extends ChatCommandParser {
63 63
 
64 64
     /** {@inheritDoc} */
65 65
     @Override
66
-    public void setOwner(final FrameContainer<?> owner) {
66
+    public void setOwner(final FrameContainer owner) {
67 67
         if (channel == null) {
68 68
             channel = (Channel) owner;
69 69
         }
@@ -80,7 +80,7 @@ public class ChannelCommandParser extends ChatCommandParser {
80 80
 
81 81
     /** {@inheritDoc} */
82 82
     @Override
83
-    protected void executeCommand(final FrameContainer<?> origin,
83
+    protected void executeCommand(final FrameContainer origin,
84 84
             final Window window, final CommandInfo commandInfo,
85 85
             final Command command, final CommandArguments args) {
86 86
         if (commandInfo.getType() == CommandType.TYPE_CHANNEL) {

+ 5
- 5
src/com/dmdirc/commandparser/parsers/ChatCommandParser.java 查看文件

@@ -49,7 +49,7 @@ public class ChatCommandParser extends ServerCommandParser {
49 49
     private static final long serialVersionUID = 1;
50 50
 
51 51
     /** The container that owns this parser. */
52
-    private MessageTarget<?> owner;
52
+    private MessageTarget owner;
53 53
 
54 54
     /**
55 55
      * Creates a new chat command parser that belongs to a child of the
@@ -63,15 +63,15 @@ public class ChatCommandParser extends ServerCommandParser {
63 63
 
64 64
     /** {@inheritDoc} */
65 65
     @Override
66
-    public void setOwner(final FrameContainer<?> owner) {
66
+    public void setOwner(final FrameContainer owner) {
67 67
         if (this.owner == null) {
68
-            this.owner = (MessageTarget<?>) owner;
68
+            this.owner = (MessageTarget) owner;
69 69
         }
70 70
     }
71 71
 
72 72
     /** {@inheritDoc} */
73 73
     @Override
74
-    protected void executeCommand(final FrameContainer<?> origin,
74
+    protected void executeCommand(final FrameContainer origin,
75 75
             final Window window, final CommandInfo commandInfo,
76 76
             final Command command, final CommandArguments args) {
77 77
         if (commandInfo.getType() == CommandType.TYPE_CHAT) {
@@ -83,7 +83,7 @@ public class ChatCommandParser extends ServerCommandParser {
83 83
 
84 84
     /** {@inheritDoc} */
85 85
     @Override
86
-    protected void handleNonCommand(final FrameContainer<?> origin, final String line) {
86
+    protected void handleNonCommand(final FrameContainer origin, final String line) {
87 87
         owner.sendLine(line);
88 88
     }
89 89
 

+ 8
- 8
src/com/dmdirc/commandparser/parsers/CommandParser.java 查看文件

@@ -85,7 +85,7 @@ public abstract class CommandParser implements Serializable {
85 85
      * @param owner The container which owns this parser
86 86
      * @since 0.6.4
87 87
      */
88
-    public abstract void setOwner(final FrameContainer<?> owner);
88
+    public abstract void setOwner(final FrameContainer owner);
89 89
 
90 90
     /** Loads the relevant commands into the parser. */
91 91
     protected abstract void loadCommands();
@@ -131,7 +131,7 @@ public abstract class CommandParser implements Serializable {
131 131
      * as a channel name
132 132
      * @since 0.6.4
133 133
      */
134
-    public final void parseCommand(final FrameContainer<?> origin,
134
+    public final void parseCommand(final FrameContainer origin,
135 135
             final Window window, final String line, final boolean parseChannel) {
136 136
         final CommandArguments args = new CommandArguments(line);
137 137
 
@@ -166,7 +166,7 @@ public abstract class CommandParser implements Serializable {
166 166
      * @param parseChannel Whether or not to try parsing channel names
167 167
      * @return True iff the command was handled, false otherwise
168 168
      */
169
-    protected boolean handleChannelCommand(final FrameContainer<?> origin,
169
+    protected boolean handleChannelCommand(final FrameContainer origin,
170 170
             final Window window, final CommandArguments args, final boolean parseChannel) {
171 171
         final boolean silent = args.isSilent();
172 172
         final String command = args.getCommandName();
@@ -257,7 +257,7 @@ public abstract class CommandParser implements Serializable {
257 257
      * @param line The line to be parsed
258 258
      * @since 0.6.4
259 259
      */
260
-    public final void parseCommand(final FrameContainer<?> origin,
260
+    public final void parseCommand(final FrameContainer origin,
261 261
             final Window window, final String line) {
262 262
         parseCommand(origin, window, line, true);
263 263
     }
@@ -268,7 +268,7 @@ public abstract class CommandParser implements Serializable {
268 268
      * @param origin The window in which the command was typed
269 269
      * @param line The line to be parsed
270 270
      */
271
-    public final void parseCommandCtrl(final FrameContainer<?> origin, final String line) {
271
+    public final void parseCommandCtrl(final FrameContainer origin, final String line) {
272 272
         handleNonCommand(origin, line);
273 273
     }
274 274
 
@@ -282,7 +282,7 @@ public abstract class CommandParser implements Serializable {
282 282
      * @param args The arguments to the command
283 283
      * @since 0.6.4
284 284
      */
285
-    protected abstract void executeCommand(final FrameContainer<?> origin,
285
+    protected abstract void executeCommand(final FrameContainer origin,
286 286
             final Window window, final CommandInfo commandInfo,
287 287
             final Command command, final CommandArguments args);
288 288
 
@@ -295,7 +295,7 @@ public abstract class CommandParser implements Serializable {
295 295
      * @param args The arguments passed to the command
296 296
      * @since 0.6.3m1
297 297
      */
298
-    protected void handleInvalidCommand(final FrameContainer<?> origin,
298
+    protected void handleInvalidCommand(final FrameContainer origin,
299 299
             final CommandArguments args) {
300 300
         if (origin == null) {
301 301
             ActionManager.getActionManager().triggerEvent(
@@ -319,7 +319,7 @@ public abstract class CommandParser implements Serializable {
319 319
      * @param origin The window in which the command was typed
320 320
      * @param line The line input by the user
321 321
      */
322
-    protected abstract void handleNonCommand(final FrameContainer<?> origin,
322
+    protected abstract void handleNonCommand(final FrameContainer origin,
323 323
             final String line);
324 324
 
325 325
     /**

+ 3
- 3
src/com/dmdirc/commandparser/parsers/GlobalCommandParser.java 查看文件

@@ -53,7 +53,7 @@ public class GlobalCommandParser extends CommandParser {
53 53
 
54 54
     /** {@inheritDoc} */
55 55
     @Override
56
-    public void setOwner(final FrameContainer<?> owner) {
56
+    public void setOwner(final FrameContainer owner) {
57 57
         // Don't care
58 58
     }
59 59
 
@@ -77,7 +77,7 @@ public class GlobalCommandParser extends CommandParser {
77 77
 
78 78
     /** {@inheritDoc} */
79 79
     @Override
80
-    protected void executeCommand(final FrameContainer<?> origin,
80
+    protected void executeCommand(final FrameContainer origin,
81 81
             final Window window, final CommandInfo commandInfo,
82 82
             final Command command, final CommandArguments args) {
83 83
         command.execute(origin, args, new CommandContext(window, commandInfo));
@@ -90,7 +90,7 @@ public class GlobalCommandParser extends CommandParser {
90 90
      * @param line The line input by the user
91 91
      */
92 92
     @Override
93
-    protected void handleNonCommand(final FrameContainer<?> origin, final String line) {
93
+    protected void handleNonCommand(final FrameContainer origin, final String line) {
94 94
         if (origin == null) {
95 95
             Logger.userError(ErrorLevel.MEDIUM, "Invalid global command: " + line);
96 96
         } else {

+ 2
- 2
src/com/dmdirc/commandparser/parsers/QueryCommandParser.java 查看文件

@@ -63,7 +63,7 @@ public class QueryCommandParser extends ChatCommandParser {
63 63
 
64 64
     /** {@inheritDoc} */
65 65
     @Override
66
-    public void setOwner(final FrameContainer<?> owner) {
66
+    public void setOwner(final FrameContainer owner) {
67 67
         if (query == null) {
68 68
             query = (Query) owner;
69 69
         }
@@ -80,7 +80,7 @@ public class QueryCommandParser extends ChatCommandParser {
80 80
 
81 81
     /** {@inheritDoc} */
82 82
     @Override
83
-    protected void executeCommand(final FrameContainer<?> origin,
83
+    protected void executeCommand(final FrameContainer origin,
84 84
             final Window window, final CommandInfo commandInfo,
85 85
             final Command command, final CommandArguments args) {
86 86
         if (commandInfo.getType() == CommandType.TYPE_QUERY) {

+ 3
- 3
src/com/dmdirc/commandparser/parsers/ServerCommandParser.java 查看文件

@@ -54,7 +54,7 @@ public class ServerCommandParser extends GlobalCommandParser {
54 54
 
55 55
     /** {@inheritDoc} */
56 56
     @Override
57
-    public void setOwner(final FrameContainer<?> owner) {
57
+    public void setOwner(final FrameContainer owner) {
58 58
         if (server == null && owner instanceof Server) {
59 59
             server = (Server) owner;
60 60
         }
@@ -70,7 +70,7 @@ public class ServerCommandParser extends GlobalCommandParser {
70 70
 
71 71
     /** {@inheritDoc} */
72 72
     @Override
73
-    protected void executeCommand(final FrameContainer<?> origin,
73
+    protected void executeCommand(final FrameContainer origin,
74 74
             final Window window, final CommandInfo commandInfo,
75 75
             final Command command, final CommandArguments args) {
76 76
         if (commandInfo.getType() == CommandType.TYPE_SERVER) {
@@ -96,7 +96,7 @@ public class ServerCommandParser extends GlobalCommandParser {
96 96
      * @param line The line input by the user
97 97
      */
98 98
     @Override
99
-    protected void handleNonCommand(final FrameContainer<?> origin, final String line) {
99
+    protected void handleNonCommand(final FrameContainer origin, final String line) {
100 100
         server.sendLine(line);
101 101
     }
102 102
 

+ 1
- 1
src/com/dmdirc/interfaces/FrameCloseListener.java 查看文件

@@ -39,6 +39,6 @@ public interface FrameCloseListener {
39 39
      *
40 40
      * @param window The window which is being closed
41 41
      */
42
-    void windowClosing(final FrameContainer<?> window);
42
+    void windowClosing(final FrameContainer window);
43 43
 
44 44
 }

+ 3
- 4
src/com/dmdirc/interfaces/FrameInfoListener.java 查看文件

@@ -31,7 +31,6 @@ import java.util.EventListener;
31 31
  * receive information about frame icon or title changes.
32 32
  *
33 33
  * @since 0.6.3m2
34
- * @author Chris
35 34
  */
36 35
 public interface FrameInfoListener extends EventListener {
37 36
 
@@ -41,7 +40,7 @@ public interface FrameInfoListener extends EventListener {
41 40
      * @param window The window whose icon changed
42 41
      * @param icon The new icon for the window
43 42
      */
44
-    void iconChanged(final FrameContainer<?> window, final String icon);
43
+    void iconChanged(final FrameContainer window, final String icon);
45 44
 
46 45
     /**
47 46
      * Called when a window's name is changed.
@@ -49,7 +48,7 @@ public interface FrameInfoListener extends EventListener {
49 48
      * @param window The window whose name changed
50 49
      * @param name The new name for the window
51 50
      */
52
-    void nameChanged(final FrameContainer<?> window, final String name);
51
+    void nameChanged(final FrameContainer window, final String name);
53 52
 
54 53
     /**
55 54
      * Called when a window's title is changed.
@@ -57,6 +56,6 @@ public interface FrameInfoListener extends EventListener {
57 56
      * @param window The window whose title changed
58 57
      * @param title The new title for the window
59 58
      */
60
-    void titleChanged(final FrameContainer<?> window, final String title);
59
+    void titleChanged(final FrameContainer window, final String title);
61 60
 
62 61
 }

+ 2
- 2
src/com/dmdirc/interfaces/NotificationListener.java 查看文件

@@ -41,12 +41,12 @@ public interface NotificationListener extends EventListener {
41 41
      * @param window The window whose notification has changed
42 42
      * @param colour The new colour of the notification
43 43
      */
44
-    void notificationSet(final FrameContainer<?> window, final Color colour);
44
+    void notificationSet(final FrameContainer window, final Color colour);
45 45
 
46 46
     /**
47 47
      * Called when a notification has been cleared.
48 48
      *
49 49
      * @param window The window whose notification has been cleared
50 50
      */
51
-    void notificationCleared(final FrameContainer<?> window);
51
+    void notificationCleared(final FrameContainer window);
52 52
 }

+ 1
- 3
src/com/dmdirc/interfaces/SelectionListener.java 查看文件

@@ -29,8 +29,6 @@ import java.util.EventListener;
29 29
 /**
30 30
  * Defines the methods that should be implemented by classes which wish to
31 31
  * receive information about frame selection changes.
32
- *
33
- * @author Chris
34 32
  */
35 33
 public interface SelectionListener extends EventListener {
36 34
 
@@ -39,6 +37,6 @@ public interface SelectionListener extends EventListener {
39 37
      *
40 38
      * @param window The window that's now selected
41 39
      */
42
-    void selectionChanged(final FrameContainer<?> window);
40
+    void selectionChanged(final FrameContainer window);
43 41
 
44 42
 }

+ 28
- 28
src/com/dmdirc/ui/WindowManager.java 查看文件

@@ -47,8 +47,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
47 47
 public class WindowManager {
48 48
 
49 49
     /** A list of root windows. */
50
-    private static final List<FrameContainer<?>> ROOT_WINDOWS
51
-            = new CopyOnWriteArrayList<FrameContainer<?>>();
50
+    private static final List<FrameContainer> ROOT_WINDOWS
51
+            = new CopyOnWriteArrayList<FrameContainer>();
52 52
 
53 53
     /** A list of frame listeners. */
54 54
     private static final List<FrameListener> FRAME_LISTENERS
@@ -63,7 +63,7 @@ public class WindowManager {
63 63
             = new WMSelectionListener();
64 64
 
65 65
     /** Active window. */
66
-    private static FrameContainer<?> activeWindow;
66
+    private static FrameContainer activeWindow;
67 67
 
68 68
     /**
69 69
      * Creates a new instance of WindowManager.
@@ -132,7 +132,7 @@ public class WindowManager {
132 132
         "The specified Window is not null",
133 133
         "The specified Window has not already been added"
134 134
     })
135
-    public static void addWindow(final FrameContainer<?> window) {
135
+    public static void addWindow(final FrameContainer window) {
136 136
         addWindow(window, true);
137 137
     }
138 138
 
@@ -147,7 +147,7 @@ public class WindowManager {
147 147
         "The specified Window is not null",
148 148
         "The specified Window has not already been added"
149 149
     })
150
-    public static void addWindow(final FrameContainer<?> window, final boolean focus) {
150
+    public static void addWindow(final FrameContainer window, final boolean focus) {
151 151
         Logger.assertTrue(window != null);
152 152
         Logger.assertTrue(!ROOT_WINDOWS.contains(window));
153 153
 
@@ -168,8 +168,8 @@ public class WindowManager {
168 168
     @Precondition({
169 169
         "The specified Windows are not null"
170 170
     })
171
-    public static void addWindow(final FrameContainer<?> parent,
172
-            final FrameContainer<?> child) {
171
+    public static void addWindow(final FrameContainer parent,
172
+            final FrameContainer child) {
173 173
         addWindow(parent, child, true);
174 174
     }
175 175
 
@@ -186,8 +186,8 @@ public class WindowManager {
186 186
         "The specified parent is in the window hierarchy already",
187 187
         "The specified child is NOT in the window hierarchy already"
188 188
     })
189
-    public static void addWindow(final FrameContainer<?> parent,
190
-            final FrameContainer<?> child, final boolean focus) {
189
+    public static void addWindow(final FrameContainer parent,
190
+            final FrameContainer child, final boolean focus) {
191 191
         Logger.assertTrue(parent != null);
192 192
         Logger.assertTrue(isInHierarchy(parent));
193 193
         Logger.assertTrue(child != null);
@@ -209,7 +209,7 @@ public class WindowManager {
209 209
      * @param target The container to be tested
210 210
      * @return True if the target is in the hierarchy, false otherise
211 211
      */
212
-    protected static boolean isInHierarchy(final FrameContainer<?> target) {
212
+    protected static boolean isInHierarchy(final FrameContainer target) {
213 213
         return target != null && (ROOT_WINDOWS.contains(target)
214 214
                 || isInHierarchy(target.getParent()));
215 215
     }
@@ -233,7 +233,7 @@ public class WindowManager {
233 233
      * @since 0.6.4
234 234
      */
235 235
     @Precondition("The specified Window is not null")
236
-    public static void removeWindow(final FrameContainer<?> window) {
236
+    public static void removeWindow(final FrameContainer window) {
237 237
         removeWindow(window, false);
238 238
     }
239 239
 
@@ -252,7 +252,7 @@ public class WindowManager {
252 252
         "The specified window is not null",
253 253
         "The specified window is in the window hierarchy"
254 254
     })
255
-    public static void removeWindow(final FrameContainer<?> window, final boolean canWait) {
255
+    public static void removeWindow(final FrameContainer window, final boolean canWait) {
256 256
         Logger.assertTrue(isInHierarchy(window));
257 257
         Logger.assertTrue(window != null);
258 258
 
@@ -268,7 +268,7 @@ public class WindowManager {
268 268
                 return;
269 269
             }
270 270
 
271
-            for (FrameContainer<?> child : window.getChildren()) {
271
+            for (FrameContainer child : window.getChildren()) {
272 272
                 child.close();
273 273
             }
274 274
 
@@ -287,7 +287,7 @@ public class WindowManager {
287 287
                 fireSelectionChanged(null);
288 288
             }
289 289
         } else {
290
-            final FrameContainer<?> parent = window.getParent();
290
+            final FrameContainer parent = window.getParent();
291 291
             fireDeleteWindow(parent, window);
292 292
 
293 293
             if (parent == null) {
@@ -313,7 +313,7 @@ public class WindowManager {
313 313
      * @return The specified custom window, or null
314 314
      */
315 315
     @Precondition("The specified window name is not null")
316
-    public static FrameContainer<?> findCustomWindow(final String name) {
316
+    public static FrameContainer findCustomWindow(final String name) {
317 317
         Logger.assertTrue(name != null);
318 318
 
319 319
         return findCustomWindow(ROOT_WINDOWS, name);
@@ -332,7 +332,7 @@ public class WindowManager {
332 332
         "The specified parent window is not null",
333 333
         "The specified parent window has been added to the Window Manager"
334 334
     })
335
-    public static FrameContainer<?> findCustomWindow(final FrameContainer<?> parent,
335
+    public static FrameContainer findCustomWindow(final FrameContainer parent,
336 336
             final String name) {
337 337
         Logger.assertTrue(parent != null);
338 338
         Logger.assertTrue(name != null);
@@ -348,9 +348,9 @@ public class WindowManager {
348 348
      * @param name The name of the custom window to search for
349 349
      * @return The custom window if found, or null otherwise
350 350
      */
351
-    private static FrameContainer<?> findCustomWindow(final Collection<FrameContainer<?>> windows,
351
+    private static FrameContainer findCustomWindow(final Collection<FrameContainer> windows,
352 352
             final String name) {
353
-        for (FrameContainer<?> window : windows) {
353
+        for (FrameContainer window : windows) {
354 354
             if (window instanceof CustomWindow
355 355
                     && ((CustomWindow) window).getName().equals(name)) {
356 356
                 return window;
@@ -366,7 +366,7 @@ public class WindowManager {
366 366
      * @since 0.6.4
367 367
      * @return A collection of all known root windows.
368 368
      */
369
-    public static Collection<FrameContainer<?>> getRootWindows() {
369
+    public static Collection<FrameContainer> getRootWindows() {
370 370
         return ROOT_WINDOWS;
371 371
     }
372 372
 
@@ -376,7 +376,7 @@ public class WindowManager {
376 376
      * @return Focused window or null
377 377
      * @since 0.6.3
378 378
      */
379
-    public static FrameContainer<?> getActiveWindow() {
379
+    public static FrameContainer getActiveWindow() {
380 380
         return activeWindow;
381 381
     }
382 382
 
@@ -396,7 +396,7 @@ public class WindowManager {
396 396
      * @param window The window that was added
397 397
      * @param focus Should this window become focused
398 398
      */
399
-    private static void fireAddWindow(final FrameContainer<?> window, final boolean focus) {
399
+    private static void fireAddWindow(final FrameContainer window, final boolean focus) {
400 400
         for (FrameListener listener : FRAME_LISTENERS) {
401 401
             listener.addWindow(window, focus);
402 402
         }
@@ -410,8 +410,8 @@ public class WindowManager {
410 410
      * @param focus Should this window become focused
411 411
      *
412 412
      */
413
-    private static void fireAddWindow(final FrameContainer<?> parent,
414
-            final FrameContainer<?> child, final boolean focus) {
413
+    private static void fireAddWindow(final FrameContainer parent,
414
+            final FrameContainer child, final boolean focus) {
415 415
         for (FrameListener listener : FRAME_LISTENERS) {
416 416
             listener.addWindow(parent, child, focus);
417 417
         }
@@ -422,7 +422,7 @@ public class WindowManager {
422 422
      *
423 423
      * @param window The window that was removed
424 424
      */
425
-    private static void fireDeleteWindow(final FrameContainer<?> window) {
425
+    private static void fireDeleteWindow(final FrameContainer window) {
426 426
         for (FrameListener listener : FRAME_LISTENERS) {
427 427
             listener.delWindow(window);
428 428
         }
@@ -434,8 +434,8 @@ public class WindowManager {
434 434
      * @param parent The parent window
435 435
      * @param child The child window that was removed
436 436
      */
437
-    private static void fireDeleteWindow(final FrameContainer<?> parent,
438
-            final FrameContainer<?> child) {
437
+    private static void fireDeleteWindow(final FrameContainer parent,
438
+            final FrameContainer child) {
439 439
         for (FrameListener listener : FRAME_LISTENERS) {
440 440
             listener.delWindow(parent, child);
441 441
         }
@@ -447,7 +447,7 @@ public class WindowManager {
447 447
      *
448 448
      * @param window The window that is now focused (or null)
449 449
      */
450
-    private static void fireSelectionChanged(final FrameContainer<?> window) {
450
+    private static void fireSelectionChanged(final FrameContainer window) {
451 451
         for (SelectionListener listener : SELECTION_LISTENERS) {
452 452
             listener.selectionChanged(window);
453 453
         }
@@ -463,7 +463,7 @@ public class WindowManager {
463 463
 
464 464
         /** {@inheritDoc} */
465 465
         @Override
466
-        public void selectionChanged(final FrameContainer<?> window) {
466
+        public void selectionChanged(final FrameContainer window) {
467 467
             activeWindow = window;
468 468
 
469 469
             fireSelectionChanged(window);

+ 62
- 0
src/com/dmdirc/ui/core/components/WindowComponent.java 查看文件

@@ -0,0 +1,62 @@
1
+/*
2
+ * Copyright (c) 2006-2011 Chris Smith, Shane Mc Cormack, Gregory Holmes
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.ui.core.components;
24
+
25
+/**
26
+ * An enumeration of common window components.
27
+ */
28
+public enum WindowComponent {
29
+    
30
+    /** A small bar to show the current topic/subject and allow editing. */
31
+    TOPICBAR("com.dmdirc.ui.components.topicbar"),
32
+    /** A panel to show a list of users or contacts. */
33
+    USERLIST("com.dmdirc.ui.components.userlist"),
34
+    /** A large text area for generic output. */
35
+    TEXTAREA("com.dmdirc.ui.components.textarea"),
36
+    /** An input field for user input or commands. */
37
+    INPUTFIELD("com.dmdirc.ui.components.inputfield"),
38
+    /** A component to show details of or problems with a certificate. */
39
+    CERTIFICATE_VIEWER("com.dmdirc.ui.components.certificateviewer"),;
40
+    
41
+    /** The identifier for this window component. */
42
+    private final String identifier;
43
+
44
+    /**
45
+     * Creates a new WindowComponent.
46
+     *
47
+     * @param identifier The identifier for this window component
48
+     */
49
+    private WindowComponent(final String identifier) {
50
+        this.identifier = identifier;
51
+    }
52
+
53
+    /**
54
+     * Gets the identifier for this component.
55
+     *
56
+     * @return This component's identifier
57
+     */
58
+    public String getIdentifier() {
59
+        return identifier;
60
+    }
61
+
62
+}

+ 0
- 30
src/com/dmdirc/ui/interfaces/ChannelWindow.java 查看文件

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

+ 4
- 4
src/com/dmdirc/ui/interfaces/FrameListener.java 查看文件

@@ -36,14 +36,14 @@ public interface FrameListener {
36 36
      * @param window The server to be added
37 37
      * @param focus Should this window become focused
38 38
      */
39
-    void addWindow(FrameContainer<?> window, final boolean focus);
39
+    void addWindow(FrameContainer window, final boolean focus);
40 40
 
41 41
     /**
42 42
      * Removes a window from this frame manager.
43 43
      *
44 44
      * @param window The server to be removed
45 45
      */
46
-    void delWindow(FrameContainer<?> window);
46
+    void delWindow(FrameContainer window);
47 47
 
48 48
     /**
49 49
      * Adds a new window to this frame manager.
@@ -52,7 +52,7 @@ public interface FrameListener {
52 52
      * @param window The custom window to be added
53 53
      * @param focus Should this window become focused
54 54
      */
55
-    void addWindow(FrameContainer<?> parent, FrameContainer<?> window, final boolean focus);
55
+    void addWindow(FrameContainer parent, FrameContainer window, final boolean focus);
56 56
 
57 57
     /**
58 58
      * Removes a window from this frame manager.
@@ -60,6 +60,6 @@ public interface FrameListener {
60 60
      * @param parent The parent to which the window belongs, or null
61 61
      * @param window The custom window to be removed
62 62
      */
63
-    void delWindow(FrameContainer<?> parent, FrameContainer<?> window);
63
+    void delWindow(FrameContainer parent, FrameContainer window);
64 64
 
65 65
 }

+ 1
- 1
src/com/dmdirc/ui/interfaces/InputWindow.java 查看文件

@@ -44,6 +44,6 @@ public interface InputWindow extends Window {
44 44
      * @return The container that owns this command window.
45 45
      */
46 46
     @Override
47
-    WritableFrameContainer<? extends InputWindow> getContainer();
47
+    WritableFrameContainer getContainer();
48 48
 
49 49
 }

+ 0
- 30
src/com/dmdirc/ui/interfaces/QueryWindow.java 查看文件

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

+ 0
- 30
src/com/dmdirc/ui/interfaces/ServerWindow.java 查看文件

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

+ 0
- 8
src/com/dmdirc/ui/interfaces/UIController.java 查看文件

@@ -25,7 +25,6 @@ package com.dmdirc.ui.interfaces;
25 25
 import com.dmdirc.Channel;
26 26
 import com.dmdirc.Server;
27 27
 import com.dmdirc.config.prefs.PreferencesInterface;
28
-import com.dmdirc.ui.core.dialogs.sslcertificate.SSLCertificateDialogModel;
29 28
 
30 29
 import java.net.URI;
31 30
 
@@ -40,13 +39,6 @@ public interface UIController {
40 39
      */
41 40
     void showFirstRunWizard();
42 41
 
43
-    /**
44
-     * Shows the SSL certificate information dialog.
45
-     *
46
-     * @param model The dialog model to use
47
-     */
48
-    void showSSLCertificateDialog(SSLCertificateDialogModel model);
49
-
50 42
     /**
51 43
      * Shows a channel settigns dialog for specified channel.
52 44
      *

+ 1
- 1
src/com/dmdirc/ui/interfaces/Window.java 查看文件

@@ -35,7 +35,7 @@ public interface Window {
35 35
      *
36 36
      * @return The container that owns this command window.
37 37
      */
38
-    FrameContainer<?> getContainer();
38
+    FrameContainer getContainer();
39 39
 
40 40
     /**
41 41
      * Opens this window.

+ 1
- 1
src/com/dmdirc/ui/messages/Styliser.java 查看文件

@@ -150,7 +150,7 @@ public class Styliser implements ConfigChangeListener {
150 150
      *
151 151
      * @param owner The {@link FrameContainer} that owns this styliser.
152 152
      */
153
-    public Styliser(final FrameContainer<?> owner) {
153
+    public Styliser(final FrameContainer owner) {
154 154
         this(owner.getServer(), owner.getConfigManager());
155 155
     }
156 156
 

+ 4
- 4
test/com/dmdirc/WritableFrameContainerTest.java 查看文件

@@ -41,8 +41,8 @@ public class WritableFrameContainerTest {
41 41
     
42 42
     @Test
43 43
     public void testGetNumLines() {
44
-        final WritableFrameContainer<?> container10
45
-                = new TestWritableFrameContainer<InputWindow>(10, InputWindow.class);
44
+        final WritableFrameContainer container10
45
+                = new TestWritableFrameContainer(10, InputWindow.class);
46 46
         
47 47
         final int res0a = container10.getNumLines("");
48 48
         final int res0b = container10.getNumLines("\r");
@@ -71,8 +71,8 @@ public class WritableFrameContainerTest {
71 71
 
72 72
     @Test
73 73
     public void testSplitLine() {
74
-        final WritableFrameContainer<?> container10
75
-                = new TestWritableFrameContainer<InputWindow>(10, InputWindow.class);
74
+        final WritableFrameContainer container10
75
+                = new TestWritableFrameContainer(10, InputWindow.class);
76 76
         final String[][][] tests = new String[][][]{
77 77
             {{""}, {""}},
78 78
             {{"0123456789"}, {"0123456789"}},

+ 3
- 3
test/com/dmdirc/commandparser/commands/channel/BanTest.java 查看文件

@@ -46,7 +46,7 @@ public class BanTest {
46 46
 
47 47
     @Test
48 48
     public void testUsage() {
49
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
49
+        final FrameContainer tiw = mock(FrameContainer.class);
50 50
         final Channel channel = mock(Channel.class);
51 51
         command.execute(tiw, new CommandArguments("/ban"),
52 52
                 new ChannelCommandContext(null, command, channel));
@@ -57,7 +57,7 @@ public class BanTest {
57 57
     /** Tests that the ban command uses the correct hostname if given a user. */
58 58
     @Test
59 59
     public void testKnownUser() {
60
-        final FrameContainer<?> container = mock(FrameContainer.class);
60
+        final FrameContainer container = mock(FrameContainer.class);
61 61
         final ChannelInfo channelInfo = mock(ChannelInfo.class);
62 62
         final ChannelClientInfo ccInfo = mock(ChannelClientInfo.class);
63 63
         final ClientInfo clientInfo = mock(ClientInfo.class);
@@ -78,7 +78,7 @@ public class BanTest {
78 78
     /** Tests that the ban command works if given a mask not a username. */
79 79
     @Test
80 80
     public void testHostmask() {
81
-        final FrameContainer<?> container = mock(FrameContainer.class);
81
+        final FrameContainer container = mock(FrameContainer.class);
82 82
         final ChannelInfo channelInfo = mock(ChannelInfo.class);
83 83
         final Channel channel = mock(Channel.class);
84 84
 

+ 4
- 4
test/com/dmdirc/commandparser/commands/channel/KickReasonTest.java 查看文件

@@ -46,7 +46,7 @@ public class KickReasonTest {
46 46
 
47 47
     @Test
48 48
     public void testUsage() {
49
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
49
+        final FrameContainer tiw = mock(FrameContainer.class);
50 50
         final Channel channel = mock(Channel.class);
51 51
         command.execute(tiw, new CommandArguments("/kick"),
52 52
                 new ChannelCommandContext(null, command, channel));
@@ -56,7 +56,7 @@ public class KickReasonTest {
56 56
 
57 57
     @Test
58 58
     public void testUnknown() {
59
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
59
+        final FrameContainer tiw = mock(FrameContainer.class);
60 60
         final IRCChannelInfo channelInfo = mock(IRCChannelInfo.class);
61 61
         final Channel channel = mock(Channel.class);
62 62
 
@@ -71,7 +71,7 @@ public class KickReasonTest {
71 71
 
72 72
     @Test
73 73
     public void testWithReason() {
74
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
74
+        final FrameContainer tiw = mock(FrameContainer.class);
75 75
         final IRCChannelInfo channelInfo = mock(IRCChannelInfo.class);
76 76
         final Channel channel = mock(Channel.class);
77 77
         final IRCChannelClientInfo cci = mock(IRCChannelClientInfo.class);
@@ -87,7 +87,7 @@ public class KickReasonTest {
87 87
 
88 88
     @Test
89 89
     public void testWithoutReason() {
90
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
90
+        final FrameContainer tiw = mock(FrameContainer.class);
91 91
         final ConfigManager manager = mock(ConfigManager.class);
92 92
         final IRCChannelInfo channelInfo = mock(IRCChannelInfo.class);
93 93
         final Channel channel = mock(Channel.class);

+ 4
- 4
test/com/dmdirc/commandparser/commands/channel/ModeTest.java 查看文件

@@ -68,7 +68,7 @@ public class ModeTest {
68 68
 
69 69
     @Test
70 70
     public void testWithoutArgs() {
71
-        final FrameContainer<?> origin = mock(FrameContainer.class);
71
+        final FrameContainer origin = mock(FrameContainer.class);
72 72
         
73 73
         command.execute(origin, new CommandArguments("/mode"),
74 74
                 new ChannelCommandContext(null, command, channel));
@@ -78,7 +78,7 @@ public class ModeTest {
78 78
 
79 79
     @Test
80 80
     public void testWithArgs() {
81
-        final FrameContainer<?> origin = mock(FrameContainer.class);
81
+        final FrameContainer origin = mock(FrameContainer.class);
82 82
 
83 83
         command.execute(origin, new CommandArguments("/mode +hello -bye"),
84 84
                 new ChannelCommandContext(null, command, channel));
@@ -88,7 +88,7 @@ public class ModeTest {
88 88
 
89 89
     @Test
90 90
     public void testExternalWithArgs() {
91
-        final FrameContainer<?> origin = mock(FrameContainer.class);
91
+        final FrameContainer origin = mock(FrameContainer.class);
92 92
 
93 93
         command.execute(origin, new CommandArguments("/mode +hello -bye"),
94 94
                 new ChannelCommandContext(null, command, channel));
@@ -98,7 +98,7 @@ public class ModeTest {
98 98
 
99 99
     @Test
100 100
     public void testExternalWithoutArgs() {
101
-        final FrameContainer<?> origin = mock(FrameContainer.class);
101
+        final FrameContainer origin = mock(FrameContainer.class);
102 102
 
103 103
         command.execute(origin, server, "#chan", false,
104 104
                 new CommandArguments("/mode"));

+ 1
- 1
test/com/dmdirc/commandparser/commands/channel/PartTest.java 查看文件

@@ -39,7 +39,7 @@ public class PartTest {
39 39
 
40 40
     private final Part command = new Part();
41 41
     private Channel channel;
42
-    private FrameContainer<?> origin;
42
+    private FrameContainer origin;
43 43
     private ConfigManager manager;
44 44
 
45 45
     @BeforeClass

+ 3
- 3
test/com/dmdirc/commandparser/commands/channel/SetNickColourTest.java 查看文件

@@ -50,7 +50,7 @@ public class SetNickColourTest {
50 50
 
51 51
     @Test
52 52
     public void testUsageNoArgs() {
53
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
53
+        final FrameContainer tiw = mock(FrameContainer.class);
54 54
         command.execute(tiw, new CommandArguments("/foo"),
55 55
                 new ChannelCommandContext(null, command, channel));
56 56
         
@@ -59,7 +59,7 @@ public class SetNickColourTest {
59 59
     
60 60
     @Test
61 61
     public void testUsageNicklist() {
62
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
62
+        final FrameContainer tiw = mock(FrameContainer.class);
63 63
         command.execute(tiw, new CommandArguments("/foo --nicklist"),
64 64
                 new ChannelCommandContext(null, command, channel));
65 65
         
@@ -68,7 +68,7 @@ public class SetNickColourTest {
68 68
     
69 69
     @Test
70 70
     public void testUsageText() {
71
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
71
+        final FrameContainer tiw = mock(FrameContainer.class);
72 72
         command.execute(tiw, new CommandArguments("/foo --text"),
73 73
                 new ChannelCommandContext(null, command, channel));
74 74
         

+ 1
- 1
test/com/dmdirc/commandparser/commands/chat/MeTest.java 查看文件

@@ -49,7 +49,7 @@ public class MeTest {
49 49
 
50 50
     @Test
51 51
     public void testUsage() {
52
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
52
+        final FrameContainer tiw = mock(FrameContainer.class);
53 53
         command.execute(tiw, new CommandArguments("/foo"),
54 54
                 new ChatCommandContext(null, command, mtt));
55 55
         

+ 1
- 1
test/com/dmdirc/commandparser/commands/flags/CommandFlagHandlerTest.java 查看文件

@@ -71,7 +71,7 @@ public class CommandFlagHandlerTest {
71 71
     
72 72
     @Test
73 73
     public void testParse() {
74
-        final FrameContainer<?> container = mock(FrameContainer.class);
74
+        final FrameContainer container = mock(FrameContainer.class);
75 75
         
76 76
         final Map<CommandFlag, Integer> results
77 77
                 = handler.parse(container, new CommandArguments(input));

+ 2
- 2
test/com/dmdirc/commandparser/commands/global/AliasCommandTest.java 查看文件

@@ -41,7 +41,7 @@ public class AliasCommandTest {
41 41
 
42 42
     @Test
43 43
     public void testUsageNoArgs() {
44
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
44
+        final FrameContainer tiw = mock(FrameContainer.class);
45 45
 
46 46
         command.execute(tiw, new CommandArguments("/foo"),
47 47
                 new CommandContext(null, command));
@@ -51,7 +51,7 @@ public class AliasCommandTest {
51 51
     
52 52
     @Test
53 53
     public void testUsageOneArg() {
54
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
54
+        final FrameContainer tiw = mock(FrameContainer.class);
55 55
         
56 56
         command.execute(tiw, new CommandArguments("/foo --remove"),
57 57
                 new CommandContext(null, command));

+ 2
- 2
test/com/dmdirc/commandparser/commands/global/IfpluginTest.java 查看文件

@@ -41,7 +41,7 @@ public class IfpluginTest {
41 41
 
42 42
     @Test
43 43
     public void testUsageNoArgs() {
44
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
44
+        final FrameContainer tiw = mock(FrameContainer.class);
45 45
         command.execute(tiw, new CommandArguments("/foo"),
46 46
                 new CommandContext(null, command));
47 47
 
@@ -50,7 +50,7 @@ public class IfpluginTest {
50 50
 
51 51
     @Test
52 52
     public void testUsageOneArg() {
53
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
53
+        final FrameContainer tiw = mock(FrameContainer.class);
54 54
         command.execute(tiw, new CommandArguments("/foo bar"),
55 55
                 new CommandContext(null, command));
56 56
 

+ 4
- 4
test/com/dmdirc/commandparser/commands/global/NewServerTest.java 查看文件

@@ -41,7 +41,7 @@ public class NewServerTest {
41 41
 
42 42
     @Test
43 43
     public void testUsageNoArgs() {
44
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
44
+        final FrameContainer tiw = mock(FrameContainer.class);
45 45
         command.execute(tiw, new CommandArguments("/foo"),
46 46
                 new CommandContext(null, command));
47 47
         
@@ -50,7 +50,7 @@ public class NewServerTest {
50 50
     
51 51
     @Test
52 52
     public void testInvalidPort() {
53
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
53
+        final FrameContainer tiw = mock(FrameContainer.class);
54 54
         command.execute(tiw, new CommandArguments("/foo foo:abc"),
55 55
                 new CommandContext(null, command));
56 56
         
@@ -59,7 +59,7 @@ public class NewServerTest {
59 59
     
60 60
     @Test
61 61
     public void testOutOfRangePort1() {
62
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
62
+        final FrameContainer tiw = mock(FrameContainer.class);
63 63
         command.execute(tiw, new CommandArguments("/foo foo:0"),
64 64
                 new CommandContext(null, command));
65 65
         
@@ -68,7 +68,7 @@ public class NewServerTest {
68 68
     
69 69
     @Test
70 70
     public void testOutOfRangePort2() {
71
-        final FrameContainer<?> tiw = mock(FrameContainer.class);
71
+        final FrameContainer tiw = mock(FrameContainer.class);
72 72
         command.execute(tiw, new CommandArguments("/foo foo:65537"),
73 73
                 new CommandContext(null, command));
74 74
         

+ 1
- 1
test/com/dmdirc/commandparser/commands/server/ChangeServerTest.java 查看文件

@@ -38,7 +38,7 @@ import static org.mockito.Mockito.*;
38 38
 public class ChangeServerTest {
39 39
 
40 40
     private final ChangeServer command = new ChangeServer();
41
-    private FrameContainer<?> tiw;
41
+    private FrameContainer tiw;
42 42
     private Identity profile;
43 43
     private Server server;
44 44
     

+ 4
- 4
test/com/dmdirc/harness/TestCommandParser.java 查看文件

@@ -50,7 +50,7 @@ public class TestCommandParser extends CommandParser {
50 50
     }
51 51
 
52 52
     @Override
53
-    protected void executeCommand(FrameContainer<?> origin, Window window,
53
+    protected void executeCommand(FrameContainer origin, Window window,
54 54
             CommandInfo commandInfo, Command command, CommandArguments args) {
55 55
         executedCommand = command;
56 56
         wasSilent = args.isSilent();
@@ -58,18 +58,18 @@ public class TestCommandParser extends CommandParser {
58 58
     }
59 59
 
60 60
     @Override
61
-    protected void handleNonCommand(FrameContainer<?> origin, String line) {
61
+    protected void handleNonCommand(FrameContainer origin, String line) {
62 62
         nonCommandLine = line;
63 63
     }
64 64
 
65 65
     @Override
66
-    protected void handleInvalidCommand(FrameContainer<?> origin,
66
+    protected void handleInvalidCommand(FrameContainer origin,
67 67
                                         CommandArguments args) {
68 68
         invalidCommand = args.getCommandName();
69 69
     }
70 70
 
71 71
     @Override
72
-    public void setOwner(FrameContainer<?> owner) {
72
+    public void setOwner(FrameContainer owner) {
73 73
         // Don't care
74 74
     }
75 75
 }

+ 7
- 5
test/com/dmdirc/harness/TestWritableFrameContainer.java 查看文件

@@ -27,22 +27,24 @@ import com.dmdirc.WritableFrameContainer;
27 27
 import com.dmdirc.commandparser.parsers.GlobalCommandParser;
28 28
 import com.dmdirc.config.ConfigManager;
29 29
 import com.dmdirc.config.IdentityManager;
30
-import com.dmdirc.ui.WindowManager;
31 30
 import com.dmdirc.ui.input.TabCompleter;
32 31
 import com.dmdirc.ui.interfaces.InputWindow;
32
+import java.util.Collections;
33 33
 
34
-public class TestWritableFrameContainer<T extends InputWindow> extends WritableFrameContainer<T> {
34
+public class TestWritableFrameContainer extends WritableFrameContainer {
35 35
 
36 36
     private final int lineLength;
37 37
 
38 38
     public TestWritableFrameContainer(final int lineLength,
39
-            final ConfigManager cm, final Class<T> clazz) {
40
-        super("raw", "Raw", "(Raw)", clazz, cm, GlobalCommandParser.getGlobalCommandParser());
39
+            final ConfigManager cm, final Class<? extends InputWindow> clazz) {
40
+        super("raw", "Raw", "(Raw)", clazz, cm,
41
+                GlobalCommandParser.getGlobalCommandParser(),
42
+                Collections.<String>emptySet());
41 43
 
42 44
         this.lineLength = lineLength;
43 45
     }
44 46
 
45
-    public TestWritableFrameContainer(final int lineLength, final Class<T> clazz) {
47
+    public TestWritableFrameContainer(final int lineLength, final Class<? extends InputWindow> clazz) {
46 48
         this(lineLength, IdentityManager.getGlobalConfig(), clazz);
47 49
     }
48 50
 

+ 19
- 19
test/com/dmdirc/ui/WindowManagerTest.java 查看文件

@@ -43,37 +43,37 @@ public class WindowManagerTest {
43 43
     @Test
44 44
     public void testAddRoot() {
45 45
         final FrameListener tfm = mock(FrameListener.class);
46
-        final Window parent = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
46
+        final Window parent = new DummyInputWindow(new TestWritableFrameContainer(512, DummyInputWindow.class), null);
47 47
         
48 48
         WindowManager.addFrameListener(tfm);
49 49
 
50
-        verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), eq(true));
51
-        verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), (FrameContainer<?>) anyObject(), eq(true));
50
+        verify(tfm, never()).addWindow((FrameContainer) anyObject(), eq(true));
51
+        verify(tfm, never()).addWindow((FrameContainer) anyObject(), (FrameContainer) anyObject(), eq(true));
52 52
         
53 53
         WindowManager.addWindow(parent.getContainer());
54 54
         
55 55
         verify(tfm).addWindow(same(parent.getContainer()), eq(true));
56
-        verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), (FrameContainer<?>) anyObject(), eq(true));
56
+        verify(tfm, never()).addWindow((FrameContainer) anyObject(), (FrameContainer) anyObject(), eq(true));
57 57
     }
58 58
 
59 59
     @Test
60 60
     public void testAddChild() {
61 61
         final FrameListener tfm = mock(FrameListener.class);
62
-        final Window parent = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
63
-        final Window child = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
62
+        final Window parent = new DummyInputWindow(new TestWritableFrameContainer(512, DummyInputWindow.class), null);
63
+        final Window child = new DummyInputWindow(new TestWritableFrameContainer(512, DummyInputWindow.class), null);
64 64
         WindowManager.addWindow(parent.getContainer());
65 65
         WindowManager.addFrameListener(tfm);
66 66
         
67 67
         WindowManager.addWindow(parent.getContainer(), child.getContainer());
68 68
         
69
-        verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), eq(true));
69
+        verify(tfm, never()).addWindow((FrameContainer) anyObject(), eq(true));
70 70
         verify(tfm).addWindow(same(parent.getContainer()), same(child.getContainer()), eq(true));
71 71
     }
72 72
 
73 73
     @Test
74 74
     public void testRemoveRoot() {
75 75
         final FrameListener tfm = mock(FrameListener.class);
76
-        final Window parent = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
76
+        final Window parent = new DummyInputWindow(new TestWritableFrameContainer(512, DummyInputWindow.class), null);
77 77
         WindowManager.addWindow(parent.getContainer());
78 78
         WindowManager.addFrameListener(tfm);
79 79
 
@@ -85,25 +85,25 @@ public class WindowManagerTest {
85 85
     @Test
86 86
     public void testRemoveChild() {
87 87
         final FrameListener tfm = mock(FrameListener.class);
88
-        final Window parent = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
89
-        final Window child = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
88
+        final Window parent = new DummyInputWindow(new TestWritableFrameContainer(512, DummyInputWindow.class), null);
89
+        final Window child = new DummyInputWindow(new TestWritableFrameContainer(512, DummyInputWindow.class), null);
90 90
         WindowManager.addWindow(parent.getContainer());
91 91
         WindowManager.addWindow(parent.getContainer(), child.getContainer());
92 92
         WindowManager.addFrameListener(tfm);
93 93
 
94 94
         WindowManager.removeWindow(child.getContainer());
95 95
 
96
-        verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), eq(true));
97
-        verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), (FrameContainer<?>) anyObject(), eq(true));
98
-        verify(tfm, never()).delWindow((FrameContainer<?>) anyObject());
96
+        verify(tfm, never()).addWindow((FrameContainer) anyObject(), eq(true));
97
+        verify(tfm, never()).addWindow((FrameContainer) anyObject(), (FrameContainer) anyObject(), eq(true));
98
+        verify(tfm, never()).delWindow((FrameContainer) anyObject());
99 99
         verify(tfm).delWindow(same(parent.getContainer()), same(child.getContainer()));
100 100
     }
101 101
 
102 102
     @Test
103 103
     public void testRemoveFrameManager() {
104 104
         final FrameListener tfm = mock(FrameListener.class);
105
-        final Window parent = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
106
-        final Window child = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
105
+        final Window parent = new DummyInputWindow(new TestWritableFrameContainer(512, DummyInputWindow.class), null);
106
+        final Window child = new DummyInputWindow(new TestWritableFrameContainer(512, DummyInputWindow.class), null);
107 107
         WindowManager.addWindow(parent.getContainer());
108 108
         
109 109
         WindowManager.addFrameListener(tfm);
@@ -111,10 +111,10 @@ public class WindowManagerTest {
111 111
         WindowManager.removeFrameListener(tfm);
112 112
         WindowManager.addWindow(parent.getContainer(), child.getContainer());
113 113
         
114
-        verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), eq(true));
115
-        verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), (FrameContainer<?>) anyObject(), eq(true));
116
-        verify(tfm, never()).delWindow((FrameContainer<?>) anyObject());
117
-        verify(tfm, never()).delWindow((FrameContainer<?>) anyObject(), (FrameContainer<?>) anyObject());
114
+        verify(tfm, never()).addWindow((FrameContainer) anyObject(), eq(true));
115
+        verify(tfm, never()).addWindow((FrameContainer) anyObject(), (FrameContainer) anyObject(), eq(true));
116
+        verify(tfm, never()).delWindow((FrameContainer) anyObject());
117
+        verify(tfm, never()).delWindow((FrameContainer) anyObject(), (FrameContainer) anyObject());
118 118
     }
119 119
     
120 120
 }

+ 0
- 0
test/com/dmdirc/ui/messages/IntelligentLinkingTest.java 查看文件


部分文件因文件數量過多而無法顯示

Loading…
取消
儲存