Преглед изворни кода

Plugins support for core frame container changes

Change-Id: Iecbb2941c99a3412dc2eb3b7f56fc584d2db483e
Depends-On: Ieefbf2d1e157e3638dbe8fdedbd4f32642061329
Reviewed-on: http://gerrit.dmdirc.com/1884
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
tags/0.7rc1
Chris Smith пре 13 година
родитељ
комит
84a4059c5f
91 измењених фајлова са 289 додато и 534 уклоњено
  1. 1
    1
      src/com/dmdirc/addons/audio/AudioCommand.java
  2. 1
    1
      src/com/dmdirc/addons/audio/BeepCommand.java
  3. 1
    3
      src/com/dmdirc/addons/calc/CalcCommand.java
  4. 6
    2
      src/com/dmdirc/addons/dcc/ChatContainer.java
  5. 3
    3
      src/com/dmdirc/addons/dcc/DCCCommand.java
  6. 3
    3
      src/com/dmdirc/addons/dcc/DCCCommandParser.java
  7. 7
    5
      src/com/dmdirc/addons/dcc/DCCFrameContainer.java
  8. 3
    3
      src/com/dmdirc/addons/dcc/DCCPlugin.java
  9. 5
    4
      src/com/dmdirc/addons/dcc/PlaceholderContainer.java
  10. 4
    4
      src/com/dmdirc/addons/dcc/TransferContainer.java
  11. 1
    1
      src/com/dmdirc/addons/dcc/ui/EmptyWindow.java
  12. 1
    1
      src/com/dmdirc/addons/dcc/ui/PlaceholderWindow.java
  13. 1
    1
      src/com/dmdirc/addons/dcc/ui/TransferWindow.java
  14. 1
    1
      src/com/dmdirc/addons/dcop/DcopCommand.java
  15. 3
    3
      src/com/dmdirc/addons/debug/Debug.java
  16. 3
    3
      src/com/dmdirc/addons/debug/DebugCommand.java
  17. 1
    1
      src/com/dmdirc/addons/debug/commands/Benchmark.java
  18. 1
    1
      src/com/dmdirc/addons/debug/commands/ColourSpam.java
  19. 1
    1
      src/com/dmdirc/addons/debug/commands/ConfigInfo.java
  20. 4
    4
      src/com/dmdirc/addons/debug/commands/ConfigStats.java
  21. 1
    1
      src/com/dmdirc/addons/debug/commands/Error.java
  22. 1
    1
      src/com/dmdirc/addons/debug/commands/FirstRun.java
  23. 1
    1
      src/com/dmdirc/addons/debug/commands/ForceUpdate.java
  24. 1
    1
      src/com/dmdirc/addons/debug/commands/GlobalConfigInfo.java
  25. 1
    1
      src/com/dmdirc/addons/debug/commands/Identities.java
  26. 1
    1
      src/com/dmdirc/addons/debug/commands/MemInfo.java
  27. 1
    1
      src/com/dmdirc/addons/debug/commands/Notify.java
  28. 1
    1
      src/com/dmdirc/addons/debug/commands/RunGC.java
  29. 1
    1
      src/com/dmdirc/addons/debug/commands/ServerInfo.java
  30. 1
    1
      src/com/dmdirc/addons/debug/commands/ServerState.java
  31. 1
    1
      src/com/dmdirc/addons/debug/commands/Services.java
  32. 1
    1
      src/com/dmdirc/addons/debug/commands/ShowRaw.java
  33. 1
    1
      src/com/dmdirc/addons/debug/commands/Threads.java
  34. 5
    5
      src/com/dmdirc/addons/debug/commands/Time.java
  35. 1
    1
      src/com/dmdirc/addons/dns/DNSCommand.java
  36. 1
    1
      src/com/dmdirc/addons/freedesktop_notifications/FDNotifyCommand.java
  37. 8
    8
      src/com/dmdirc/addons/lagdisplay/LagDisplayPlugin.java
  38. 7
    5
      src/com/dmdirc/addons/logging/HistoryWindow.java
  39. 1
    1
      src/com/dmdirc/addons/logging/LoggingCommand.java
  40. 2
    2
      src/com/dmdirc/addons/logging/LoggingPlugin.java
  41. 2
    2
      src/com/dmdirc/addons/notifications/NotificationCommand.java
  42. 3
    3
      src/com/dmdirc/addons/nowplaying/NowPlayingCommand.java
  43. 1
    1
      src/com/dmdirc/addons/osd/OsdCommand.java
  44. 7
    4
      src/com/dmdirc/addons/parserdebug/DebugWindow.java
  45. 1
    1
      src/com/dmdirc/addons/parserdebug/ParserDebugCommand.java
  46. 6
    6
      src/com/dmdirc/addons/redirect/FakeWriteableFrameContainer.java
  47. 2
    2
      src/com/dmdirc/addons/redirect/RedirectCommand.java
  48. 1
    1
      src/com/dmdirc/addons/scriptplugin/ScriptCommand.java
  49. 1
    1
      src/com/dmdirc/addons/systray/PopupCommand.java
  50. 3
    3
      src/com/dmdirc/addons/time/TimedCommand.java
  51. 2
    2
      src/com/dmdirc/addons/time/TimerCommand.java
  52. 1
    1
      src/com/dmdirc/addons/time/TimerManager.java
  53. 0
    7
      src/com/dmdirc/addons/ui_dummy/DummyController.java
  54. 3
    3
      src/com/dmdirc/addons/ui_dummy/DummyInputWindow.java
  55. 0
    43
      src/com/dmdirc/addons/ui_dummy/DummyQueryWindow.java
  56. 0
    43
      src/com/dmdirc/addons/ui_dummy/DummyServerWindow.java
  57. 4
    4
      src/com/dmdirc/addons/ui_swing/MainFrame.java
  58. 0
    16
      src/com/dmdirc/addons/ui_swing/SwingController.java
  59. 35
    26
      src/com/dmdirc/addons/ui_swing/SwingWindowFactory.java
  60. 1
    1
      src/com/dmdirc/addons/ui_swing/components/MDIBar.java
  61. 1
    1
      src/com/dmdirc/addons/ui_swing/components/frames/CustomFrame.java
  62. 1
    2
      src/com/dmdirc/addons/ui_swing/components/frames/CustomInputFrame.java
  63. 4
    4
      src/com/dmdirc/addons/ui_swing/components/frames/InputTextFrame.java
  64. 0
    100
      src/com/dmdirc/addons/ui_swing/components/frames/QueryFrame.java
  65. 1
    2
      src/com/dmdirc/addons/ui_swing/components/frames/ServerFrame.java
  66. 5
    5
      src/com/dmdirc/addons/ui_swing/components/frames/TextFrame.java
  67. 2
    2
      src/com/dmdirc/addons/ui_swing/components/menubar/ChannelMenu.java
  68. 1
    1
      src/com/dmdirc/addons/ui_swing/components/menubar/ServerMenu.java
  69. 20
    20
      src/com/dmdirc/addons/ui_swing/framemanager/buttonbar/ButtonBar.java
  70. 1
    1
      src/com/dmdirc/addons/ui_swing/framemanager/buttonbar/FrameToggleButton.java
  71. 1
    1
      src/com/dmdirc/addons/ui_swing/framemanager/ctrltab/CtrlTabWindowManager.java
  72. 12
    12
      src/com/dmdirc/addons/ui_swing/framemanager/tree/NodeLabel.java
  73. 5
    5
      src/com/dmdirc/addons/ui_swing/framemanager/tree/TreeFrameManager.java
  74. 3
    3
      src/com/dmdirc/addons/ui_swing/framemanager/tree/TreeViewNode.java
  75. 1
    1
      src/com/dmdirc/addons/ui_swing/framemanager/windowmenu/FrameContainerMenu.java
  76. 1
    1
      src/com/dmdirc/addons/ui_swing/framemanager/windowmenu/FrameContainerMenuItem.java
  77. 4
    4
      src/com/dmdirc/addons/ui_swing/framemanager/windowmenu/WindowMenuFrameManager.java
  78. 0
    7
      src/com/dmdirc/addons/ui_web/WebInterfaceUI.java
  79. 39
    29
      src/com/dmdirc/addons/ui_web/WebWindowManager.java
  80. 3
    3
      src/com/dmdirc/addons/ui_web/uicomponents/WebInputWindow.java
  81. 0
    42
      src/com/dmdirc/addons/ui_web/uicomponents/WebQueryWindow.java
  82. 1
    2
      src/com/dmdirc/addons/ui_web/uicomponents/WebServerWindow.java
  83. 6
    18
      src/com/dmdirc/addons/ui_web/uicomponents/WebWindow.java
  84. 1
    1
      src/com/dmdirc/addons/urlcatcher/UrlCatcherPlugin.java
  85. 1
    1
      src/com/dmdirc/addons/urlcatcher/UrlListCommand.java
  86. 1
    1
      src/com/dmdirc/addons/windowflashing/FlashWindow.java
  87. 3
    3
      src/com/dmdirc/addons/windowstatus/WindowStatusPlugin.java
  88. 4
    4
      test/com/dmdirc/addons/debug/DebugTest.java
  89. 2
    3
      test/com/dmdirc/addons/redirect/RedirectCommandTest.java
  90. 1
    1
      test/com/dmdirc/addons/urlcatcher/UrlCatcherPluginTest.java
  91. 2
    2
      test/com/dmdirc/harness/ui/DMDircUITestCase.java

+ 1
- 1
src/com/dmdirc/addons/audio/AudioCommand.java Прегледај датотеку

@@ -47,7 +47,7 @@ public final class AudioCommand 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 String filename = args.getArgumentsAsString();
53 53
         final File file = new File(filename);

+ 1
- 1
src/com/dmdirc/addons/audio/BeepCommand.java Прегледај датотеку

@@ -47,7 +47,7 @@ public final class BeepCommand 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
         Toolkit.getDefaultToolkit().beep();
53 53
     }

+ 1
- 3
src/com/dmdirc/addons/calc/CalcCommand.java Прегледај датотеку

@@ -34,14 +34,12 @@ import java.text.ParseException;
34 34
 /**
35 35
  * A command which allows users to evaluate various mathematical expressions,
36 36
  * and perform basic calculations.
37
- *
38
- * @author chris
39 37
  */
40 38
 public class CalcCommand extends Command implements CommandInfo {
41 39
 
42 40
     /** {@inheritDoc} */
43 41
     @Override
44
-    public void execute(final FrameContainer<?> origin,
42
+    public void execute(final FrameContainer origin,
45 43
             final CommandArguments args, final CommandContext context) {
46 44
         try {
47 45
             int offset = 0;

+ 6
- 2
src/com/dmdirc/addons/dcc/ChatContainer.java Прегледај датотеку

@@ -26,12 +26,14 @@ import com.dmdirc.actions.ActionManager;
26 26
 import com.dmdirc.addons.dcc.actions.DCCActions;
27 27
 import com.dmdirc.addons.dcc.io.DCCChat;
28 28
 import com.dmdirc.ui.WindowManager;
29
+import com.dmdirc.ui.core.components.WindowComponent;
29 30
 import com.dmdirc.ui.interfaces.InputWindow;
31
+import java.util.Arrays;
30 32
 
31 33
 /**
32 34
  * This class links DCC Chat objects to a window.
33 35
  */
34
-public class ChatContainer extends DCCFrameContainer<InputWindow> implements DCCChatHandler {
36
+public class ChatContainer extends DCCFrameContainer implements DCCChatHandler {
35 37
 
36 38
     /** The DCCChat object we are a window for. */
37 39
     private final DCCChat dccChat;
@@ -52,7 +54,9 @@ public class ChatContainer extends DCCFrameContainer<InputWindow> implements DCC
52 54
     public ChatContainer(final DCCPlugin plugin, final DCCChat dcc,
53 55
             final String title, final String nick, final String targetNick) {
54 56
         super(title, "dcc-chat-inactive", InputWindow.class,
55
-                DCCCommandParser.getDCCCommandParser());
57
+                DCCCommandParser.getDCCCommandParser(),
58
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
59
+                WindowComponent.INPUTFIELD.getIdentifier()));
56 60
         this.dccChat = dcc;
57 61
         dcc.setHandler(this);
58 62
         nickname = nick;

+ 3
- 3
src/com/dmdirc/addons/dcc/DCCCommand.java Прегледај датотеку

@@ -70,7 +70,7 @@ public final class DCCCommand extends Command implements IntelligentCommand,
70 70
 
71 71
     /** {@inheritDoc} */
72 72
     @Override
73
-    public void execute(final FrameContainer<?> origin,
73
+    public void execute(final FrameContainer origin,
74 74
             final CommandArguments args, final CommandContext context) {
75 75
         if (args.getArguments().length > 1) {
76 76
             final String target = args.getArguments()[1];
@@ -127,7 +127,7 @@ public final class DCCCommand extends Command implements IntelligentCommand,
127 127
      * @param isSilent Is this a silent command
128 128
      */
129 129
     private void startChat(final Parser parser, final Server server,
130
-            final FrameContainer<?> origin, final String myNickname,
130
+            final FrameContainer origin, final String myNickname,
131 131
             final String target, final boolean isSilent) {
132 132
         final DCCChat chat = new DCCChat();
133 133
         if (myPlugin.listen(chat)) {
@@ -158,7 +158,7 @@ public final class DCCCommand extends Command implements IntelligentCommand,
158 158
      * @param filename The file to send
159 159
      * @since 0.6.3m1
160 160
      */
161
-    public void sendFile(final String target, final FrameContainer<?> origin,
161
+    public void sendFile(final String target, final FrameContainer origin,
162 162
             final Server server, final boolean isSilent, final String filename) {
163 163
         // New thread to ask the user what file to send
164 164
         final File givenFile = new File(filename);

+ 3
- 3
src/com/dmdirc/addons/dcc/DCCCommandParser.java Прегледај датотеку

@@ -74,14 +74,14 @@ public final class DCCCommandParser extends GlobalCommandParser {
74 74
      * @param line The line input by the user
75 75
      */
76 76
     @Override
77
-    protected void handleNonCommand(final FrameContainer<?> origin,
77
+    protected void handleNonCommand(final FrameContainer origin,
78 78
             final String line) {
79
-        ((WritableFrameContainer<?>) origin).sendLine(line);
79
+        ((WritableFrameContainer) origin).sendLine(line);
80 80
     }
81 81
 
82 82
     /** {@inheritDoc} */
83 83
     @Override
84
-    public void setOwner(final FrameContainer<?> owner) {
84
+    public void setOwner(final FrameContainer owner) {
85 85
         // Don't care
86 86
     }
87 87
 

+ 7
- 5
src/com/dmdirc/addons/dcc/DCCFrameContainer.java Прегледај датотеку

@@ -29,12 +29,12 @@ import com.dmdirc.config.IdentityManager;
29 29
 import com.dmdirc.ui.input.TabCompleter;
30 30
 import com.dmdirc.ui.interfaces.InputWindow;
31 31
 
32
+import java.util.Collection;
33
+
32 34
 /**
33 35
  * This class links DCC objects to a window.
34
- *
35
- * @param <T> The type of window which corresponds to this DCC frame
36 36
  */
37
-public abstract class DCCFrameContainer<T extends InputWindow> extends WritableFrameContainer<T> {
37
+public abstract class DCCFrameContainer extends WritableFrameContainer {
38 38
 
39 39
     /** The Window we're using. */
40 40
     private boolean windowClosing = false;
@@ -46,11 +46,13 @@ public abstract class DCCFrameContainer<T extends InputWindow> extends WritableF
46 46
      * @param icon The icon to use
47 47
      * @param windowClass The class of window to use for this container
48 48
      * @param parser Command parser to use for this window
49
+     * @param components The UI components that this frame requires
49 50
      */
50 51
     public DCCFrameContainer(final String title, final String icon,
51
-            final Class<T> windowClass, final CommandParser parser) {
52
+            final Class<? extends InputWindow> windowClass, final CommandParser parser,
53
+            final Collection<String> components) {
52 54
         super(icon, title, title, windowClass,
53
-                IdentityManager.getGlobalConfig(), parser);
55
+                IdentityManager.getGlobalConfig(), parser, components);
54 56
     }
55 57
 
56 58
     /** {@inheritDoc} */

+ 3
- 3
src/com/dmdirc/addons/dcc/DCCPlugin.java Прегледај датотеку

@@ -351,7 +351,7 @@ public final class DCCPlugin extends Plugin implements ActionListener {
351 351
             }
352 352
             final String myNickname = ((Server) arguments[0]).getParser()
353 353
                     .getLocalClient().getNickname();
354
-            final DCCFrameContainer<?> f = new ChatContainer(this, chat,
354
+            final DCCFrameContainer f = new ChatContainer(this, chat,
355 355
                     "Chat: " + nickname, myNickname, nickname);
356 356
             f.addLine("DCCChatStarting", nickname, chat.getHost(),
357 357
                     chat.getPort());
@@ -361,7 +361,7 @@ public final class DCCPlugin extends Plugin implements ActionListener {
361 361
                     DCCActions.DCC_CHAT_REQUEST, null, ((Server) arguments[0]),
362 362
                     nickname);
363 363
             askQuestion("User " + nickname + " on "
364
-                    + ((Server) arguments[0]).toString()
364
+                    + ((Server) arguments[0]).getName()
365 365
                     + " would like to start a DCC Chat with you.\n\n"
366 366
                     + "Do you want to continue?",
367 367
                     "DCC Chat Request", JOptionPane.YES_OPTION,
@@ -456,7 +456,7 @@ public final class DCCPlugin extends Plugin implements ActionListener {
456 456
                         DCCActions.DCC_SEND_REQUEST, null,
457 457
                         ((Server) arguments[0]), nickname, filename);
458 458
                 askQuestion("User " + nickname + " on "
459
-                        + ((Server) arguments[0]).toString()
459
+                        + ((Server) arguments[0]).getName()
460 460
                         + " would like to send you a file over DCC.\n\nFile: "
461 461
                         + filename + "\n\nDo you want to continue?",
462 462
                         "DCC Send Request", JOptionPane.YES_OPTION, type,

+ 5
- 4
src/com/dmdirc/addons/dcc/PlaceholderContainer.java Прегледај датотеку

@@ -31,11 +31,12 @@ import com.dmdirc.config.IdentityManager;
31 31
 import com.dmdirc.plugins.PluginManager;
32 32
 
33 33
 import java.awt.Dialog.ModalityType;
34
+import java.util.Collections;
34 35
 
35 36
 /**
36 37
  * Creates a placeholder DCC Frame.
37 38
  */
38
-public class PlaceholderContainer extends FrameContainer<PlaceholderWindow> {
39
+public class PlaceholderContainer extends FrameContainer {
39 40
 
40 41
     /** The plugin which owns this placeholder. */
41 42
     private final DCCPlugin plugin;
@@ -47,7 +48,7 @@ public class PlaceholderContainer extends FrameContainer<PlaceholderWindow> {
47 48
      */
48 49
     public PlaceholderContainer(final DCCPlugin plugin) {
49 50
         super("dcc", "DCCs", "DCCs", PlaceholderWindow.class,
50
-                IdentityManager.getGlobalConfig());
51
+                IdentityManager.getGlobalConfig(), Collections.<String>emptyList());
51 52
 
52 53
         this.plugin = plugin;
53 54
     }
@@ -56,7 +57,7 @@ public class PlaceholderContainer extends FrameContainer<PlaceholderWindow> {
56 57
     @Override
57 58
     public void close() {
58 59
         int dccs = 0;
59
-        for (FrameContainer<?> window : getChildren()) {
60
+        for (FrameContainer window : getChildren()) {
60 61
             if ((window instanceof TransferContainer
61 62
                     && ((TransferContainer) window).getDCC().isActive())
62 63
                     || (window instanceof ChatContainer
@@ -122,7 +123,7 @@ public class PlaceholderContainer extends FrameContainer<PlaceholderWindow> {
122 123
 
123 124
     /** {@inheritDoc} */
124 125
     @Override
125
-    public void removeChild(final FrameContainer<?> child) {
126
+    public void removeChild(final FrameContainer child) {
126 127
         super.removeChild(child);
127 128
 
128 129
         if (getChildren().isEmpty()) {

+ 4
- 4
src/com/dmdirc/addons/dcc/TransferContainer.java Прегледај датотеку

@@ -37,16 +37,15 @@ import com.dmdirc.ui.WindowManager;
37 37
 
38 38
 import java.awt.Desktop;
39 39
 import java.io.File;
40
+import java.util.Collections;
40 41
 import java.util.Date;
41 42
 
42 43
 import javax.swing.JOptionPane;
43 44
 
44 45
 /**
45 46
  * This class links DCC Send objects to a window.
46
- *
47
- * @author Shane 'Dataforce' McCormack
48 47
  */
49
-public class TransferContainer extends FrameContainer<TransferWindow> implements
48
+public class TransferContainer extends FrameContainer implements
50 49
         DCCTransferHandler, SocketCloseListener {
51 50
 
52 51
     /** The dcc plugin that owns this frame */
@@ -95,7 +94,8 @@ public class TransferContainer extends FrameContainer<TransferWindow> implements
95 94
         super(dcc.getType() == DCCTransfer.TransferType.SEND
96 95
                 ? "dcc-send-inactive" : "dcc-receive-inactive",
97 96
                 title, title, TransferWindow.class,
98
-                IdentityManager.getGlobalConfig());
97
+                IdentityManager.getGlobalConfig(),
98
+                Collections.<String>emptyList());
99 99
         this.plugin = plugin;
100 100
         this.dcc = dcc;
101 101
         this.server = server;

+ 1
- 1
src/com/dmdirc/addons/dcc/ui/EmptyWindow.java Прегледај датотеку

@@ -43,7 +43,7 @@ public class EmptyWindow extends TextFrame {
43 43
      * @param controller The UIController that owns this window
44 44
      * @param owner The frame container that owns this window
45 45
      */
46
-    public EmptyWindow(final SwingController controller, final FrameContainer<?> owner) {
46
+    public EmptyWindow(final SwingController controller, final FrameContainer owner) {
47 47
         super(owner, controller);
48 48
         setTextPane(null);
49 49
     }

+ 1
- 1
src/com/dmdirc/addons/dcc/ui/PlaceholderWindow.java Прегледај датотеку

@@ -45,7 +45,7 @@ public class PlaceholderWindow extends EmptyWindow {
45 45
      * @param owner The frame container that owns this window
46 46
      */
47 47
     public PlaceholderWindow(final SwingController controller,
48
-            final FrameContainer<?> owner) {
48
+            final FrameContainer owner) {
49 49
         super(controller, owner);
50 50
 
51 51
         add(new TextLabel(

+ 1
- 1
src/com/dmdirc/addons/dcc/ui/TransferWindow.java Прегледај датотеку

@@ -88,7 +88,7 @@ public class TransferWindow extends EmptyWindow implements ActionListener,
88 88
      * @param controller The UIController that owns this window
89 89
      * @param owner The frame container that owns this window
90 90
      */
91
-    public TransferWindow(final SwingController controller, final FrameContainer<?> owner) {
91
+    public TransferWindow(final SwingController controller, final FrameContainer owner) {
92 92
         super(controller, owner);
93 93
         
94 94
         final TransferContainer container = (TransferContainer) owner;

+ 1
- 1
src/com/dmdirc/addons/dcop/DcopCommand.java Прегледај датотеку

@@ -46,7 +46,7 @@ public final class DcopCommand 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
         if (args.getArguments().length != 3) {
52 52
             showUsage(origin, args.isSilent(), "dcop", "<app> <object> <function>");

+ 3
- 3
src/com/dmdirc/addons/debug/Debug.java Прегледај датотеку

@@ -55,7 +55,7 @@ public class Debug extends Command implements IntelligentCommand, CommandInfo {
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
         if (args.getArguments().length == 0) {
61 61
             showUsage(origin, args.isSilent(), "debug",
@@ -84,7 +84,7 @@ public class Debug extends Command implements IntelligentCommand, CommandInfo {
84 84
      * @param type The type of message to send
85 85
      * @param args The arguments of the message
86 86
      */
87
-    public void proxySendLine(final FrameContainer<?> target,
87
+    public void proxySendLine(final FrameContainer target,
88 88
             final boolean isSilent, final String type, final Object ... args) {
89 89
         sendLine(target, isSilent, type, args);
90 90
     }
@@ -97,7 +97,7 @@ public class Debug extends Command implements IntelligentCommand, CommandInfo {
97 97
      * @param name The name of the command that's raising the error
98 98
      * @param args The arguments that the command accepts or expects
99 99
      */
100
-    public void proxyShowUsage(final FrameContainer<?> target,
100
+    public void proxyShowUsage(final FrameContainer target,
101 101
             final boolean isSilent, final String name, final String args) {
102 102
         showUsage(target, isSilent, getName(), name + " " + args);
103 103
     }

+ 3
- 3
src/com/dmdirc/addons/debug/DebugCommand.java Прегледај датотеку

@@ -72,7 +72,7 @@ public abstract class DebugCommand {
72 72
      * @param args Arguments passed to this command
73 73
      * @param context The context the command was executed in
74 74
      */
75
-    public abstract void execute(final FrameContainer<?> origin,
75
+    public abstract void execute(final FrameContainer origin,
76 76
             final CommandArguments args, final CommandContext context);
77 77
 
78 78
     /**
@@ -93,7 +93,7 @@ public abstract class DebugCommand {
93 93
      * @param type The type of message to send
94 94
      * @param args The arguments of the message
95 95
      */
96
-    public void sendLine(final FrameContainer<?> target,
96
+    public void sendLine(final FrameContainer target,
97 97
             final boolean isSilent, final String type, final Object ... args) {
98 98
         if (command != null) {
99 99
             command.proxySendLine(target, isSilent, type, args);
@@ -108,7 +108,7 @@ public abstract class DebugCommand {
108 108
      * @param name The name of the command that's raising the error
109 109
      * @param args The arguments that the command accepts or expects
110 110
      */
111
-    public void showUsage(final FrameContainer<?> target,
111
+    public void showUsage(final FrameContainer target,
112 112
             final boolean isSilent, final String name, final String args) {
113 113
         if (command != null) {
114 114
             command.proxyShowUsage(target, isSilent, name, args);

+ 1
- 1
src/com/dmdirc/addons/debug/commands/Benchmark.java Прегледај датотеку

@@ -57,7 +57,7 @@ public class Benchmark extends DebugCommand {
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
         long[] results = new long[10];
63 63
 

+ 1
- 1
src/com/dmdirc/addons/debug/commands/ColourSpam.java Прегледај датотеку

@@ -56,7 +56,7 @@ public class ColourSpam extends DebugCommand {
56 56
 
57 57
     /** {@inheritDoc} */
58 58
     @Override
59
-    public void execute(final FrameContainer<?> origin,
59
+    public void execute(final FrameContainer origin,
60 60
             final CommandArguments args, final CommandContext context) {
61 61
         for (int i = 0; i < 100; i++) {
62 62
             sendLine(origin, args.isSilent(), FORMAT_OUTPUT,

+ 1
- 1
src/com/dmdirc/addons/debug/commands/ConfigInfo.java Прегледај датотеку

@@ -57,7 +57,7 @@ public class ConfigInfo extends DebugCommand {
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
         for (Identity source : origin.getConfigManager().getSources()) {
63 63
             sendLine(origin, args.isSilent(), FORMAT_OUTPUT, source.getTarget()

+ 4
- 4
src/com/dmdirc/addons/debug/commands/ConfigStats.java Прегледај датотеку

@@ -66,7 +66,7 @@ public class ConfigStats extends DebugCommand {
66 66
 
67 67
     /** {@inheritDoc} */
68 68
     @Override
69
-    public void execute(final FrameContainer<?> origin,
69
+    public void execute(final FrameContainer origin,
70 70
             final CommandArguments args, final CommandContext context) {
71 71
         if (args.getArguments().length == 2) {
72 72
             if (args.getArguments()[1].startsWith("+")) {
@@ -104,7 +104,7 @@ public class ConfigStats extends DebugCommand {
104 104
      * @param isSilent Whether this command has been silenced or not
105 105
      * @param regex Regex to match options against
106 106
      */
107
-    private void doConfigStatsOption(final FrameContainer<?> origin,
107
+    private void doConfigStatsOption(final FrameContainer origin,
108 108
             final boolean isSilent, final String regex) {
109 109
         final SortedSet<Entry<String, Integer>> sortedStats = getSortedStats();
110 110
         boolean found = false;
@@ -129,7 +129,7 @@ public class ConfigStats extends DebugCommand {
129 129
      * @param isSilent Whether this command has been silenced or not
130 130
      * @param top Top number of entries to show
131 131
      */
132
-    private void doConfigStatsTop(final FrameContainer<?> origin,
132
+    private void doConfigStatsTop(final FrameContainer origin,
133 133
             final boolean isSilent, final int top) {
134 134
         final SortedSet<Entry<String, Integer>> sortedStats = getSortedStats();
135 135
         int i = 0;
@@ -151,7 +151,7 @@ public class ConfigStats extends DebugCommand {
151 151
      * @param isSilent Whether this command has been silenced or not
152 152
      * @param cutoff Cut off value for stats
153 153
      */
154
-    private void doConfigStatsCutOff(final FrameContainer<?> origin,
154
+    private void doConfigStatsCutOff(final FrameContainer origin,
155 155
             final boolean isSilent, final int cutoff) {
156 156
         final SortedSet<Entry<String, Integer>> sortedStats = getSortedStats();
157 157
         for (Map.Entry<String, Integer> entry : sortedStats) {

+ 1
- 1
src/com/dmdirc/addons/debug/commands/Error.java Прегледај датотеку

@@ -64,7 +64,7 @@ public class Error extends DebugCommand implements IntelligentCommand {
64 64
 
65 65
     /** {@inheritDoc} */
66 66
     @Override
67
-    public void execute(final FrameContainer<?> origin,
67
+    public void execute(final FrameContainer origin,
68 68
             final CommandArguments args, final CommandContext context) {
69 69
         if ((args.getArguments().length == 1
70 70
                 || args.getArguments().length == 2)

+ 1
- 1
src/com/dmdirc/addons/debug/commands/FirstRun.java Прегледај датотеку

@@ -56,7 +56,7 @@ public class FirstRun extends DebugCommand {
56 56
 
57 57
     /** {@inheritDoc} */
58 58
     @Override
59
-    public void execute(final FrameContainer<?> origin,
59
+    public void execute(final FrameContainer origin,
60 60
             final CommandArguments args, final CommandContext context) {
61 61
         context.getSource().getController().showFirstRunWizard();
62 62
     }

+ 1
- 1
src/com/dmdirc/addons/debug/commands/ForceUpdate.java Прегледај датотеку

@@ -59,7 +59,7 @@ public class ForceUpdate extends DebugCommand {
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
         if (IdentityManager.getGlobalConfig().getOptionBool("updater",
65 65
                 "enable")) {

+ 1
- 1
src/com/dmdirc/addons/debug/commands/GlobalConfigInfo.java Прегледај датотеку

@@ -58,7 +58,7 @@ public class GlobalConfigInfo extends DebugCommand {
58 58
 
59 59
     /** {@inheritDoc} */
60 60
     @Override
61
-    public void execute(final FrameContainer<?> origin,
61
+    public void execute(final FrameContainer origin,
62 62
             final CommandArguments args, final CommandContext context) {
63 63
         for (Identity source : IdentityManager.getGlobalConfig().getSources()) {
64 64
             sendLine(origin, args.isSilent(), FORMAT_OUTPUT, source.getTarget()

+ 1
- 1
src/com/dmdirc/addons/debug/commands/Identities.java Прегледај датотеку

@@ -59,7 +59,7 @@ public class Identities extends DebugCommand {
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
         final String type;
65 65
 

+ 1
- 1
src/com/dmdirc/addons/debug/commands/MemInfo.java Прегледај датотеку

@@ -56,7 +56,7 @@ public class MemInfo extends DebugCommand {
56 56
 
57 57
     /** {@inheritDoc} */
58 58
     @Override
59
-    public void execute(final FrameContainer<?> origin,
59
+    public void execute(final FrameContainer origin,
60 60
             final CommandArguments args, final CommandContext context) {
61 61
         sendLine(origin, args.isSilent(), FORMAT_OUTPUT, "Total Memory: "
62 62
                 + Runtime.getRuntime().totalMemory());

+ 1
- 1
src/com/dmdirc/addons/debug/commands/Notify.java Прегледај датотеку

@@ -56,7 +56,7 @@ public class Notify extends DebugCommand {
56 56
 
57 57
     /** {@inheritDoc} */
58 58
     @Override
59
-    public void execute(final FrameContainer<?> origin,
59
+    public void execute(final FrameContainer origin,
60 60
             final CommandArguments args, final CommandContext context) {
61 61
         sendLine(origin, args.isSilent(), FORMAT_OUTPUT,
62 62
                 "Current notification colour is: " + origin.getNotification());

+ 1
- 1
src/com/dmdirc/addons/debug/commands/RunGC.java Прегледај датотеку

@@ -56,7 +56,7 @@ public class RunGC extends DebugCommand {
56 56
 
57 57
     /** {@inheritDoc} */
58 58
     @Override
59
-    public void execute(final FrameContainer<?> origin,
59
+    public void execute(final FrameContainer origin,
60 60
             final CommandArguments args, final CommandContext context) {
61 61
         System.gc();
62 62
         sendLine(origin, args.isSilent(), FORMAT_OUTPUT,

+ 1
- 1
src/com/dmdirc/addons/debug/commands/ServerInfo.java Прегледај датотеку

@@ -57,7 +57,7 @@ public class ServerInfo extends DebugCommand {
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 (origin.getServer() == null) {
63 63
             sendLine(origin, args.isSilent(), FORMAT_ERROR,

+ 1
- 1
src/com/dmdirc/addons/debug/commands/ServerState.java Прегледај датотеку

@@ -57,7 +57,7 @@ public class ServerState extends DebugCommand {
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 (origin.getServer() == null) {
63 63
             sendLine(origin, args.isSilent(), FORMAT_ERROR,

+ 1
- 1
src/com/dmdirc/addons/debug/commands/Services.java Прегледај датотеку

@@ -62,7 +62,7 @@ public class Services extends DebugCommand implements IntelligentCommand {
62 62
 
63 63
     /** {@inheritDoc} */
64 64
     @Override
65
-    public void execute(final FrameContainer<?> origin,
65
+    public void execute(final FrameContainer origin,
66 66
             final CommandArguments args, final CommandContext context) {
67 67
         sendLine(origin, args.isSilent(), FORMAT_OUTPUT, "Available Services:");
68 68
         for (Service service : PluginManager.getPluginManager()

+ 1
- 1
src/com/dmdirc/addons/debug/commands/ShowRaw.java Прегледај датотеку

@@ -55,7 +55,7 @@ public class ShowRaw extends DebugCommand {
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
         if (origin == null || origin.getServer() == null) {
61 61
             sendLine(origin, args.isSilent(), FORMAT_ERROR,

+ 1
- 1
src/com/dmdirc/addons/debug/commands/Threads.java Прегледај датотеку

@@ -58,7 +58,7 @@ public class Threads extends DebugCommand {
58 58
 
59 59
     /** {@inheritDoc} */
60 60
     @Override
61
-    public void execute(final FrameContainer<?> origin,
61
+    public void execute(final FrameContainer origin,
62 62
             final CommandArguments args, final CommandContext context) {
63 63
         for (Entry<Thread, StackTraceElement[]> thread
64 64
                 : Thread.getAllStackTraces().entrySet()) {

+ 5
- 5
src/com/dmdirc/addons/debug/commands/Time.java Прегледај датотеку

@@ -61,7 +61,7 @@ public class Time extends DebugCommand implements IntelligentCommand {
61 61
 
62 62
     /** {@inheritDoc} */
63 63
     @Override
64
-    public void execute(final FrameContainer<?> origin,
64
+    public void execute(final FrameContainer origin,
65 65
             final CommandArguments args, final CommandContext context) {
66 66
         doTime(origin, context.getSource(), args);
67 67
     }
@@ -73,16 +73,16 @@ public class Time extends DebugCommand implements IntelligentCommand {
73 73
      * @param window The window to be passed on to the timed command, if any
74 74
      * @param args The arguments that were passed to the command
75 75
      */
76
-    private void doTime(final FrameContainer<?> origin, final Window window,
76
+    private void doTime(final FrameContainer origin, final Window window,
77 77
             final CommandArguments args) {
78 78
         if (args.getArguments().length == 0) {
79 79
             showUsage(origin, args.isSilent(), getName(), getUsage());
80 80
             return;
81 81
         }
82 82
 
83
-        if (origin instanceof WritableFrameContainer<?>) {
84
-            final WritableFrameContainer<?> container
85
-                    = (WritableFrameContainer<?>) origin;
83
+        if (origin instanceof WritableFrameContainer) {
84
+            final WritableFrameContainer container
85
+                    = (WritableFrameContainer) origin;
86 86
             final long start = System.currentTimeMillis();
87 87
             container.getCommandParser().parseCommand(origin, window,
88 88
                     args.getArgumentsAsString(0));

+ 1
- 1
src/com/dmdirc/addons/dns/DNSCommand.java Прегледај датотеку

@@ -44,7 +44,7 @@ public final class DNSCommand extends Command implements CommandInfo {
44 44
     
45 45
     /** {@inheritDoc} */
46 46
     @Override
47
-    public void execute(final FrameContainer<?> origin,
47
+    public void execute(final FrameContainer origin,
48 48
             final CommandArguments args, final CommandContext context) {
49 49
         if (args.getArguments().length == 0) {
50 50
             showUsage(origin, args.isSilent(), "dns", "<IP|hostname>");

+ 1
- 1
src/com/dmdirc/addons/freedesktop_notifications/FDNotifyCommand.java Прегледај датотеку

@@ -51,7 +51,7 @@ public final class FDNotifyCommand extends Command implements CommandInfo {
51 51
 
52 52
     /** {@inheritDoc} */
53 53
     @Override
54
-    public void execute(final FrameContainer<?> origin, final CommandArguments args, final CommandContext context) {
54
+    public void execute(final FrameContainer origin, final CommandArguments args, final CommandContext context) {
55 55
         new Thread() {
56 56
             /** {@inheritDoc} */
57 57
             @Override

+ 8
- 8
src/com/dmdirc/addons/lagdisplay/LagDisplayPlugin.java Прегледај датотеку

@@ -158,16 +158,16 @@ public final class LagDisplayPlugin extends Plugin implements ActionListener, Co
158 158
         boolean useAlternate = false;
159 159
 
160 160
         for (Object obj : arguments) {
161
-            if (obj instanceof FrameContainer<?>
162
-                    && ((FrameContainer<?>) obj).getConfigManager() != null) {
163
-                useAlternate = ((FrameContainer<?>) obj).getConfigManager()
161
+            if (obj instanceof FrameContainer
162
+                    && ((FrameContainer) obj).getConfigManager() != null) {
163
+                useAlternate = ((FrameContainer) obj).getConfigManager()
164 164
                         .getOptionBool(getDomain(), "usealternate");
165 165
                 break;
166 166
             }
167 167
         }
168 168
 
169 169
         if (!useAlternate && type.equals(CoreActionType.SERVER_GOTPING)) {
170
-            final FrameContainer<?> active = WindowManager.getActiveWindow();
170
+            final FrameContainer active = WindowManager.getActiveWindow();
171 171
             final String value = formatTime(arguments[1]);
172 172
 
173 173
             getHistory(((Server) arguments[0])).add((Long) arguments[1]);
@@ -179,7 +179,7 @@ public final class LagDisplayPlugin extends Plugin implements ActionListener, Co
179 179
 
180 180
             panel.refreshDialog();
181 181
         } else if (!useAlternate && type.equals(CoreActionType.SERVER_NOPING)) {
182
-            final FrameContainer<?> active = WindowManager.getActiveWindow();
182
+            final FrameContainer active = WindowManager.getActiveWindow();
183 183
             final String value = formatTime(arguments[1]) + "+";
184 184
 
185 185
             pings.put(((Server) arguments[0]), value);
@@ -190,7 +190,7 @@ public final class LagDisplayPlugin extends Plugin implements ActionListener, Co
190 190
 
191 191
             panel.refreshDialog();
192 192
         } else if (type.equals(CoreActionType.SERVER_DISCONNECTED)) {
193
-            final FrameContainer<?> active = WindowManager.getActiveWindow();
193
+            final FrameContainer active = WindowManager.getActiveWindow();
194 194
 
195 195
             if (((Server) arguments[0]).isChild(active) || arguments[0] == active) {
196 196
                 panel.setText("Not connected");
@@ -199,7 +199,7 @@ public final class LagDisplayPlugin extends Plugin implements ActionListener, Co
199 199
 
200 200
             panel.refreshDialog();
201 201
         } else if (type.equals(CoreActionType.CLIENT_FRAME_CHANGED)) {
202
-            final FrameContainer<?> source = (FrameContainer<?>) arguments[0];
202
+            final FrameContainer source = (FrameContainer) arguments[0];
203 203
             if (source == null || source.getServer() == null) {
204 204
                 panel.setText("Unknown");
205 205
             } else if (source.getServer().getState() != ServerState.CONNECTED) {
@@ -218,7 +218,7 @@ public final class LagDisplayPlugin extends Plugin implements ActionListener, Co
218 218
                 final long sent = Long.parseLong(((String[]) arguments[2])[3].substring(9));
219 219
                 final Long duration = Long.valueOf(new Date().getTime() - sent);
220 220
                 final String value = formatTime(duration);
221
-                final FrameContainer<?> active = WindowManager.getActiveWindow();
221
+                final FrameContainer active = WindowManager.getActiveWindow();
222 222
 
223 223
                 pings.put((Server) arguments[0], value);
224 224
                 getHistory(((Server) arguments[0])).add(duration);

+ 7
- 5
src/com/dmdirc/addons/logging/HistoryWindow.java Прегледај датотеку

@@ -26,14 +26,15 @@ import com.dmdirc.FrameContainer;
26 26
 import com.dmdirc.Server;
27 27
 import com.dmdirc.config.IdentityManager;
28 28
 import com.dmdirc.ui.WindowManager;
29
+import com.dmdirc.ui.core.components.WindowComponent;
29 30
 import com.dmdirc.ui.interfaces.Window;
30 31
 
32
+import java.util.Arrays;
33
+
31 34
 /**
32 35
  * Displays an extended history of a window.
33
- *
34
- * @author Chris
35 36
  */
36
-public class HistoryWindow extends FrameContainer<Window> {
37
+public class HistoryWindow extends FrameContainer {
37 38
 
38 39
     /**
39 40
      * Creates a new HistoryWindow.
@@ -44,8 +45,9 @@ public class HistoryWindow extends FrameContainer<Window> {
44 45
      * @param numLines The number of lines to show
45 46
      */
46 47
     public HistoryWindow(final String title, final ReverseFileReader reader,
47
-                         final FrameContainer<?> parent, final int numLines) {
48
-        super("raw", title, title, Window.class, parent.getConfigManager());
48
+                         final FrameContainer parent, final int numLines) {
49
+        super("raw", title, title, Window.class, parent.getConfigManager(),
50
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier()));
49 51
 
50 52
         WindowManager.addWindow(parent, this);
51 53
 

+ 1
- 1
src/com/dmdirc/addons/logging/LoggingCommand.java Прегледај датотеку

@@ -51,7 +51,7 @@ public final class LoggingCommand 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
         final PluginInfo pluginInfo = PluginManager.getPluginManager().getPluginInfoByName("logging");
57 57
         if (pluginInfo == null) {

+ 2
- 2
src/com/dmdirc/addons/logging/LoggingPlugin.java Прегледај датотеку

@@ -468,7 +468,7 @@ public class LoggingPlugin extends Plugin implements ActionListener,
468 468
      * @param frame The frame to add the backbuffer lines to
469 469
      * @param filename File to get backbuffer from
470 470
      */
471
-    protected void showBackBuffer(final FrameContainer<?> frame, final String filename) {
471
+    protected void showBackBuffer(final FrameContainer frame, final String filename) {
472 472
         if (frame == null) {
473 473
             Logger.userError(ErrorLevel.LOW, "Given a null frame");
474 474
             return;
@@ -785,7 +785,7 @@ public class LoggingPlugin extends Plugin implements ActionListener,
785 785
      * @param target The window whose history we're trying to open
786 786
      * @return True if the history is available, false otherwise
787 787
      */
788
-    protected boolean showHistory(final FrameContainer<?> target) {
788
+    protected boolean showHistory(final FrameContainer target) {
789 789
         Object component;
790 790
 
791 791
         if (target instanceof Channel) {

+ 2
- 2
src/com/dmdirc/addons/notifications/NotificationCommand.java Прегледај датотеку

@@ -58,7 +58,7 @@ public class NotificationCommand extends Command implements
58 58
 
59 59
     /** {@inheritDoc} */
60 60
     @Override
61
-    public void execute(final FrameContainer<?> origin,
61
+    public void execute(final FrameContainer origin,
62 62
             final CommandArguments args, final CommandContext context) {
63 63
         if (args.getArguments().length > 0 && args.getArguments()[0]
64 64
                 .equalsIgnoreCase("--methods")) {
@@ -95,7 +95,7 @@ public class NotificationCommand extends Command implements
95 95
      * @param origin The input window where the command was entered
96 96
      * @param isSilent Whether this command is being silenced
97 97
      */
98
-    private void doMethodList(final FrameContainer<?> origin,
98
+    private void doMethodList(final FrameContainer origin,
99 99
             final boolean isSilent) {
100 100
         final List<PluginInfo> methods = parent.getMethods();
101 101
 

+ 3
- 3
src/com/dmdirc/addons/nowplaying/NowPlayingCommand.java Прегледај датотеку

@@ -62,9 +62,9 @@ public final class NowPlayingCommand extends Command implements
62 62
 
63 63
     /** {@inheritDoc} */
64 64
     @Override
65
-    public void execute(final FrameContainer<?> origin,
65
+    public void execute(final FrameContainer origin,
66 66
             final CommandArguments args, final CommandContext context) {
67
-        final MessageTarget<?> target = ((ChatCommandContext) context).getChat();
67
+        final MessageTarget target = ((ChatCommandContext) context).getChat();
68 68
         if (args.getArguments().length > 0 && args.getArguments()[0]
69 69
                 .equalsIgnoreCase("--sources")) {
70 70
             doSourceList(origin, args.isSilent(), args.getArgumentsAsString(1));
@@ -106,7 +106,7 @@ public final class NowPlayingCommand extends Command implements
106 106
      * @param isSilent Whether this command is being silenced
107 107
      * @param format Format to be passed to getInformation
108 108
      */
109
-    private void doSourceList(final FrameContainer<?> origin, final boolean isSilent,
109
+    private void doSourceList(final FrameContainer origin, final boolean isSilent,
110 110
             final String format) {
111 111
         final List<MediaSource> sources = parent.getSources();
112 112
 

+ 1
- 1
src/com/dmdirc/addons/osd/OsdCommand.java Прегледај датотеку

@@ -70,7 +70,7 @@ public final class OsdCommand extends Command implements
70 70
 
71 71
     /** {@inheritDoc} */
72 72
     @Override
73
-    public void execute(final FrameContainer<?> origin,
73
+    public void execute(final FrameContainer origin,
74 74
             final CommandArguments args, final CommandContext context) {
75 75
         if (args.getArguments().length > 0
76 76
                 && "--close".equalsIgnoreCase(args.getArguments()[0])) {

+ 7
- 4
src/com/dmdirc/addons/parserdebug/DebugWindow.java Прегледај датотеку

@@ -27,14 +27,15 @@ import com.dmdirc.Server;
27 27
 import com.dmdirc.parser.interfaces.Parser;
28 28
 import com.dmdirc.parser.interfaces.callbacks.DebugInfoListener;
29 29
 import com.dmdirc.ui.WindowManager;
30
+import com.dmdirc.ui.core.components.WindowComponent;
30 31
 import com.dmdirc.ui.interfaces.Window;
31 32
 
33
+import java.util.Arrays;
34
+
32 35
 /**
33 36
  * This class is used to show the parser debug in a window
34
- *
35
- * @author Shane 'Dataforce' McCormack
36 37
  */
37
-public class DebugWindow extends FrameContainer<Window> {
38
+public class DebugWindow extends FrameContainer {
38 39
 
39 40
     /** The plugin that owns this window */
40 41
     protected DebugPlugin plugin;
@@ -52,7 +53,9 @@ public class DebugWindow extends FrameContainer<Window> {
52 53
      * @param server The Server window this is a child of
53 54
      */
54 55
     public DebugWindow(final DebugPlugin plugin, final String title, final Parser parser, final Server server) {
55
-        super("raw", "Parser Debug", title, Window.class, server.getConfigManager());
56
+        super("raw", "Parser Debug", title, Window.class,
57
+                server.getConfigManager(),
58
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier()));
56 59
         this.plugin = plugin;
57 60
         this.parser = parser;
58 61
         this.server = server;

+ 1
- 1
src/com/dmdirc/addons/parserdebug/ParserDebugCommand.java Прегледај датотеку

@@ -67,7 +67,7 @@ public final class ParserDebugCommand extends Command implements CommandInfo {
67 67
      * @param context The Context of this command execution
68 68
      */
69 69
     @Override
70
-    public void execute(final FrameContainer<?> origin, final CommandArguments commandArgs, final CommandContext context) {
70
+    public void execute(final FrameContainer origin, final CommandArguments commandArgs, final CommandContext context) {
71 71
         final boolean isSilent = commandArgs.isSilent();
72 72
   
73 73
         Parser parser = ((ServerCommandContext) context).getServer().getParser();

+ 6
- 6
src/com/dmdirc/addons/redirect/FakeWriteableFrameContainer.java Прегледај датотеку

@@ -28,28 +28,28 @@ import com.dmdirc.WritableFrameContainer;
28 28
 import com.dmdirc.ui.input.TabCompleter;
29 29
 import com.dmdirc.ui.interfaces.InputWindow;
30 30
 import com.dmdirc.ui.messages.Formatter;
31
+import java.util.Collections;
31 32
 
32 33
 import java.util.Date;
33 34
 
34 35
 /**
35 36
  * Implements a fake input window, which sends echoed text to the specified
36 37
  * chat window instead.
37
- * 
38
- * @author Chris
39 38
  */
40
-public class FakeWriteableFrameContainer extends WritableFrameContainer<InputWindow> {
39
+public class FakeWriteableFrameContainer extends WritableFrameContainer {
41 40
     
42 41
     /** The target for this window. */
43
-    private final MessageTarget<? extends InputWindow> target;
42
+    private final MessageTarget target;
44 43
 
45 44
     /**
46 45
      * Creates a new instance of FakeInputWindow.
47 46
      * 
48 47
      * @param target The message target that output gets sent to
49 48
      */
50
-    public FakeWriteableFrameContainer(final MessageTarget<?> target) {
49
+    public FakeWriteableFrameContainer(final MessageTarget target) {
51 50
         super(target.getIcon(), target.getName(), target.getTitle(),
52
-                InputWindow.class, target.getConfigManager(), target.getCommandParser());
51
+                InputWindow.class, target.getConfigManager(),
52
+                target.getCommandParser(), Collections.<String>emptyList());
53 53
         this.target = target;
54 54
     }
55 55
 

+ 2
- 2
src/com/dmdirc/addons/redirect/RedirectCommand.java Прегледај датотеку

@@ -44,9 +44,9 @@ public class RedirectCommand extends Command implements IntelligentCommand,
44 44
 
45 45
     /** {@inheritDoc} */
46 46
     @Override
47
-    public void execute(final FrameContainer<?> origin,
47
+    public void execute(final FrameContainer origin,
48 48
             final CommandArguments args, final CommandContext context) {
49
-        final MessageTarget<?> target = ((ChatCommandContext) context)
49
+        final MessageTarget target = ((ChatCommandContext) context)
50 50
                 .getChat();
51 51
         target.getCommandParser().parseCommand(new FakeWriteableFrameContainer(
52 52
                 target), context.getSource(), args.getArgumentsAsString());

+ 1
- 1
src/com/dmdirc/addons/scriptplugin/ScriptCommand.java Прегледај датотеку

@@ -62,7 +62,7 @@ public final class ScriptCommand extends Command implements IntelligentCommand,
62 62
         
63 63
     /** {@inheritDoc} */
64 64
     @Override
65
-    public void execute(final FrameContainer<?> origin,
65
+    public void execute(final FrameContainer origin,
66 66
             final CommandArguments args, final CommandContext context) {
67 67
         final String[] sargs = args.getArguments();
68 68
     

+ 1
- 1
src/com/dmdirc/addons/systray/PopupCommand.java Прегледај датотеку

@@ -63,7 +63,7 @@ public final class PopupCommand extends Command implements CommandInfo {
63 63
 
64 64
     /** {@inheritDoc} */
65 65
     @Override
66
-    public void execute(final FrameContainer<?> origin,
66
+    public void execute(final FrameContainer origin,
67 67
             final CommandArguments args, final CommandContext context) {
68 68
         showPopup("DMDirc", args.getArgumentsAsString());
69 69
     }

+ 3
- 3
src/com/dmdirc/addons/time/TimedCommand.java Прегледај датотеку

@@ -44,7 +44,7 @@ public final class TimedCommand extends TimerTask {
44 44
     private final String command;
45 45
 
46 46
     /** The container to use for executing commands. */
47
-    private final FrameContainer<?> origin;
47
+    private final FrameContainer origin;
48 48
 
49 49
     /** The window the command came from. */
50 50
     private final Window window;
@@ -69,7 +69,7 @@ public final class TimedCommand extends TimerTask {
69 69
      */
70 70
     public TimedCommand(final TimerManager manager, final int timerKey,
71 71
             final int repetitions, final int delay, final String command,
72
-            final FrameContainer<?> origin, final Window window) {
72
+            final FrameContainer origin, final Window window) {
73 73
         super();
74 74
 
75 75
         this.timerKey = timerKey;
@@ -110,7 +110,7 @@ public final class TimedCommand extends TimerTask {
110 110
         if (origin == null) {
111 111
             parser = GlobalCommandParser.getGlobalCommandParser();
112 112
         } else {
113
-            parser = ((WritableFrameContainer<?>) origin).getCommandParser();
113
+            parser = ((WritableFrameContainer) origin).getCommandParser();
114 114
         }
115 115
 
116 116
         parser.parseCommand(origin, window, command);

+ 2
- 2
src/com/dmdirc/addons/time/TimerCommand.java Прегледај датотеку

@@ -59,7 +59,7 @@ public final class TimerCommand 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
 
65 65
         if (args.getArguments().length > 0) {
@@ -134,7 +134,7 @@ public final class TimerCommand extends Command implements IntelligentCommand,
134 134
      * @param origin The window that the command was entered in
135 135
      * @param isSilent Whether this command is being silenced or not
136 136
      */
137
-    private void doUsage(final FrameContainer<?> origin, final boolean isSilent) {
137
+    private void doUsage(final FrameContainer origin, final boolean isSilent) {
138 138
         showUsage(origin, isSilent, "timer", "[--list|--cancel <timer id> | " +
139 139
                 "<repetitions> <interval> <command>]");
140 140
     }

+ 1
- 1
src/com/dmdirc/addons/time/TimerManager.java Прегледај датотеку

@@ -55,7 +55,7 @@ public class TimerManager {
55 55
      * @param commandContext The window the command came from
56 56
      */
57 57
     public void addTimer(final int repetitions, final int interval,
58
-            final String command, final FrameContainer<?> origin,
58
+            final String command, final FrameContainer origin,
59 59
             final Window commandContext) {
60 60
 
61 61
         synchronized (this) {

+ 0
- 7
src/com/dmdirc/addons/ui_dummy/DummyController.java Прегледај датотеку

@@ -27,7 +27,6 @@ import com.dmdirc.Server;
27 27
 import com.dmdirc.config.prefs.PreferencesInterface;
28 28
 import com.dmdirc.plugins.Plugin;
29 29
 import com.dmdirc.ui.core.components.StatusBarManager;
30
-import com.dmdirc.ui.core.dialogs.sslcertificate.SSLCertificateDialogModel;
31 30
 import com.dmdirc.ui.interfaces.UIController;
32 31
 
33 32
 import java.net.URI;
@@ -80,12 +79,6 @@ public final class DummyController extends Plugin implements UIController {
80 79
         System.out.println(message);
81 80
     }
82 81
 
83
-    /** {@inheritDoc} */
84
-    @Override
85
-    public void showSSLCertificateDialog(final SSLCertificateDialogModel model) {
86
-        throw new UnsupportedOperationException("Not supported yet.");
87
-    }
88
-
89 82
     /** {@inheritDoc} */
90 83
     @Override
91 84
     public void onLoad() {

+ 3
- 3
src/com/dmdirc/addons/ui_dummy/DummyInputWindow.java Прегледај датотеку

@@ -34,7 +34,7 @@ import com.dmdirc.ui.interfaces.UIController;
34 34
 public class DummyInputWindow implements InputWindow {
35 35
 
36 36
     /** Our container. */
37
-    private final WritableFrameContainer<? extends InputWindow> container;
37
+    private final WritableFrameContainer container;
38 38
 
39 39
     /**
40 40
      * Instantiates a new DummyInputWindow.
@@ -42,7 +42,7 @@ public class DummyInputWindow implements InputWindow {
42 42
      * @param owner Parent window
43 43
      * @param commandParser Parent command parser
44 44
      */
45
-    public DummyInputWindow(final WritableFrameContainer<? extends InputWindow> owner,
45
+    public DummyInputWindow(final WritableFrameContainer owner,
46 46
             final CommandParser commandParser) {
47 47
         this.container = owner;
48 48
     }
@@ -55,7 +55,7 @@ public class DummyInputWindow implements InputWindow {
55 55
 
56 56
     /** {@inheritDoc} */
57 57
     @Override
58
-    public WritableFrameContainer<? extends InputWindow> getContainer() {
58
+    public WritableFrameContainer getContainer() {
59 59
         return container;
60 60
     }
61 61
 

+ 0
- 43
src/com/dmdirc/addons/ui_dummy/DummyQueryWindow.java Прегледај датотеку

@@ -1,43 +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
-package com.dmdirc.addons.ui_dummy;
23
-
24
-import com.dmdirc.WritableFrameContainer;
25
-import com.dmdirc.ui.interfaces.QueryWindow;
26
-
27
-/**
28
- * A dummy query window.
29
- * 
30
- * @author chris
31
- */
32
-public class DummyQueryWindow extends DummyInputWindow implements QueryWindow {
33
-
34
-    /**
35
-     * Creates a new dummy query window.
36
-     * 
37
-     * @param owner The window that owns this one
38
-     */
39
-    public DummyQueryWindow(final WritableFrameContainer<? extends QueryWindow> owner) {
40
-        super(owner, owner.getCommandParser());
41
-    }
42
-
43
-}

+ 0
- 43
src/com/dmdirc/addons/ui_dummy/DummyServerWindow.java Прегледај датотеку

@@ -1,43 +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.addons.ui_dummy;
24
-
25
-import com.dmdirc.Server;
26
-import com.dmdirc.commandparser.parsers.ServerCommandParser;
27
-import com.dmdirc.ui.interfaces.ServerWindow;
28
-
29
-/**
30
- * Dummy server window, used for testing.
31
- */
32
-public final class DummyServerWindow extends DummyInputWindow implements ServerWindow {
33
-    
34
-    /** 
35
-     * Instantiates this DummyServerWindow. 
36
-     *
37
-     * @param parent Parent server
38
-     */
39
-    public DummyServerWindow(final Server parent) {
40
-        super(parent, new ServerCommandParser());
41
-    }
42
-    
43
-}

+ 4
- 4
src/com/dmdirc/addons/ui_swing/MainFrame.java Прегледај датотеку

@@ -592,7 +592,7 @@ public final class MainFrame extends JFrame implements WindowListener,
592 592
 
593 593
     /** {@inheritDoc} */
594 594
     @Override
595
-    public void selectionChanged(final FrameContainer<?> window) {
595
+    public void selectionChanged(final FrameContainer window) {
596 596
         activeFrame = (TextFrame) controller.getWindowFactory()
597 597
                 .getSwingWindow(window);
598 598
         focusOrder.offerAndMove(activeFrame);
@@ -642,18 +642,18 @@ public final class MainFrame extends JFrame implements WindowListener,
642 642
 
643 643
     /** {@inheritDoc} */
644 644
     @Override
645
-    public void iconChanged(final FrameContainer<?> window, final String icon) {
645
+    public void iconChanged(final FrameContainer window, final String icon) {
646 646
         //Ignore
647 647
     }
648 648
 
649 649
     /** {@inheritDoc} */
650 650
     @Override
651
-    public void nameChanged(final FrameContainer<?> window, final String name) {
651
+    public void nameChanged(final FrameContainer window, final String name) {
652 652
         //Ignore
653 653
     }
654 654
 
655 655
     @Override
656
-    public void titleChanged(final FrameContainer<?> window,
656
+    public void titleChanged(final FrameContainer window,
657 657
             final String title) {
658 658
         setTitle(title);
659 659
     }

+ 0
- 16
src/com/dmdirc/addons/ui_swing/SwingController.java Прегледај датотеку

@@ -37,7 +37,6 @@ import com.dmdirc.addons.ui_swing.dialogs.prefs.SwingPreferencesDialog;
37 37
 import com.dmdirc.addons.ui_swing.dialogs.prefs.URLConfigPanel;
38 38
 import com.dmdirc.addons.ui_swing.dialogs.prefs.UpdateConfigPanel;
39 39
 import com.dmdirc.addons.ui_swing.dialogs.serversetting.ServerSettingsDialog;
40
-import com.dmdirc.addons.ui_swing.dialogs.sslcertificate.SSLCertificateDialog;
41 40
 import com.dmdirc.addons.ui_swing.dialogs.url.URLDialog;
42 41
 import com.dmdirc.addons.ui_swing.wizard.WizardListener;
43 42
 import com.dmdirc.addons.ui_swing.wizard.firstrun.SwingFirstRunWizard;
@@ -55,7 +54,6 @@ import com.dmdirc.logger.Logger;
55 54
 import com.dmdirc.plugins.Plugin;
56 55
 import com.dmdirc.ui.WindowManager;
57 56
 import com.dmdirc.ui.core.components.StatusBarManager;
58
-import com.dmdirc.ui.core.dialogs.sslcertificate.SSLCertificateDialogModel;
59 57
 import com.dmdirc.ui.core.util.URLHandler;
60 58
 import com.dmdirc.ui.interfaces.InputWindow;
61 59
 import com.dmdirc.ui.interfaces.UIController;
@@ -356,20 +354,6 @@ public class SwingController extends Plugin implements UIController {
356 354
         });
357 355
     }
358 356
 
359
-    /** {@inheritDoc} */
360
-    @Override
361
-    public void showSSLCertificateDialog(
362
-            final SSLCertificateDialogModel model) {
363
-        UIUtilities.invokeLater(new Runnable() {
364
-
365
-            /** {@inheritDoc} */
366
-            @Override
367
-            public void run() {
368
-                new SSLCertificateDialog(me, model).display();
369
-            }
370
-        });
371
-    }
372
-
373 357
     /** {@inheritDoc} */
374 358
     @Override
375 359
     public void showFeedbackNag() {

+ 35
- 26
src/com/dmdirc/addons/ui_swing/SwingWindowFactory.java Прегледај датотеку

@@ -26,39 +26,50 @@ import com.dmdirc.FrameContainer;
26 26
 import com.dmdirc.addons.ui_swing.components.frames.ChannelFrame;
27 27
 import com.dmdirc.addons.ui_swing.components.frames.CustomFrame;
28 28
 import com.dmdirc.addons.ui_swing.components.frames.CustomInputFrame;
29
-import com.dmdirc.addons.ui_swing.components.frames.QueryFrame;
30 29
 import com.dmdirc.addons.ui_swing.components.frames.ServerFrame;
31 30
 import com.dmdirc.logger.ErrorLevel;
32 31
 import com.dmdirc.logger.Logger;
33
-import com.dmdirc.ui.interfaces.ChannelWindow;
32
+import com.dmdirc.ui.core.components.WindowComponent;
34 33
 import com.dmdirc.ui.interfaces.FrameListener;
35
-import com.dmdirc.ui.interfaces.InputWindow;
36
-import com.dmdirc.ui.interfaces.QueryWindow;
37
-import com.dmdirc.ui.interfaces.ServerWindow;
38 34
 import com.dmdirc.ui.interfaces.Window;
39 35
 import com.dmdirc.util.ListenerList;
36
+import java.util.Arrays;
37
+import java.util.Collection;
40 38
 
41 39
 import java.util.HashMap;
40
+import java.util.HashSet;
42 41
 import java.util.Map;
43 42
 
44 43
 /**
45 44
  * Handles creation of windows in the Swing UI.
46 45
  * 
47 46
  * @since 0.6.4
48
- * @author chris
49 47
  */
50 48
 public class SwingWindowFactory implements FrameListener {
51 49
 
52 50
     /** A map of known implementations of window interfaces. */
53
-    private static final Map<Class<? extends Window>, Class<? extends Window>> IMPLEMENTATIONS
54
-            = new HashMap<Class<? extends Window>, Class<? extends Window>>();
51
+    private static final Map<Collection<String>, Class<? extends Window>> IMPLEMENTATIONS
52
+            = new HashMap<Collection<String>, Class<? extends Window>>();
55 53
 
56 54
     static {
57
-        IMPLEMENTATIONS.put(Window.class, CustomFrame.class);
58
-        IMPLEMENTATIONS.put(InputWindow.class, CustomInputFrame.class);
59
-        IMPLEMENTATIONS.put(ServerWindow.class, ServerFrame.class);
60
-        IMPLEMENTATIONS.put(QueryWindow.class, QueryFrame.class);
61
-        IMPLEMENTATIONS.put(ChannelWindow.class, ChannelFrame.class);
55
+        IMPLEMENTATIONS.put(new HashSet<String>(
56
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier())),
57
+                CustomFrame.class);
58
+        IMPLEMENTATIONS.put(new HashSet<String>(
59
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
60
+                WindowComponent.INPUTFIELD.getIdentifier())),
61
+                CustomInputFrame.class);
62
+        IMPLEMENTATIONS.put(new HashSet<String>(
63
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
64
+                WindowComponent.INPUTFIELD.getIdentifier(),
65
+                WindowComponent.CERTIFICATE_VIEWER.getIdentifier())),
66
+                ServerFrame.class);
67
+        IMPLEMENTATIONS.put(new HashSet<String>(
68
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
69
+                WindowComponent.INPUTFIELD.getIdentifier(),
70
+                WindowComponent.TOPICBAR.getIdentifier(),
71
+                WindowComponent.USERLIST.getIdentifier())),
72
+                ChannelFrame.class);
62 73
     }
63 74
 
64 75
     /** The controller that owns this window factory. */
@@ -98,31 +109,29 @@ public class SwingWindowFactory implements FrameListener {
98 109
 
99 110
     /** {@inheritDoc} */
100 111
     @Override
101
-    public void addWindow(final FrameContainer<?> window, final boolean focus) {
112
+    public void addWindow(final FrameContainer window, final boolean focus) {
102 113
         addWindow(null, window, focus);
103 114
     }
104 115
 
105 116
     /**
106 117
      * Creates a new window for the specified container.
107 118
      *
108
-     * @param <T> The type of window that should be created
109 119
      * @param window The container that owns the window
110 120
      * @param focus Whether the window should be focused initially
111 121
      * @return The created window or null on error
112 122
      */
113
-    @SuppressWarnings("unchecked")
114
-    protected <T extends Window> T doAddWindow(final FrameContainer<T> window,
123
+    protected Window doAddWindow(final FrameContainer window,
115 124
             final boolean focus) {
116
-        final Class<T> clazz;
125
+        final Class<? extends Window> clazz;
117 126
 
118
-        if (IMPLEMENTATIONS.containsKey(window.getWindowClass())) {
119
-            clazz = (Class<T>) IMPLEMENTATIONS.get(window.getWindowClass());
127
+        if (IMPLEMENTATIONS.containsKey(window.getComponents())) {
128
+            clazz = IMPLEMENTATIONS.get(window.getComponents());
120 129
         } else {
121 130
             clazz = window.getWindowClass();
122 131
         }
123 132
 
124 133
         try {
125
-            final T frame = (T) clazz.getConstructors()[0].newInstance(controller, window);
134
+            final Window frame = (Window) clazz.getConstructors()[0].newInstance(controller, window);
126 135
             window.addWindow(frame);
127 136
 
128 137
             return frame;
@@ -139,7 +148,7 @@ public class SwingWindowFactory implements FrameListener {
139 148
      * @param window The container whose windows should be searched
140 149
      * @return A relevant window or null
141 150
      */
142
-    public Window getSwingWindow(final FrameContainer<?> window) {
151
+    public Window getSwingWindow(final FrameContainer window) {
143 152
         if (window == null) {
144 153
             return null;
145 154
         }
@@ -155,14 +164,14 @@ public class SwingWindowFactory implements FrameListener {
155 164
 
156 165
     /** {@inheritDoc} */
157 166
     @Override
158
-    public void delWindow(final FrameContainer<?> window) {
167
+    public void delWindow(final FrameContainer window) {
159 168
         delWindow(null, window);
160 169
     }
161 170
 
162 171
     /** {@inheritDoc} */
163 172
     @Override
164
-    public void addWindow(final FrameContainer<?> parent,
165
-            final FrameContainer<?> window, final boolean focus) {
173
+    public void addWindow(final FrameContainer parent,
174
+            final FrameContainer window, final boolean focus) {
166 175
         UIUtilities.invokeLater(new Runnable() {
167 176
 
168 177
             @Override
@@ -187,7 +196,7 @@ public class SwingWindowFactory implements FrameListener {
187 196
 
188 197
     /** {@inheritDoc} */
189 198
     @Override
190
-    public void delWindow(final FrameContainer<?> parent, final FrameContainer<?> window) {
199
+    public void delWindow(final FrameContainer parent, final FrameContainer window) {
191 200
         UIUtilities.invokeLater(new Runnable() {
192 201
 
193 202
             @Override

+ 1
- 1
src/com/dmdirc/addons/ui_swing/components/MDIBar.java Прегледај датотеку

@@ -154,7 +154,7 @@ public class MDIBar extends JPanel implements SwingWindowListener,
154 154
 
155 155
     /** {@inheritDoc} */
156 156
     @Override
157
-    public void selectionChanged(final FrameContainer<?> window) {
157
+    public void selectionChanged(final FrameContainer window) {
158 158
         check();
159 159
     }
160 160
 }

+ 1
- 1
src/com/dmdirc/addons/ui_swing/components/frames/CustomFrame.java Прегледај датотеку

@@ -48,7 +48,7 @@ public class CustomFrame extends TextFrame {
48 48
      * @param controller Swing controller
49 49
      */
50 50
     public CustomFrame(final SwingController controller,
51
-            final FrameContainer<?> owner) {
51
+            final FrameContainer owner) {
52 52
         super(owner, controller);
53 53
 
54 54
         initComponents();

+ 1
- 2
src/com/dmdirc/addons/ui_swing/components/frames/CustomInputFrame.java Прегледај датотеку

@@ -26,7 +26,6 @@ import com.dmdirc.WritableFrameContainer;
26 26
 import com.dmdirc.addons.ui_swing.SwingController;
27 27
 import com.dmdirc.addons.ui_swing.components.inputfields.SwingInputHandler;
28 28
 import com.dmdirc.commandparser.PopupType;
29
-import com.dmdirc.ui.interfaces.InputWindow;
30 29
 
31 30
 import javax.swing.JPopupMenu;
32 31
 
@@ -52,7 +51,7 @@ public class CustomInputFrame extends InputTextFrame {
52 51
      * @param controller Swing controller
53 52
      */
54 53
     public CustomInputFrame(final SwingController controller,
55
-            final WritableFrameContainer<? extends InputWindow> owner) {
54
+            final WritableFrameContainer owner) {
56 55
         super(controller, owner);
57 56
 
58 57
         setInputHandler(new SwingInputHandler(getInputField(),

+ 4
- 4
src/com/dmdirc/addons/ui_swing/components/frames/InputTextFrame.java Прегледај датотеку

@@ -86,7 +86,7 @@ public abstract class InputTextFrame extends TextFrame implements InputWindow,
86 86
      * @param controller Swing controller
87 87
      */
88 88
     public InputTextFrame(final SwingController controller,
89
-            final WritableFrameContainer<? extends InputWindow> owner) {
89
+            final WritableFrameContainer owner) {
90 90
         super(owner, controller);
91 91
 
92 92
         initComponents();
@@ -173,8 +173,8 @@ public abstract class InputTextFrame extends TextFrame implements InputWindow,
173 173
      */
174 174
     @Override
175 175
     @SuppressWarnings("unchecked")
176
-    public WritableFrameContainer<? extends InputWindow> getContainer() {
177
-        return (WritableFrameContainer<? extends InputWindow>) super.
176
+    public WritableFrameContainer getContainer() {
177
+        return (WritableFrameContainer) super.
178 178
                 getContainer();
179 179
     }
180 180
 
@@ -196,7 +196,7 @@ public abstract class InputTextFrame extends TextFrame implements InputWindow,
196 196
     public final void setInputHandler(final InputHandler newInputHandler) {
197 197
         this.inputHandler = newInputHandler;
198 198
         inputHandler.addValidationListener(inputField);
199
-        inputHandler.setTabCompleter(((WritableFrameContainer<?>) frameParent).
199
+        inputHandler.setTabCompleter(((WritableFrameContainer) frameParent).
200 200
                 getTabCompleter());
201 201
     }
202 202
 

+ 0
- 100
src/com/dmdirc/addons/ui_swing/components/frames/QueryFrame.java Прегледај датотеку

@@ -1,100 +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
-package com.dmdirc.addons.ui_swing.components.frames;
23
-
24
-import com.dmdirc.Query;
25
-import com.dmdirc.addons.ui_swing.SwingController;
26
-import com.dmdirc.addons.ui_swing.components.inputfields.SwingInputHandler;
27
-import com.dmdirc.commandparser.PopupType;
28
-import com.dmdirc.ui.interfaces.QueryWindow;
29
-
30
-import javax.swing.JPopupMenu;
31
-
32
-import net.miginfocom.swing.MigLayout;
33
-
34
-/**
35
- * The QueryFrame is the MDI window that shows query messages to the user.
36
- */
37
-public final class QueryFrame extends InputTextFrame implements QueryWindow {
38
-
39
-    /**
40
-     * A version number for this class. It should be changed whenever the class
41
-     * structure is changed (or anything else that would prevent serialized
42
-     * objects being unserialized with the new class).
43
-     */
44
-    private static final long serialVersionUID = 8;
45
-
46
-    /**
47
-     * Creates a new QueryFrame.
48
-     *
49
-     * @param owner Parent Frame container
50
-     * @param controller Swing controller
51
-     */
52
-    public QueryFrame(final SwingController controller, final Query owner) {
53
-        super(controller, owner);
54
-
55
-        initComponents();
56
-
57
-        setInputHandler(new SwingInputHandler(getInputField(),
58
-                owner.getCommandParser(), this));
59
-    }
60
-
61
-    /**
62
-     * Initialises components in this frame.
63
-     */
64
-    private void initComponents() {
65
-        setLayout(new MigLayout("ins 0, fill, hidemode 3, wrap 1"));
66
-        add(getTextPane(), "grow, push");
67
-        add(getSearchBar(), "growx, pushx");
68
-        add(inputPanel, "growx, pushx");
69
-    }
70
-
71
-    /** {@inheritDoc} */
72
-    @Override
73
-    public PopupType getNicknamePopupType() {
74
-        return PopupType.QUERY_NICK;
75
-    }
76
-
77
-    /** {@inheritDoc} */
78
-    @Override
79
-    public PopupType getChannelPopupType() {
80
-        return PopupType.QUERY_NORMAL;
81
-    }
82
-
83
-    /** {@inheritDoc} */
84
-    @Override
85
-    public PopupType getHyperlinkPopupType() {
86
-        return PopupType.QUERY_HYPERLINK;
87
-    }
88
-
89
-    /** {@inheritDoc} */
90
-    @Override
91
-    public PopupType getNormalPopupType() {
92
-        return PopupType.QUERY_NORMAL;
93
-    }
94
-
95
-    /** {@inheritDoc} */
96
-    @Override
97
-    public void addCustomPopupItems(final JPopupMenu popupMenu) {
98
-        //Add no custom popup items
99
-    }
100
-}

+ 1
- 2
src/com/dmdirc/addons/ui_swing/components/frames/ServerFrame.java Прегледај датотеку

@@ -32,7 +32,6 @@ import com.dmdirc.commandparser.PopupType;
32 32
 import com.dmdirc.tls.CertificateManager;
33 33
 import com.dmdirc.tls.CertificateProblemListener;
34 34
 import com.dmdirc.ui.core.dialogs.sslcertificate.SSLCertificateDialogModel;
35
-import com.dmdirc.ui.interfaces.ServerWindow;
36 35
 
37 36
 import java.awt.event.ActionEvent;
38 37
 import java.awt.event.ActionListener;
@@ -48,7 +47,7 @@ import net.miginfocom.swing.MigLayout;
48 47
 /**
49 48
  * The ServerFrame is the MDI window that shows server messages to the user.
50 49
  */
51
-public final class ServerFrame extends InputTextFrame implements ServerWindow,
50
+public final class ServerFrame extends InputTextFrame implements
52 51
         ActionListener, CertificateProblemListener {
53 52
 
54 53
     /**

+ 5
- 5
src/com/dmdirc/addons/ui_swing/components/frames/TextFrame.java Прегледај датотеку

@@ -85,7 +85,7 @@ public abstract class TextFrame extends JPanel implements Window,
85 85
      */
86 86
     private static final long serialVersionUID = 5;
87 87
     /** The channel object that owns this frame. */
88
-    protected final FrameContainer<?> frameParent;
88
+    protected final FrameContainer frameParent;
89 89
     /** Frame output pane. */
90 90
     private TextPane textPane;
91 91
     /** search bar. */
@@ -101,7 +101,7 @@ public abstract class TextFrame extends JPanel implements Window,
101 101
      * @param owner FrameContainer owning this frame.
102 102
      * @param controller Swing controller
103 103
      */
104
-    public TextFrame(final FrameContainer<?> owner,
104
+    public TextFrame(final FrameContainer owner,
105 105
             final SwingController controller) {
106 106
         super();
107 107
         this.controller = controller;
@@ -228,7 +228,7 @@ public abstract class TextFrame extends JPanel implements Window,
228 228
 
229 229
     /** {@inheritDoc} */
230 230
     @Override
231
-    public FrameContainer<?> getContainer() {
231
+    public FrameContainer getContainer() {
232 232
         return frameParent;
233 233
     }
234 234
 
@@ -248,7 +248,7 @@ public abstract class TextFrame extends JPanel implements Window,
248 248
             return "";
249 249
         }
250 250
 
251
-        return frameParent.toString();
251
+        return frameParent.getName();
252 252
     }
253 253
 
254 254
     /**
@@ -486,7 +486,7 @@ public abstract class TextFrame extends JPanel implements Window,
486 486
     
487 487
     /** {@inheritDoc} */
488 488
     @Override
489
-    public void windowClosing(final FrameContainer<?> window) {
489
+    public void windowClosing(final FrameContainer window) {
490 490
         setVisible(false);
491 491
     }
492 492
 

+ 2
- 2
src/com/dmdirc/addons/ui_swing/components/menubar/ChannelMenu.java Прегледај датотеку

@@ -102,7 +102,7 @@ public class ChannelMenu extends JMenu implements ActionListener,
102 102
                     "Join channel", "Enter the name of the channel to join.")
103 103
                     .display();
104 104
         } else if (e.getActionCommand().equals("ChannelSettings")) {
105
-            final FrameContainer<?> activeWindow = WindowManager
105
+            final FrameContainer activeWindow = WindowManager
106 106
                     .getActiveWindow();
107 107
             if (activeWindow instanceof Channel) {
108 108
                 controller.showChannelSettingsDialog(((Channel) activeWindow));
@@ -113,7 +113,7 @@ public class ChannelMenu extends JMenu implements ActionListener,
113 113
     /** {@inheritDoc} */
114 114
     @Override
115 115
     public final void menuSelected(final MenuEvent e) {
116
-        final FrameContainer<?> activeWindow = WindowManager.getActiveWindow();
116
+        final FrameContainer activeWindow = WindowManager.getActiveWindow();
117 117
 
118 118
         join.setEnabled(activeWindow != null && activeWindow.getServer()
119 119
                 != null && activeWindow.getServer().getState()

+ 1
- 1
src/com/dmdirc/addons/ui_swing/components/menubar/ServerMenu.java Прегледај датотеку

@@ -139,7 +139,7 @@ public class ServerMenu extends JMenu implements ActionListener,
139 139
     /** {@inheritDoc} */
140 140
     @Override
141 141
     public final void menuSelected(final MenuEvent e) {
142
-        final FrameContainer<?> activeWindow = WindowManager.getActiveWindow();
142
+        final FrameContainer activeWindow = WindowManager.getActiveWindow();
143 143
 
144 144
         ssd.setEnabled(activeWindow != null && activeWindow
145 145
                 .getServer() != null && activeWindow.getServer().getState()

+ 20
- 20
src/com/dmdirc/addons/ui_swing/framemanager/buttonbar/ButtonBar.java Прегледај датотеку

@@ -102,7 +102,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
102 102
     /** The parent for the manager. */
103 103
     private JComponent parent;
104 104
     /** The currently selected frame. */
105
-    private transient FrameContainer<?> selected;
105
+    private transient FrameContainer selected;
106 106
     /** Selected window. */
107 107
     private Window activeWindow;
108 108
     /** Sort root windows prefs setting. */
@@ -207,10 +207,10 @@ public final class ButtonBar implements FrameManager, ActionListener,
207 207
      * @since 0.6.4
208 208
      */
209 209
     private void initButtons(
210
-            final Collection<FrameContainer<?>> windowCollection) {
210
+            final Collection<FrameContainer> windowCollection) {
211 211
         Window window;
212 212
         Window parentWindow;
213
-        for (FrameContainer<?> frame : windowCollection) {
213
+        for (FrameContainer frame : windowCollection) {
214 214
             window = windowFactory.getSwingWindow(frame);
215 215
             parentWindow = windowFactory.getSwingWindow(frame.getParent());
216 216
             if (window != null) {
@@ -218,8 +218,8 @@ public final class ButtonBar implements FrameManager, ActionListener,
218 218
             }
219 219
 
220 220
             if (!frame.getChildren().isEmpty()) {
221
-                final ArrayList<FrameContainer<?>> childList = new ArrayList
222
-                        <FrameContainer<?>>(frame.getChildren());
221
+                final ArrayList<FrameContainer> childList = new ArrayList
222
+                        <FrameContainer>(frame.getChildren());
223 223
                 initButtons(childList);
224 224
             }
225 225
         }
@@ -232,7 +232,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
232 232
      * @return {@link FrameToggleButton} object asociated with this
233 233
      * FrameContainer. Returns null if none exist
234 234
      */
235
-    public FrameToggleButton getButton(final FrameContainer<?> frame) {
235
+    public FrameToggleButton getButton(final FrameContainer frame) {
236 236
         final Window window = windowFactory.getSwingWindow(frame);
237 237
         if (buttons.containsKey(window)) {
238 238
             return buttons.get(window);
@@ -265,17 +265,17 @@ public final class ButtonBar implements FrameManager, ActionListener,
265 265
      * @since 0.6.4
266 266
      */
267 267
     private void displayButtons(
268
-            final Collection<FrameContainer<?>> windowCollection) {
268
+            final Collection<FrameContainer> windowCollection) {
269 269
         FrameToggleButton button;
270
-        for (FrameContainer<?> window : windowCollection) {
270
+        for (FrameContainer window : windowCollection) {
271 271
             button = getButton(window);
272 272
             if (button != null) {
273 273
                 button.setPreferredSize(
274 274
                         new Dimension(buttonWidth, BUTTON_HEIGHT));
275 275
                 buttonPanel.add(button);
276 276
                 if (!window.getChildren().isEmpty()) {
277
-                    final ArrayList<FrameContainer<?>> childList = new ArrayList
278
-                            <FrameContainer<?>>(window.getChildren());
277
+                    final ArrayList<FrameContainer> childList = new ArrayList
278
+                            <FrameContainer>(window.getChildren());
279 279
                     if (sortChildWindows) {
280 280
                          Collections.sort(childList,
281 281
                                  new FrameContainerComparator());
@@ -293,8 +293,8 @@ public final class ButtonBar implements FrameManager, ActionListener,
293 293
         buttonPanel.setVisible(false);
294 294
         buttonPanel.removeAll();
295 295
 
296
-        final ArrayList<FrameContainer<?>> windowList = new
297
-                ArrayList<FrameContainer<?>>(WindowManager.getRootWindows());
296
+        final ArrayList<FrameContainer> windowList = new
297
+                ArrayList<FrameContainer>(WindowManager.getRootWindows());
298 298
         if (sortRootWindows) {
299 299
             Collections.sort(windowList, new FrameContainerComparator());
300 300
         }
@@ -311,7 +311,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
311 311
      */
312 312
     private void addButton(final Window source) {
313 313
         final FrameToggleButton button = new FrameToggleButton(
314
-                source.getContainer().toString(), IconManager.getIconManager()
314
+                source.getContainer().getName(), IconManager.getIconManager()
315 315
                 .getIcon(source.getContainer().getIcon()), source);
316 316
         button.addActionListener(this);
317 317
         button.addMouseListener(this);
@@ -380,7 +380,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
380 380
     @Override
381 381
     public void actionPerformed(final ActionEvent e) {
382 382
         final FrameToggleButton button = (FrameToggleButton) e.getSource();
383
-        final FrameContainer<?> window =  button.getFrameContainer();
383
+        final FrameContainer window =  button.getFrameContainer();
384 384
         final TextFrame frame = (TextFrame) button.getWindow();
385 385
         if (frame != null && window.equals(activeWindow.getContainer())) {
386 386
             button.setSelected(true);
@@ -432,7 +432,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
432 432
 
433 433
     /** {@inheritDoc} */
434 434
     @Override
435
-    public void notificationSet(final FrameContainer<?> window,
435
+    public void notificationSet(final FrameContainer window,
436 436
             final Color colour) {
437 437
         UIUtilities.invokeLater(new Runnable() {
438 438
 
@@ -449,7 +449,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
449 449
 
450 450
     /** {@inheritDoc} */
451 451
     @Override
452
-    public void notificationCleared(final FrameContainer<?> window) {
452
+    public void notificationCleared(final FrameContainer window) {
453 453
         UIUtilities.invokeLater(new Runnable() {
454 454
 
455 455
             /** {@inheritDoc} */
@@ -462,7 +462,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
462 462
 
463 463
     /** {@inheritDoc} */
464 464
     @Override
465
-    public void selectionChanged(final FrameContainer<?> window) {
465
+    public void selectionChanged(final FrameContainer window) {
466 466
         UIUtilities.invokeLater(new Runnable() {
467 467
 
468 468
             /** {@inheritDoc} */
@@ -488,7 +488,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
488 488
 
489 489
     /** {@inheritDoc} */
490 490
     @Override
491
-    public void iconChanged(final FrameContainer<?> window, final String icon) {
491
+    public void iconChanged(final FrameContainer window, final String icon) {
492 492
         UIUtilities.invokeLater(new Runnable() {
493 493
 
494 494
             /** {@inheritDoc} */
@@ -504,7 +504,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
504 504
 
505 505
     /** {@inheritDoc} */
506 506
     @Override
507
-    public void nameChanged(final FrameContainer<?> window, final String name) {
507
+    public void nameChanged(final FrameContainer window, final String name) {
508 508
         UIUtilities.invokeLater(new Runnable() {
509 509
 
510 510
             /** {@inheritDoc} */
@@ -520,7 +520,7 @@ public final class ButtonBar implements FrameManager, ActionListener,
520 520
 
521 521
     /** {@inheritDoc} */
522 522
     @Override
523
-    public void titleChanged(final FrameContainer<?> window,
523
+    public void titleChanged(final FrameContainer window,
524 524
             final String title) {
525 525
         // Do nothing
526 526
     }

+ 1
- 1
src/com/dmdirc/addons/ui_swing/framemanager/buttonbar/FrameToggleButton.java Прегледај датотеку

@@ -64,7 +64,7 @@ public class FrameToggleButton extends JToggleButton {
64 64
      *
65 65
      * @return FrameContainer associated with this button
66 66
      */
67
-    public FrameContainer<?> getFrameContainer() {
67
+    public FrameContainer getFrameContainer() {
68 68
         return window.getContainer();
69 69
     }
70 70
 

+ 1
- 1
src/com/dmdirc/addons/ui_swing/framemanager/ctrltab/CtrlTabWindowManager.java Прегледај датотеку

@@ -165,7 +165,7 @@ public class CtrlTabWindowManager implements SwingWindowListener,
165 165
 
166 166
     /* {@inheritDoc} */
167 167
     @Override
168
-    public void selectionChanged(final FrameContainer<?> window) {
168
+    public void selectionChanged(final FrameContainer window) {
169 169
         UIUtilities.invokeLater(new Runnable() {
170 170
 
171 171
             /** {@inheritDoc} */

+ 12
- 12
src/com/dmdirc/addons/ui_swing/framemanager/tree/NodeLabel.java Прегледај датотеку

@@ -57,7 +57,7 @@ public class NodeLabel extends JPanel implements SelectionListener,
57 57
      */
58 58
     private static final long serialVersionUID = 1;
59 59
     /** The window this node represents in the tree. */
60
-    private final FrameContainer<?> window;
60
+    private final FrameContainer window;
61 61
     /** Colour used to show if the mouse is over this node. */
62 62
     private boolean rollover;
63 63
     /** Colour used to show if this node has an active notification. */
@@ -77,7 +77,7 @@ public class NodeLabel extends JPanel implements SelectionListener,
77 77
      *
78 78
      * @param window Window for this node
79 79
      */
80
-    public NodeLabel(final FrameContainer<?> window) {
80
+    public NodeLabel(final FrameContainer window) {
81 81
         super();
82 82
 
83 83
         this.window = window;
@@ -94,7 +94,7 @@ public class NodeLabel extends JPanel implements SelectionListener,
94 94
         }
95 95
 
96 96
         icon.setIcon(IconManager.getIconManager().getIcon(window.getIcon()));
97
-        text.setText(window.toString());
97
+        text.setText(window.getName());
98 98
         text.setBorder(null);
99 99
 
100 100
         setLayout(new MigLayout("ins 0"));
@@ -115,7 +115,7 @@ public class NodeLabel extends JPanel implements SelectionListener,
115 115
 
116 116
     /** {@inheritDoc} */
117 117
     @Override
118
-    public void selectionChanged(final FrameContainer<?> window) {
118
+    public void selectionChanged(final FrameContainer window) {
119 119
         if (equals(window)) {
120 120
             selected = true;
121 121
         } else {
@@ -125,7 +125,7 @@ public class NodeLabel extends JPanel implements SelectionListener,
125 125
 
126 126
     /** {@inheritDoc} */
127 127
     @Override
128
-    public void notificationSet(final FrameContainer<?> window,
128
+    public void notificationSet(final FrameContainer window,
129 129
             final Color colour) {
130 130
         if (equals(window)) {
131 131
             notificationColour = colour;
@@ -134,7 +134,7 @@ public class NodeLabel extends JPanel implements SelectionListener,
134 134
 
135 135
     /** {@inheritDoc} */
136 136
     @Override
137
-    public void notificationCleared(final FrameContainer<?> window) {
137
+    public void notificationCleared(final FrameContainer window) {
138 138
         if (equals(window)) {
139 139
             notificationColour = null;
140 140
         }
@@ -142,7 +142,7 @@ public class NodeLabel extends JPanel implements SelectionListener,
142 142
 
143 143
     /** {@inheritDoc} */
144 144
     @Override
145
-    public void iconChanged(final FrameContainer<?> window, final String icon) {
145
+    public void iconChanged(final FrameContainer window, final String icon) {
146 146
         if (equals(window)) {
147 147
             this.icon.setIcon(IconManager.getIconManager().getIcon(icon));
148 148
         }
@@ -150,13 +150,13 @@ public class NodeLabel extends JPanel implements SelectionListener,
150 150
 
151 151
     /** {@inheritDoc} */
152 152
     @Override
153
-    public void nameChanged(final FrameContainer<?> window, final String name) {
153
+    public void nameChanged(final FrameContainer window, final String name) {
154 154
         // Do nothing
155 155
     }
156 156
 
157 157
     /** {@inheritDoc} */
158 158
     @Override
159
-    public void titleChanged(final FrameContainer<?> window,
159
+    public void titleChanged(final FrameContainer window,
160 160
             final String title) {
161 161
         // Do nothing
162 162
     }
@@ -295,13 +295,13 @@ public class NodeLabel extends JPanel implements SelectionListener,
295 295
      * @param newText Style to set
296 296
      */
297 297
     public void setTextStyle(final Styliser styliser, final String newText) {
298
-        if (currentText.equals(newText + window.toString())) {
298
+        if (currentText.equals(newText + window.getName())) {
299 299
             return;
300 300
         }
301 301
         text.setText("");
302
-        currentText = newText + window.toString();
302
+        currentText = newText + window.getName();
303 303
         styliser.addStyledString((StyledDocument) text.getDocument(),
304
-                new String[] {newText, window.toString(), });
304
+                new String[] {newText, window.getName(), });
305 305
     }
306 306
 
307 307
 }

+ 5
- 5
src/com/dmdirc/addons/ui_swing/framemanager/tree/TreeFrameManager.java Прегледај датотеку

@@ -76,7 +76,7 @@ public final class TreeFrameManager implements FrameManager,
76 76
     /** data model. */
77 77
     private TreeViewModel model;
78 78
     /** node storage, used for adding and deleting nodes correctly. */
79
-    private final Map<FrameContainer<?>, TreeViewNode> nodes;
79
+    private final Map<FrameContainer, TreeViewNode> nodes;
80 80
     /** UI Controller. */
81 81
     private SwingController controller;
82 82
     /** Tree scroller. */
@@ -84,7 +84,7 @@ public final class TreeFrameManager implements FrameManager,
84 84
 
85 85
     /** creates a new instance of the TreeFrameManager. */
86 86
     public TreeFrameManager() {
87
-        nodes = new HashMap<FrameContainer<?>, TreeViewNode>();
87
+        nodes = new HashMap<FrameContainer, TreeViewNode>();
88 88
     }
89 89
 
90 90
     /** {@inheritDoc} */
@@ -214,7 +214,7 @@ public final class TreeFrameManager implements FrameManager,
214 214
      * @param window Window to add
215 215
      */
216 216
     public void addWindow(final TreeViewNode parent,
217
-            final FrameContainer<?> window) {
217
+            final FrameContainer window) {
218 218
         UIUtilities.invokeAndWait(new Runnable() {
219 219
 
220 220
             /** {@inheritDoc} */
@@ -316,10 +316,10 @@ public final class TreeFrameManager implements FrameManager,
316 316
                 }
317 317
                 scroller = new TreeTreeScroller(tree);
318 318
 
319
-                for (FrameContainer<?> window
319
+                for (FrameContainer window
320 320
                         : WindowManager.getRootWindows()) {
321 321
                     addWindow(null, window);
322
-                    final Collection<FrameContainer<?>> childWindows = window
322
+                    final Collection<FrameContainer> childWindows = window
323 323
                             .getChildren();
324 324
                     for (FrameContainer childWindow : childWindows) {
325 325
                         addWindow(nodes.get(window), childWindow);

+ 3
- 3
src/com/dmdirc/addons/ui_swing/framemanager/tree/TreeViewNode.java Прегледај датотеку

@@ -40,7 +40,7 @@ public class TreeViewNode extends DefaultMutableTreeNode {
40 40
     /** Node's label. */
41 41
     private final NodeLabel label;
42 42
     /** Node's frame container. */
43
-    private final FrameContainer<?> window;
43
+    private final FrameContainer window;
44 44
 
45 45
     /**
46 46
      * Instantiates a new tree view node.
@@ -48,7 +48,7 @@ public class TreeViewNode extends DefaultMutableTreeNode {
48 48
      * @param label Node label
49 49
      * @param window Node window
50 50
      */
51
-    public TreeViewNode(final NodeLabel label, final FrameContainer<?> window) {
51
+    public TreeViewNode(final NodeLabel label, final FrameContainer window) {
52 52
         super();
53 53
 
54 54
         this.label = label;
@@ -69,7 +69,7 @@ public class TreeViewNode extends DefaultMutableTreeNode {
69 69
      *
70 70
      * @return Node window
71 71
      */
72
-    public FrameContainer<?> getWindow() {
72
+    public FrameContainer getWindow() {
73 73
         return window;
74 74
     }
75 75
 }

+ 1
- 1
src/com/dmdirc/addons/ui_swing/framemanager/windowmenu/FrameContainerMenu.java Прегледај датотеку

@@ -59,7 +59,7 @@ public class FrameContainerMenu extends JMenu implements FrameInfoListener,
59 59
      */
60 60
     public FrameContainerMenu(final FrameContainer frame,
61 61
             final SwingController controller) {
62
-        super(frame.toString());
62
+        super(frame.getName());
63 63
         setIcon(IconManager.getIconManager().getIcon(frame.getIcon()));
64 64
         new WindowMenuScroller(this, controller.getDomain(), 0);
65 65
 

+ 1
- 1
src/com/dmdirc/addons/ui_swing/framemanager/windowmenu/FrameContainerMenuItem.java Прегледај датотеку

@@ -60,7 +60,7 @@ public class FrameContainerMenuItem extends JMenuItem implements FrameInfoListen
60 60
      */
61 61
     public FrameContainerMenuItem(final FrameContainer frame,
62 62
             final WindowMenuFrameManager manager) {
63
-        super(frame.toString(), IconManager.getIconManager().getIcon(frame.
63
+        super(frame.getName(), IconManager.getIconManager().getIcon(frame.
64 64
                 getIcon()));
65 65
 
66 66
         this.frame = frame;

+ 4
- 4
src/com/dmdirc/addons/ui_swing/framemanager/windowmenu/WindowMenuFrameManager.java Прегледај датотеку

@@ -368,14 +368,14 @@ public final class WindowMenuFrameManager extends JMenu implements
368 368
             if (!(component instanceof FrameContainerMenuInterface)) {
369 369
                 continue;
370 370
             }
371
-            final FrameContainer child = ((FrameContainerMenuInterface) component).
372
-                    getFrame();
371
+            final FrameContainer child
372
+                    = ((FrameContainerMenuInterface) component).getFrame();
373 373
             if (sortBefore(newChild, child)) {
374 374
                 return i;
375 375
             } else if (!sortAfter(newChild, child) && IdentityManager.
376 376
                     getGlobalConfig().getOptionBool("treeview",
377
-                    "sortwindows") && newChild.toString().compareToIgnoreCase(
378
-                    child.toString()) < 0) {
377
+                    "sortwindows") && newChild.getName().compareToIgnoreCase(
378
+                    child.getName()) < 0) {
379 379
                 return i;
380 380
             }
381 381
         }

+ 0
- 7
src/com/dmdirc/addons/ui_web/WebInterfaceUI.java Прегледај датотеку

@@ -27,7 +27,6 @@ import com.dmdirc.Server;
27 27
 import com.dmdirc.addons.ui_web.uicomponents.WebStatusBar;
28 28
 import com.dmdirc.config.prefs.PreferencesInterface;
29 29
 import com.dmdirc.ui.core.components.StatusBarManager;
30
-import com.dmdirc.ui.core.dialogs.sslcertificate.SSLCertificateDialogModel;
31 30
 import com.dmdirc.ui.interfaces.UIController;
32 31
 
33 32
 import java.net.URI;
@@ -143,12 +142,6 @@ public class WebInterfaceUI implements UIController {
143 142
         // Do nothing
144 143
     }
145 144
 
146
-    /** {@inheritDoc} */
147
-    @Override
148
-    public void showSSLCertificateDialog(final SSLCertificateDialogModel model) {
149
-        // Do nothing
150
-    }
151
-
152 145
     @Override
153 146
     public PreferencesInterface getPluginPrefsPanel() {
154 147
         //TODO FIXME

+ 39
- 29
src/com/dmdirc/addons/ui_web/WebWindowManager.java Прегледај датотеку

@@ -25,20 +25,19 @@ package com.dmdirc.addons.ui_web;
25 25
 import com.dmdirc.FrameContainer;
26 26
 import com.dmdirc.addons.ui_web.uicomponents.WebChannelWindow;
27 27
 import com.dmdirc.addons.ui_web.uicomponents.WebInputWindow;
28
-import com.dmdirc.addons.ui_web.uicomponents.WebQueryWindow;
29 28
 import com.dmdirc.addons.ui_web.uicomponents.WebServerWindow;
30 29
 import com.dmdirc.addons.ui_web.uicomponents.WebWindow;
31 30
 import com.dmdirc.logger.ErrorLevel;
32 31
 import com.dmdirc.logger.Logger;
33 32
 import com.dmdirc.ui.WindowManager;
34
-import com.dmdirc.ui.interfaces.ChannelWindow;
33
+import com.dmdirc.ui.core.components.WindowComponent;
35 34
 import com.dmdirc.ui.interfaces.FrameListener;
36
-import com.dmdirc.ui.interfaces.InputWindow;
37
-import com.dmdirc.ui.interfaces.QueryWindow;
38
-import com.dmdirc.ui.interfaces.ServerWindow;
39 35
 import com.dmdirc.ui.interfaces.Window;
40 36
 
37
+import java.util.Arrays;
38
+import java.util.Collection;
41 39
 import java.util.HashMap;
40
+import java.util.HashSet;
42 41
 import java.util.Map;
43 42
 
44 43
 /**
@@ -47,23 +46,36 @@ import java.util.Map;
47 46
 public class WebWindowManager implements FrameListener {
48 47
 
49 48
     /** A map of known implementations of window interfaces. */
50
-    private static final Map<Class<? extends Window>, Class<? extends Window>> IMPLEMENTATIONS
51
-            = new HashMap<Class<? extends Window>, Class<? extends Window>>();
49
+    private static final Map<Collection<String>, Class<? extends Window>> IMPLEMENTATIONS
50
+            = new HashMap<Collection<String>, Class<? extends Window>>();
52 51
 
53 52
     static {
54
-        IMPLEMENTATIONS.put(Window.class, WebWindow.class);
55
-        IMPLEMENTATIONS.put(InputWindow.class, WebInputWindow.class);
56
-        IMPLEMENTATIONS.put(ServerWindow.class, WebServerWindow.class);
57
-        IMPLEMENTATIONS.put(QueryWindow.class, WebQueryWindow.class);
58
-        IMPLEMENTATIONS.put(ChannelWindow.class, WebChannelWindow.class);
53
+        IMPLEMENTATIONS.put(new HashSet<String>(
54
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier())),
55
+                WebWindow.class);
56
+        IMPLEMENTATIONS.put(new HashSet<String>(
57
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
58
+                WindowComponent.INPUTFIELD.getIdentifier())),
59
+                WebInputWindow.class);
60
+        IMPLEMENTATIONS.put(new HashSet<String>(
61
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
62
+                WindowComponent.INPUTFIELD.getIdentifier(),
63
+                WindowComponent.CERTIFICATE_VIEWER.getIdentifier())),
64
+                WebServerWindow.class);
65
+        IMPLEMENTATIONS.put(new HashSet<String>(
66
+                Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
67
+                WindowComponent.INPUTFIELD.getIdentifier(),
68
+                WindowComponent.TOPICBAR.getIdentifier(),
69
+                WindowComponent.USERLIST.getIdentifier())),
70
+                WebChannelWindow.class);
59 71
     }
60 72
 
61 73
     /** The controller that owns this manager. */
62 74
     private final WebInterfaceUI controller;
63 75
 
64 76
     /** Map of known windows. */
65
-    private final Map<FrameContainer<?>, Window> windows
66
-            = new HashMap<FrameContainer<?>, Window>();
77
+    private final Map<FrameContainer, Window> windows
78
+            = new HashMap<FrameContainer, Window>();
67 79
 
68 80
     /**
69 81
      * Creates a new window manager for the specified controller.
@@ -75,7 +87,7 @@ public class WebWindowManager implements FrameListener {
75 87
 
76 88
         WindowManager.addFrameListener(this);
77 89
 
78
-        for (FrameContainer<?> container : WindowManager.getRootWindows()) {
90
+        for (FrameContainer container : WindowManager.getRootWindows()) {
79 91
             recursiveAdd(container);
80 92
         }
81 93
     }
@@ -87,7 +99,7 @@ public class WebWindowManager implements FrameListener {
87 99
      * @param container The container whose window should be retrieved
88 100
      * @return The corresponding web window, or null if there is none
89 101
      */
90
-    public Window getWindow(final FrameContainer<?> container) {
102
+    public Window getWindow(final FrameContainer container) {
91 103
         return windows.get(container);
92 104
     }
93 105
 
@@ -97,23 +109,23 @@ public class WebWindowManager implements FrameListener {
97 109
      *
98 110
      * @param container The container to create windows for
99 111
      */
100
-    private void recursiveAdd(final FrameContainer<?> container) {
112
+    private void recursiveAdd(final FrameContainer container) {
101 113
         addWindow(container, false);
102 114
 
103
-        for (FrameContainer<?> child : container.getChildren()) {
115
+        for (FrameContainer child : container.getChildren()) {
104 116
             recursiveAdd(child);
105 117
         }
106 118
     }
107 119
 
108 120
     /** {@inheritDoc} */
109 121
     @Override
110
-    public void addWindow(final FrameContainer<?> window, final boolean focus) {
122
+    public void addWindow(final FrameContainer window, final boolean focus) {
111 123
         doAddWindow(window, focus);
112 124
     }
113 125
 
114 126
     /** {@inheritDoc} */
115 127
     @Override
116
-    public void delWindow(final FrameContainer<?> window) {
128
+    public void delWindow(final FrameContainer window) {
117 129
         if (windows.containsKey(window)) {
118 130
             windows.get(window).close();
119 131
             windows.remove(window);
@@ -122,7 +134,7 @@ public class WebWindowManager implements FrameListener {
122 134
 
123 135
     /** {@inheritDoc} */
124 136
     @Override
125
-    public void addWindow(final FrameContainer<?> parent, final FrameContainer<?> window,
137
+    public void addWindow(final FrameContainer parent, final FrameContainer window,
126 138
             final boolean focus) {
127 139
         if (windows.containsKey(parent)) {
128 140
             addWindow(window, focus);
@@ -131,7 +143,7 @@ public class WebWindowManager implements FrameListener {
131 143
 
132 144
     /** {@inheritDoc} */
133 145
     @Override
134
-    public void delWindow(final FrameContainer<?> parent, final FrameContainer<?> window) {
146
+    public void delWindow(final FrameContainer parent, final FrameContainer window) {
135 147
         if (windows.containsKey(parent)) {
136 148
             delWindow(window);
137 149
         }
@@ -140,23 +152,21 @@ public class WebWindowManager implements FrameListener {
140 152
     /**
141 153
      * Creates a new window for the specified container.
142 154
      *
143
-     * @param <T> The type of window that should be created
144 155
      * @param window The container that owns the window
145 156
      * @param focus Whether the window should be focused initially
146 157
      */
147
-    @SuppressWarnings("unchecked")
148
-    protected <T extends Window> void doAddWindow(final FrameContainer<T> window,
158
+    protected void doAddWindow(final FrameContainer window,
149 159
             final boolean focus) {
150
-        final Class<T> clazz;
160
+        final Class<? extends Window> clazz;
151 161
 
152
-        if (IMPLEMENTATIONS.containsKey(window.getWindowClass())) {
153
-            clazz = (Class<T>) IMPLEMENTATIONS.get(window.getWindowClass());
162
+        if (IMPLEMENTATIONS.containsKey(window.getComponents())) {
163
+            clazz = IMPLEMENTATIONS.get(window.getComponents());
154 164
         } else {
155 165
             clazz = window.getWindowClass();
156 166
         }
157 167
 
158 168
         try {
159
-            final T frame = (T) clazz.getConstructors()[0].newInstance(controller, window);
169
+            final Window frame = (Window) clazz.getConstructors()[0].newInstance(controller, window);
160 170
             window.addWindow(frame);
161 171
 
162 172
             windows.put(window, frame);

+ 3
- 3
src/com/dmdirc/addons/ui_web/uicomponents/WebInputWindow.java Прегледај датотеку

@@ -37,7 +37,7 @@ import java.util.Map;
37 37
  */
38 38
 public class WebInputWindow extends WebWindow implements InputWindow {
39 39
 
40
-    private final WritableFrameContainer<?> parent;
40
+    private final WritableFrameContainer parent;
41 41
 
42 42
     private final CommandParser commandparser;
43 43
 
@@ -47,7 +47,7 @@ public class WebInputWindow extends WebWindow implements InputWindow {
47 47
             = new HashMap<String, WebInputHandler>();
48 48
 
49 49
     public WebInputWindow(final WebInterfaceUI controller,
50
-            final WritableFrameContainer<?> parent) {
50
+            final WritableFrameContainer parent) {
51 51
         super(controller, parent);
52 52
         this.parent = parent;
53 53
         this.commandparser = parent.getCommandParser();
@@ -95,7 +95,7 @@ public class WebInputWindow extends WebWindow implements InputWindow {
95 95
 
96 96
     /** {@inheritDoc} */
97 97
     @Override
98
-    public WritableFrameContainer<?> getContainer() {
98
+    public WritableFrameContainer getContainer() {
99 99
         return parent;
100 100
     }
101 101
 

+ 0
- 42
src/com/dmdirc/addons/ui_web/uicomponents/WebQueryWindow.java Прегледај датотеку

@@ -1,42 +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.addons.ui_web.uicomponents;
24
-
25
-import com.dmdirc.Query;
26
-import com.dmdirc.addons.ui_web.WebInterfaceUI;
27
-import com.dmdirc.ui.interfaces.QueryWindow;
28
-
29
-/**
30
- *
31
- * @author chris
32
- */
33
-public class WebQueryWindow extends WebInputWindow implements QueryWindow {
34
-
35
-    private final Query query;
36
-
37
-    public WebQueryWindow(final WebInterfaceUI controller, final Query parent) {
38
-        super(controller, parent);
39
-        this.query = parent;
40
-    }
41
-
42
-}

+ 1
- 2
src/com/dmdirc/addons/ui_web/uicomponents/WebServerWindow.java Прегледај датотеку

@@ -24,13 +24,12 @@ package com.dmdirc.addons.ui_web.uicomponents;
24 24
 
25 25
 import com.dmdirc.Server;
26 26
 import com.dmdirc.addons.ui_web.WebInterfaceUI;
27
-import com.dmdirc.ui.interfaces.ServerWindow;
28 27
 
29 28
 /**
30 29
  *
31 30
  * @author chris
32 31
  */
33
-public class WebServerWindow extends WebInputWindow implements ServerWindow {
32
+public class WebServerWindow extends WebInputWindow {
34 33
 
35 34
     private final Server server;
36 35
 

+ 6
- 18
src/com/dmdirc/addons/ui_web/uicomponents/WebWindow.java Прегледај датотеку

@@ -58,14 +58,14 @@ public class WebWindow implements Window, IRCDocumentListener,
58 58
 
59 59
     protected int myID = ++counter;
60 60
 
61
-    private final FrameContainer<?> parent;
61
+    private final FrameContainer parent;
62 62
 
63 63
     private final List<String> messages = new ArrayList<String>();
64 64
 
65 65
     private String title;
66 66
 
67 67
     public WebWindow(final WebInterfaceUI controller,
68
-            final FrameContainer<?> parent) {
68
+            final FrameContainer parent) {
69 69
         super();
70 70
 
71 71
         this.parent = parent;
@@ -106,7 +106,7 @@ public class WebWindow implements Window, IRCDocumentListener,
106 106
 
107 107
     /** {@inheritDoc} */
108 108
     @Override
109
-    public FrameContainer<?> getContainer() {
109
+    public FrameContainer getContainer() {
110 110
         return parent;
111 111
     }
112 112
 
@@ -122,18 +122,6 @@ public class WebWindow implements Window, IRCDocumentListener,
122 122
         DynamicRequestHandler.addEvent(new Event("closewindow", myID));
123 123
     }
124 124
 
125
-    public String getType() {
126
-        if (this instanceof WebServerWindow) {
127
-            return "server";
128
-        } else if (this instanceof WebChannelWindow) {
129
-            return "channel";
130
-        } else if (this instanceof WebQueryWindow) {
131
-            return "query";
132
-        } else {
133
-            return "window";
134
-        }
135
-    }
136
-
137 125
     public String getId() {
138 126
         return String.valueOf(myID);
139 127
     }
@@ -270,19 +258,19 @@ public class WebWindow implements Window, IRCDocumentListener,
270 258
 
271 259
     /** {@inheritDoc} */
272 260
     @Override
273
-    public void iconChanged(final FrameContainer<?> window, final String icon) {
261
+    public void iconChanged(final FrameContainer window, final String icon) {
274 262
         //TODO FIXME
275 263
     }
276 264
 
277 265
     /** {@inheritDoc} */
278 266
     @Override
279
-    public void nameChanged(final FrameContainer<?> window, final String name) {
267
+    public void nameChanged(final FrameContainer window, final String name) {
280 268
         //TODO FIXME
281 269
     }
282 270
 
283 271
     /** {@inheritDoc} */
284 272
     @Override
285
-    public void titleChanged(final FrameContainer<?> window,
273
+    public void titleChanged(final FrameContainer window,
286 274
             final String title) {
287 275
         this.title = title;
288 276
     }

+ 1
- 1
src/com/dmdirc/addons/urlcatcher/UrlCatcherPlugin.java Прегледај датотеку

@@ -86,7 +86,7 @@ public class UrlCatcherPlugin extends Plugin implements ActionListener,
86 86
             return;
87 87
         }
88 88
 
89
-        final String message = ((FrameContainer<?>) arguments[0]).getStyliser()
89
+        final String message = ((FrameContainer) arguments[0]).getStyliser()
90 90
                 .doLinks((String) arguments[1]);
91 91
         
92 92
         if (message.indexOf(Styliser.CODE_HYPERLINK) > -1) {

+ 1
- 1
src/com/dmdirc/addons/urlcatcher/UrlListCommand.java Прегледај датотеку

@@ -54,7 +54,7 @@ public class UrlListCommand 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 String[] headers = {"URL", "Count"};
60 60
         final Map<String, Integer> map = plugin.getURLS();

+ 1
- 1
src/com/dmdirc/addons/windowflashing/FlashWindow.java Прегледај датотеку

@@ -48,7 +48,7 @@ public class FlashWindow 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
         plugin.flashWindow();
54 54
     }

+ 3
- 3
src/com/dmdirc/addons/windowstatus/WindowStatusPlugin.java Прегледај датотеку

@@ -114,7 +114,7 @@ public final class WindowStatusPlugin extends Plugin implements ActionListener,
114 114
     @Override
115 115
     public void processEvent(final ActionType type, final StringBuffer format, final Object... arguments) {
116 116
         if (type.equals(CoreActionType.CLIENT_FRAME_CHANGED)) {
117
-            updateStatus((FrameContainer<?>) arguments[0]);
117
+            updateStatus((FrameContainer) arguments[0]);
118 118
         }
119 119
     }
120 120
 
@@ -129,7 +129,7 @@ public final class WindowStatusPlugin extends Plugin implements ActionListener,
129 129
      * Update the window status using the current active window.
130 130
      */
131 131
     public void updateStatus() {
132
-        final FrameContainer<?> active = WindowManager.getActiveWindow();
132
+        final FrameContainer active = WindowManager.getActiveWindow();
133 133
 
134 134
         if (active != null) {
135 135
             updateStatus(active);
@@ -141,7 +141,7 @@ public final class WindowStatusPlugin extends Plugin implements ActionListener,
141 141
      *
142 142
      * @param current Window to use when adding status.
143 143
      */
144
-    public void updateStatus(final FrameContainer<?> current) {
144
+    public void updateStatus(final FrameContainer current) {
145 145
         if (current == null) {
146 146
             return;
147 147
         }

+ 4
- 4
test/com/dmdirc/addons/debug/DebugTest.java Прегледај датотеку

@@ -48,7 +48,7 @@ public class DebugTest {
48 48
     @Test
49 49
     public void testNoArgs() {
50 50
         final CommandArguments arguments = mock(CommandArguments.class);
51
-        final FrameContainer<?> container = mock(FrameContainer.class);
51
+        final FrameContainer container = mock(FrameContainer.class);
52 52
         
53 53
         when(arguments.isCommand()).thenReturn(true);
54 54
         when(arguments.getArguments()).thenReturn(new String[0]);
@@ -65,7 +65,7 @@ public class DebugTest {
65 65
     public void testInvalidArg() {
66 66
         final DebugPlugin plugin = mock(DebugPlugin.class);
67 67
         final CommandArguments arguments = mock(CommandArguments.class);
68
-        final FrameContainer<?> container = mock(FrameContainer.class);
68
+        final FrameContainer container = mock(FrameContainer.class);
69 69
         
70 70
         when(plugin.getCommand("test")).thenReturn(null);
71 71
         when(arguments.isCommand()).thenReturn(true);
@@ -82,7 +82,7 @@ public class DebugTest {
82 82
     public void testCommandNoArgs() {
83 83
         final DebugPlugin plugin = mock(DebugPlugin.class);
84 84
         final CommandArguments arguments = mock(CommandArguments.class);
85
-        final FrameContainer<?> container = mock(FrameContainer.class);
85
+        final FrameContainer container = mock(FrameContainer.class);
86 86
         final DebugCommand command = mock(DebugCommand.class);
87 87
         final CommandContext context = mock(CommandContext.class);
88 88
         
@@ -105,7 +105,7 @@ public class DebugTest {
105 105
     public void testCommandWithArgs() {
106 106
         final DebugPlugin plugin = mock(DebugPlugin.class);
107 107
         final CommandArguments arguments = mock(CommandArguments.class);
108
-        final FrameContainer<?> container = mock(FrameContainer.class);
108
+        final FrameContainer container = mock(FrameContainer.class);
109 109
         final DebugCommand command = mock(DebugCommand.class);
110 110
         final CommandContext context = mock(CommandContext.class);
111 111
         

+ 2
- 3
test/com/dmdirc/addons/redirect/RedirectCommandTest.java Прегледај датотеку

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.addons.redirect;
24 24
 
25
+import com.dmdirc.ui.interfaces.Window;
25 26
 import com.dmdirc.MessageTarget;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
@@ -50,10 +51,8 @@ public class RedirectCommandTest {
50 51
     @Test
51 52
     public void testExecute() {
52 53
         final RedirectCommand command = new RedirectCommand();
53
-        final MessageTarget<InputWindow> target = mock(MessageTarget.class);
54
+        final MessageTarget target = mock(MessageTarget.class);
54 55
         final InputWindow window = mock(InputWindow.class);
55
-        when(target.getWindows()).thenReturn(new ArrayList<InputWindow>(Arrays.asList(window)));
56
-        final CommandParser parser = new ServerCommandParser();
57 56
         //when(window.getCommandParser()).thenReturn(parser);
58 57
         when(window.getContainer().getConfigManager()).thenReturn(IdentityManager.getGlobalConfig());
59 58
 

+ 1
- 1
test/com/dmdirc/addons/urlcatcher/UrlCatcherPluginTest.java Прегледај датотеку

@@ -35,7 +35,7 @@ import static org.mockito.Mockito.*;
35 35
 
36 36
 public class UrlCatcherPluginTest {
37 37
     
38
-    private static FrameContainer<?> container;
38
+    private static FrameContainer container;
39 39
 
40 40
     @BeforeClass
41 41
     public static void setupClass() {

+ 2
- 2
test/com/dmdirc/harness/ui/DMDircUITestCase.java Прегледај датотеку

@@ -89,10 +89,10 @@ public class DMDircUITestCase extends UISpecTestCase {
89 89
      *
90 90
      * @return FrameContainer mock
91 91
      */
92
-    public static WritableFrameContainer<CustomInputFrame> getMockedContainer() {
92
+    public static WritableFrameContainer getMockedContainer() {
93 93
         final IRCDocument document = mock(IRCDocument.class);
94 94
         @SuppressWarnings("unchecked")
95
-        final WritableFrameContainer<CustomInputFrame> container = mock(
95
+        final WritableFrameContainer container = mock(
96 96
                 WritableFrameContainer.class);
97 97
         final ConfigManager config = mock(ConfigManager.class);
98 98
         when(container.getDocument()).thenReturn(document);

Loading…
Откажи
Сачувај