Ver código fonte

Renamed CommandWindow to InputWindow and moved to UI


git-svn-id: http://svn.dmdirc.com/trunk@1540 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5
Chris Smith 17 anos atrás
pai
commit
dc04f9e1a0

+ 2
- 2
src/com/dmdirc/Channel.java Ver arquivo

@@ -25,7 +25,6 @@ package com.dmdirc;
25 25
 import com.dmdirc.actions.ActionManager;
26 26
 import com.dmdirc.actions.CoreActionType;
27 27
 import com.dmdirc.commandparser.CommandManager;
28
-import com.dmdirc.commandparser.CommandWindow;
29 28
 import com.dmdirc.identities.ConfigManager;
30 29
 import com.dmdirc.logger.ErrorLevel;
31 30
 import com.dmdirc.logger.Logger;
@@ -49,6 +48,7 @@ import com.dmdirc.parser.callbacks.interfaces.IChannelQuit;
49 48
 import com.dmdirc.parser.callbacks.interfaces.IChannelTopic;
50 49
 import com.dmdirc.parser.callbacks.interfaces.IChannelUserModeChanged;
51 50
 import com.dmdirc.ui.ChannelFrame;
51
+import com.dmdirc.ui.InputWindow;
52 52
 import com.dmdirc.ui.MainFrame;
53 53
 import com.dmdirc.ui.input.TabCompleter;
54 54
 import com.dmdirc.ui.messages.ColourManager;
@@ -262,7 +262,7 @@ public final class Channel extends FrameContainer implements IChannelMessage,
262 262
      * Returns the internal frame belonging to this object.
263 263
      * @return This object's internal frame
264 264
      */
265
-    public CommandWindow getFrame() {
265
+    public InputWindow getFrame() {
266 266
         return frame;
267 267
     }
268 268
     

+ 2
- 2
src/com/dmdirc/FrameContainer.java Ver arquivo

@@ -22,10 +22,10 @@
22 22
 
23 23
 package com.dmdirc;
24 24
 
25
-import com.dmdirc.commandparser.CommandWindow;
26 25
 import com.dmdirc.identities.ConfigManager;
27 26
 import com.dmdirc.logger.ErrorLevel;
28 27
 import com.dmdirc.logger.Logger;
28
+import com.dmdirc.ui.InputWindow;
29 29
 import com.dmdirc.ui.MainFrame;
30 30
 
31 31
 import java.awt.Color;
@@ -53,7 +53,7 @@ public abstract class FrameContainer implements InternalFrameListener {
53 53
      * Returns the internal frame associated with this object.
54 54
      * @return The internal frame associated with this object
55 55
      */
56
-    public abstract CommandWindow getFrame();
56
+    public abstract InputWindow getFrame();
57 57
     
58 58
     /**
59 59
      * Returns a string identifier for this object/its frame.

+ 2
- 2
src/com/dmdirc/Query.java Ver arquivo

@@ -25,7 +25,6 @@ package com.dmdirc;
25 25
 import com.dmdirc.actions.ActionManager;
26 26
 import com.dmdirc.actions.CoreActionType;
27 27
 import com.dmdirc.commandparser.CommandManager;
28
-import com.dmdirc.commandparser.CommandWindow;
29 28
 import com.dmdirc.logger.ErrorLevel;
30 29
 import com.dmdirc.logger.Logger;
31 30
 import com.dmdirc.parser.ClientInfo;
@@ -35,6 +34,7 @@ import com.dmdirc.parser.callbacks.CallbackNotFound;
35 34
 import com.dmdirc.parser.callbacks.interfaces.INickChanged;
36 35
 import com.dmdirc.parser.callbacks.interfaces.IPrivateAction;
37 36
 import com.dmdirc.parser.callbacks.interfaces.IPrivateMessage;
37
+import com.dmdirc.ui.InputWindow;
38 38
 import com.dmdirc.ui.MainFrame;
39 39
 import com.dmdirc.ui.QueryFrame;
40 40
 import com.dmdirc.ui.input.TabCompleter;
@@ -113,7 +113,7 @@ public final class Query extends FrameContainer implements IPrivateAction,
113 113
      * 
114 114
      * @return This object's internal frame
115 115
      */
116
-    public CommandWindow getFrame() {
116
+    public InputWindow getFrame() {
117 117
         return frame;
118 118
     }
119 119
     

+ 2
- 2
src/com/dmdirc/Raw.java Ver arquivo

@@ -22,13 +22,13 @@
22 22
 
23 23
 package com.dmdirc;
24 24
 
25
-import com.dmdirc.commandparser.CommandWindow;
26 25
 import com.dmdirc.logger.ErrorLevel;
27 26
 import com.dmdirc.logger.Logger;
28 27
 import com.dmdirc.parser.IRCParser;
29 28
 import com.dmdirc.parser.callbacks.CallbackNotFound;
30 29
 import com.dmdirc.parser.callbacks.interfaces.IDataIn;
31 30
 import com.dmdirc.parser.callbacks.interfaces.IDataOut;
31
+import com.dmdirc.ui.InputWindow;
32 32
 import com.dmdirc.ui.MainFrame;
33 33
 import com.dmdirc.ui.ServerFrame;
34 34
 
@@ -101,7 +101,7 @@ public final class Raw extends FrameContainer implements IDataIn, IDataOut {
101 101
     }
102 102
     
103 103
     /** {@inheritDoc} */
104
-    public CommandWindow getFrame() {
104
+    public InputWindow getFrame() {
105 105
         return frame;
106 106
     }
107 107
     

+ 2
- 2
src/com/dmdirc/Server.java Ver arquivo

@@ -25,7 +25,6 @@ package com.dmdirc;
25 25
 import com.dmdirc.actions.ActionManager;
26 26
 import com.dmdirc.actions.CoreActionType;
27 27
 import com.dmdirc.commandparser.CommandManager;
28
-import com.dmdirc.commandparser.CommandWindow;
29 28
 import com.dmdirc.identities.ConfigManager;
30 29
 import com.dmdirc.identities.ConfigSource;
31 30
 import com.dmdirc.logger.ErrorLevel;
@@ -59,6 +58,7 @@ import com.dmdirc.parser.callbacks.interfaces.IPrivateMessage;
59 58
 import com.dmdirc.parser.callbacks.interfaces.IPrivateNotice;
60 59
 import com.dmdirc.parser.callbacks.interfaces.ISocketClosed;
61 60
 import com.dmdirc.parser.callbacks.interfaces.IUserModeChanged;
61
+import com.dmdirc.ui.InputWindow;
62 62
 import com.dmdirc.ui.MainFrame;
63 63
 import com.dmdirc.ui.ServerFrame;
64 64
 import com.dmdirc.ui.input.TabCompleter;
@@ -460,7 +460,7 @@ public final class Server extends FrameContainer implements IChannelSelfJoin,
460 460
     }
461 461
     
462 462
     /** {@inheritDoc} */
463
-    public CommandWindow getFrame() {
463
+    public InputWindow getFrame() {
464 464
         return frame;
465 465
     }
466 466
     

+ 3
- 3
src/com/dmdirc/actions/Action.java Ver arquivo

@@ -25,10 +25,10 @@ package com.dmdirc.actions;
25 25
 import com.dmdirc.FrameContainer;
26 26
 import com.dmdirc.ServerManager;
27 27
 import com.dmdirc.commandparser.CommandParser;
28
-import com.dmdirc.commandparser.CommandWindow;
29 28
 import com.dmdirc.commandparser.GlobalCommandParser;
30 29
 import com.dmdirc.logger.ErrorLevel;
31 30
 import com.dmdirc.logger.Logger;
31
+import com.dmdirc.ui.InputWindow;
32 32
 import com.dmdirc.ui.MainFrame;
33 33
 
34 34
 import java.io.File;
@@ -444,13 +444,13 @@ public class Action {
444 444
             }
445 445
         }
446 446
         
447
-        CommandWindow cw;
447
+        InputWindow cw;
448 448
         CommandParser cp = null;
449 449
         
450 450
         if (arguments.length > 0 && arguments[0] instanceof FrameContainer) {
451 451
             cw = ((FrameContainer) arguments[0]).getFrame();
452 452
         } else if (MainFrame.getMainFrame().getActiveFrame() != null) {
453
-            cw = (CommandWindow) MainFrame.getMainFrame().getActiveFrame();
453
+            cw = (InputWindow) MainFrame.getMainFrame().getActiveFrame();
454 454
         } else if (ServerManager.getServerManager().numServers() > 0) {
455 455
             cw = ServerManager.getServerManager().getServers().get(0).getFrame();
456 456
         } else {

+ 2
- 2
src/com/dmdirc/addons/dcop/DcopCommand.java Ver arquivo

@@ -24,10 +24,10 @@ package com.dmdirc.addons.dcop;
24 24
 
25 25
 import com.dmdirc.Server;
26 26
 import com.dmdirc.commandparser.CommandManager;
27
-import com.dmdirc.commandparser.CommandWindow;
28 27
 import com.dmdirc.commandparser.ServerCommand;
29 28
 import com.dmdirc.logger.ErrorLevel;
30 29
 import com.dmdirc.logger.Logger;
30
+import com.dmdirc.ui.InputWindow;
31 31
 
32 32
 import java.io.IOException;
33 33
 import java.util.List;
@@ -54,7 +54,7 @@ public final class DcopCommand extends ServerCommand {
54 54
      * @param isSilent Whether this command is silenced or not
55 55
      * @param args The user supplied arguments
56 56
      */
57
-    public void execute(final CommandWindow origin, final Server server,
57
+    public void execute(final InputWindow origin, final Server server,
58 58
             final boolean isSilent, final String... args) {
59 59
         try {
60 60
             final List<String> res = DcopPlugin.getDcopResult("dcop " + implodeArgs(args));

+ 2
- 2
src/com/dmdirc/addons/dcop/NowPlayingCommand.java Ver arquivo

@@ -26,9 +26,9 @@ import com.dmdirc.Channel;
26 26
 import com.dmdirc.Server;
27 27
 import com.dmdirc.commandparser.ChannelCommand;
28 28
 import com.dmdirc.commandparser.CommandManager;
29
-import com.dmdirc.commandparser.CommandWindow;
30 29
 import com.dmdirc.logger.ErrorLevel;
31 30
 import com.dmdirc.logger.Logger;
31
+import com.dmdirc.ui.InputWindow;
32 32
 
33 33
 import java.io.IOException;
34 34
 import java.util.List;
@@ -57,7 +57,7 @@ public final class NowPlayingCommand extends ChannelCommand {
57 57
      * @param isSilent Whether this command is silenced or not
58 58
      * @param args The user supplied arguments
59 59
      */    
60
-    public void execute(final CommandWindow origin, final Server server, 
60
+    public void execute(final InputWindow origin, final Server server, 
61 61
             final Channel channel, final boolean isSilent, final String... args) {
62 62
         try {
63 63
             

+ 2
- 2
src/com/dmdirc/addons/logging/LoggingCommand.java Ver arquivo

@@ -25,10 +25,10 @@ package com.dmdirc.addons.logging;
25 25
 import com.dmdirc.Config;
26 26
 import com.dmdirc.Server;
27 27
 import com.dmdirc.commandparser.CommandManager;
28
-import com.dmdirc.commandparser.CommandWindow;
29 28
 import com.dmdirc.commandparser.ServerCommand;
30 29
 import com.dmdirc.plugins.Plugin;
31 30
 import com.dmdirc.plugins.PluginManager;
31
+import com.dmdirc.ui.InputWindow;
32 32
 
33 33
 import java.util.Enumeration;
34 34
 import java.util.Properties;
@@ -56,7 +56,7 @@ public final class LoggingCommand extends ServerCommand {
56 56
          * @param isSilent Whether this command is silenced or not
57 57
 	 * @param args The user supplied arguments
58 58
 	 */
59
-	public void execute(final CommandWindow origin, final Server server, final boolean isSilent, final String... args) {
59
+	public void execute(final InputWindow origin, final Server server, final boolean isSilent, final String... args) {
60 60
 		final Plugin gotPlugin = PluginManager.getPluginManager().getPlugin("com.dmdirc.addons.logging.LoggingPlugin");
61 61
 		
62 62
 		if (gotPlugin == null || !(gotPlugin instanceof LoggingPlugin)) {

+ 2
- 2
src/com/dmdirc/addons/osdplugin/OsdCommand.java Ver arquivo

@@ -23,8 +23,8 @@
23 23
 package com.dmdirc.addons.osdplugin;
24 24
 
25 25
 import com.dmdirc.commandparser.CommandManager;
26
-import com.dmdirc.commandparser.CommandWindow;
27 26
 import com.dmdirc.commandparser.GlobalCommand;
27
+import com.dmdirc.ui.InputWindow;
28 28
 
29 29
 /**
30 30
  * The osd command shows an on screen message.
@@ -42,7 +42,7 @@ public final class OsdCommand extends GlobalCommand {
42 42
     }
43 43
     
44 44
     /** {@inheritDoc} */
45
-    public void execute(final CommandWindow origin, final boolean isSilent,
45
+    public void execute(final InputWindow origin, final boolean isSilent,
46 46
             final String... args) {
47 47
         new OsdWindow(implodeArgs(args), false);
48 48
     }

+ 2
- 2
src/com/dmdirc/addons/systray/PopupCommand.java Ver arquivo

@@ -24,8 +24,8 @@ package com.dmdirc.addons.systray;
24 24
 
25 25
 import com.dmdirc.Server;
26 26
 import com.dmdirc.commandparser.CommandManager;
27
-import com.dmdirc.commandparser.CommandWindow;
28 27
 import com.dmdirc.commandparser.ServerCommand;
28
+import com.dmdirc.ui.InputWindow;
29 29
 
30 30
 /**
31 31
  * The /popup command allows the user to show a popup message from the system
@@ -50,7 +50,7 @@ public final class PopupCommand extends ServerCommand {
50 50
     }
51 51
 
52 52
     /** {@inheritDoc} */
53
-    public void execute(final CommandWindow origin, final Server server,
53
+    public void execute(final InputWindow origin, final Server server,
54 54
             final boolean isSilent, final String ... args) {
55 55
         parent.notify("DMDirc", implodeArgs(args));
56 56
     }

+ 3
- 3
src/com/dmdirc/addons/timeplugin/TimedCommand.java Ver arquivo

@@ -23,8 +23,8 @@
23 23
 package com.dmdirc.addons.timeplugin;
24 24
 
25 25
 import com.dmdirc.commandparser.CommandParser;
26
-import com.dmdirc.commandparser.CommandWindow;
27 26
 import com.dmdirc.commandparser.GlobalCommandParser;
27
+import com.dmdirc.ui.InputWindow;
28 28
 
29 29
 import java.util.Timer;
30 30
 import java.util.TimerTask;
@@ -41,7 +41,7 @@ public final class TimedCommand extends TimerTask {
41 41
     private final String command;
42 42
     
43 43
     /** The window to use for executing commands. */
44
-    private final CommandWindow origin;
44
+    private final InputWindow origin;
45 45
     
46 46
     /** The timer we're using for scheduling this command. */
47 47
     private final Timer timer;
@@ -54,7 +54,7 @@ public final class TimedCommand extends TimerTask {
54 54
      * @param origin The command window to use for the execution
55 55
      */
56 56
     public TimedCommand(final int repetitions, final int delay,
57
-            final String command, final CommandWindow origin) {
57
+            final String command, final InputWindow origin) {
58 58
         this.repetitions = repetitions;
59 59
         this.command = command;
60 60
         this.origin = origin;

+ 3
- 3
src/com/dmdirc/addons/timeplugin/TimerCommand.java Ver arquivo

@@ -24,8 +24,8 @@ package com.dmdirc.addons.timeplugin;
24 24
 
25 25
 import com.dmdirc.Config;
26 26
 import com.dmdirc.commandparser.CommandManager;
27
-import com.dmdirc.commandparser.CommandWindow;
28 27
 import com.dmdirc.commandparser.GlobalCommand;
28
+import com.dmdirc.ui.InputWindow;
29 29
 
30 30
 /**
31 31
  * The timer command allows users to schedule commands to occur after a certain
@@ -42,7 +42,7 @@ public final class TimerCommand extends GlobalCommand {
42 42
     }
43 43
     
44 44
     /** {@inheritDoc} */
45
-    public void execute(final CommandWindow origin, final boolean isSilent, 
45
+    public void execute(final InputWindow origin, final boolean isSilent, 
46 46
             final String... args) {
47 47
         if (args.length < 3) {
48 48
             doUsage(origin, isSilent);
@@ -69,7 +69,7 @@ public final class TimerCommand extends GlobalCommand {
69 69
      * @param origin The window that the command was entered in
70 70
      * @param isSilent Whether this command is being silenced or not
71 71
      */
72
-    private void doUsage(final CommandWindow origin, final boolean isSilent) {
72
+    private void doUsage(final InputWindow origin, final boolean isSilent) {
73 73
         sendLine(origin, isSilent, "commandUsage", Config.getCommandChar(),
74 74
                 "timer", "<repetitions> <interval> <command>");
75 75
     }

+ 3
- 7
src/com/dmdirc/addons/windowstatus/WindowStatusPlugin.java Ver arquivo

@@ -23,7 +23,6 @@
23 23
 package com.dmdirc.addons.windowstatus;
24 24
 
25 25
 import java.awt.BorderLayout;
26
-import java.awt.Dimension;
27 26
 import java.util.Hashtable;
28 27
 import java.util.Properties;
29 28
 
@@ -38,7 +37,6 @@ import com.dmdirc.Config;
38 37
 import com.dmdirc.FrameContainer;
39 38
 import com.dmdirc.Query;
40 39
 import com.dmdirc.Server;
41
-import com.dmdirc.commandparser.CommandWindow;
42 40
 import com.dmdirc.actions.ActionType;
43 41
 import com.dmdirc.actions.CoreActionType;
44 42
 import com.dmdirc.parser.ChannelClientInfo;
@@ -46,10 +44,8 @@ import com.dmdirc.parser.ChannelInfo;
46 44
 import com.dmdirc.parser.ClientInfo;
47 45
 import com.dmdirc.plugins.Plugin;
48 46
 import com.dmdirc.plugins.EventPlugin;
49
-import com.dmdirc.ui.ChannelFrame;
47
+import com.dmdirc.ui.InputWindow;
50 48
 import com.dmdirc.ui.MainFrame;
51
-import com.dmdirc.ui.QueryFrame;
52
-import com.dmdirc.ui.ServerFrame;
53 49
 import com.dmdirc.ui.components.PreferencesInterface;
54 50
 import com.dmdirc.ui.components.PreferencesPanel;
55 51
 
@@ -163,8 +159,8 @@ public final class WindowStatusPlugin extends Plugin implements EventPlugin, Pre
163 159
 	 */
164 160
 	public void updateStatus() {
165 161
 		JInternalFrame active = MainFrame.getMainFrame().getActiveFrame();
166
-		if (active instanceof CommandWindow) {
167
-			FrameContainer activeFrame = ((CommandWindow)active).getContainer();
162
+		if (active instanceof InputWindow) {
163
+			FrameContainer activeFrame = ((InputWindow)active).getContainer();
168 164
 			updateStatus(activeFrame);
169 165
 		}
170 166
 	}

+ 94
- 0
src/com/dmdirc/ui/InputWindow.java Ver arquivo

@@ -0,0 +1,94 @@
1
+/*
2
+ * Copyright (c) 2006-2007 Chris Smith, Shane Mc Cormack, Gregory Holmes
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.ui;
24
+
25
+import com.dmdirc.FrameContainer;
26
+import com.dmdirc.Server;
27
+import com.dmdirc.commandparser.CommandParser;
28
+import com.dmdirc.identities.ConfigManager;
29
+
30
+/**
31
+ * A command window is a window that allows the user to input a command (that's
32
+ * passed to a command parser). This interface includes methods that are required
33
+ * to allow the commands to interact with the user via the window.
34
+ * @author chris
35
+ */
36
+public interface InputWindow {
37
+    
38
+    /**
39
+     * Formats the arguments using the Formatter, then adds the result to the
40
+     * main text area.
41
+     * @param messageType The type of this message
42
+     * @param args The arguments for the message
43
+     */
44
+    void addLine(String messageType, Object... args);
45
+    
46
+    /**
47
+     * Formats the arguments using the Formatter, then adds the result to the
48
+     * main text area.
49
+     * @param messageType The type of this message
50
+     * @param args The arguments for the message
51
+     */
52
+    void addLine(StringBuffer messageType, Object... args);
53
+    
54
+    /**
55
+     * Clears the main text area of the command window.
56
+     */
57
+    void clear();
58
+    
59
+    /**
60
+     * Retrieves the config manager for this command window.
61
+     * @return This window's config manager
62
+     */
63
+    ConfigManager getConfigManager();
64
+    
65
+    /**
66
+     * Retrieves the command Parser for this command window.
67
+     * @return This window's command Parser
68
+     */
69
+    CommandParser getCommandParser();
70
+    
71
+    /**
72
+     * Retrieves the server associated with this command window.
73
+     * @return This window's associated server instance
74
+     * @deprecated No point proxying this - use getContainer().getServer()
75
+     */
76
+    @Deprecated
77
+    Server getServer();
78
+    
79
+    /**
80
+     * Retrieves the container that owns this command window.
81
+     * @return The container that owns this command window.
82
+     */
83
+    FrameContainer getContainer();
84
+    
85
+    /**
86
+     * Determines if the current frame is visible.
87
+     *
88
+     * @return boolean visibility
89
+     * @deprecated Visibility is of no concern to command windows
90
+     */
91
+    @Deprecated
92
+    boolean isVisible();
93
+    
94
+}

+ 1
- 2
src/com/dmdirc/ui/MainFrame.java Ver arquivo

@@ -28,7 +28,6 @@ import com.dmdirc.Main;
28 28
 import com.dmdirc.ServerManager;
29 29
 import com.dmdirc.actions.ActionManager;
30 30
 import com.dmdirc.actions.CoreActionType;
31
-import com.dmdirc.commandparser.CommandWindow;
32 31
 import com.dmdirc.logger.ErrorLevel;
33 32
 import com.dmdirc.logger.Logger;
34 33
 import com.dmdirc.ui.components.Frame;
@@ -302,7 +301,7 @@ public final class MainFrame extends JFrame implements WindowListener,
302 301
             setTitle(getTitlePrefix() + " - " + frame.getTitle());
303 302
         }
304 303
         
305
-        ActionManager.processEvent(CoreActionType.CLIENT_FRAME_CHANGED, null, ((CommandWindow) frame).getContainer());
304
+        ActionManager.processEvent(CoreActionType.CLIENT_FRAME_CHANGED, null, ((InputWindow) frame).getContainer());
306 305
     }
307 306
     
308 307
     /**

+ 2
- 2
src/com/dmdirc/ui/components/Frame.java Ver arquivo

@@ -26,10 +26,10 @@ import com.dmdirc.BrowserLauncher;
26 26
 import com.dmdirc.Config;
27 27
 import com.dmdirc.FrameContainer;
28 28
 import com.dmdirc.Server;
29
-import com.dmdirc.commandparser.CommandWindow;
30 29
 import com.dmdirc.identities.ConfigManager;
31 30
 import com.dmdirc.logger.ErrorLevel;
32 31
 import com.dmdirc.logger.Logger;
32
+import com.dmdirc.ui.InputWindow;
33 33
 import com.dmdirc.ui.MainFrame;
34 34
 import com.dmdirc.ui.dialogs.PasteDialog;
35 35
 import com.dmdirc.ui.input.InputHandler;
@@ -89,7 +89,7 @@ import javax.swing.undo.UndoManager;
89 89
 /**
90 90
  * Implements a generic (internal) frame.
91 91
  */
92
-public abstract class Frame extends JInternalFrame implements CommandWindow,
92
+public abstract class Frame extends JInternalFrame implements InputWindow,
93 93
         PropertyChangeListener, InternalFrameListener,
94 94
         MouseListener, ActionListener, KeyListener, TextPaneListener {
95 95
     

+ 3
- 3
src/com/dmdirc/ui/input/InputHandler.java Ver arquivo

@@ -26,8 +26,8 @@ import com.dmdirc.Config;
26 26
 import com.dmdirc.commandparser.Command;
27 27
 import com.dmdirc.commandparser.CommandManager;
28 28
 import com.dmdirc.commandparser.CommandParser;
29
-import com.dmdirc.commandparser.CommandWindow;
30 29
 import com.dmdirc.commandparser.IntelligentCommand;
30
+import com.dmdirc.ui.InputWindow;
31 31
 import com.dmdirc.ui.components.ColourPickerDialog;
32 32
 import com.dmdirc.ui.messages.Styliser;
33 33
 
@@ -99,7 +99,7 @@ public final class InputHandler implements KeyListener, ActionListener {
99 99
     /**
100 100
      * The frame that we belong to.
101 101
      */
102
-    private final CommandWindow parentWindow;
102
+    private final InputWindow parentWindow;
103 103
     
104 104
     /** Colour picker dialog. */
105 105
     private ColourPickerDialog colourPicker;
@@ -113,7 +113,7 @@ public final class InputHandler implements KeyListener, ActionListener {
113 113
      */
114 114
     public InputHandler(final JTextField thisTarget,
115 115
             final CommandParser thisCommandParser,
116
-            final CommandWindow thisParentWindow) {
116
+            final InputWindow thisParentWindow) {
117 117
         
118 118
         bufferSize = thisParentWindow.getConfigManager().getOptionInt("ui", "inputbuffersize", 50);
119 119
         

Carregando…
Cancelar
Salvar