ソースを参照

Remove deprecations.

Depends-On: Ic938a7785a30477f47074e574ec8311723d803a9

Change-Id: I5ebf0bd52682cd0b1798d1b1b54353e5e65e793f
Reviewed-on: http://gerrit.dmdirc.com/1838
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.6.6b1
Greg Holmes 13年前
コミット
acdd8268bc
33個のファイルの変更49行の追加900行の削除
  1. 0
    30
      src/com/dmdirc/FrameContainer.java
  2. 0
    11
      src/com/dmdirc/Main.java
  3. 0
    38
      src/com/dmdirc/Server.java
  4. 0
    22
      src/com/dmdirc/ServerManager.java
  5. 17
    11
      src/com/dmdirc/actions/Action.java
  6. 4
    2
      src/com/dmdirc/actions/ActionSubstitutor.java
  7. 2
    1
      src/com/dmdirc/actions/internal/WhoisNumericFormatter.java
  8. 1
    1
      src/com/dmdirc/actions/validators/ActionGroupValidator.java
  9. 3
    2
      src/com/dmdirc/commandparser/PopupManager.java
  10. 0
    43
      src/com/dmdirc/commandparser/commands/ChannelCommand.java
  11. 0
    44
      src/com/dmdirc/commandparser/commands/ChatCommand.java
  12. 0
    43
      src/com/dmdirc/commandparser/commands/GlobalCommand.java
  13. 0
    42
      src/com/dmdirc/commandparser/commands/QueryCommand.java
  14. 0
    43
      src/com/dmdirc/commandparser/commands/ServerCommand.java
  15. 1
    1
      src/com/dmdirc/commandparser/commands/global/AliasCommand.java
  16. 0
    12
      src/com/dmdirc/config/Identity.java
  17. 0
    24
      src/com/dmdirc/config/IdentityManager.java
  18. 0
    60
      src/com/dmdirc/plugins/PluginInfo.java
  19. 7
    4
      src/com/dmdirc/plugins/PluginManager.java
  20. 3
    82
      src/com/dmdirc/ui/WindowManager.java
  21. 0
    15
      src/com/dmdirc/ui/core/util/URLHandler.java
  22. 0
    10
      src/com/dmdirc/ui/input/InputHandler.java
  23. 0
    21
      src/com/dmdirc/ui/interfaces/InputWindow.java
  24. 0
    14
      src/com/dmdirc/ui/interfaces/MainWindow.java
  25. 0
    94
      src/com/dmdirc/ui/interfaces/UIController.java
  26. 0
    141
      src/com/dmdirc/ui/interfaces/Window.java
  27. 0
    50
      src/com/dmdirc/ui/messages/IRCDocument.java
  28. 0
    10
      src/com/dmdirc/ui/messages/IRCDocumentListener.java
  29. 0
    13
      src/com/dmdirc/ui/themes/ThemeIdentity.java
  30. 0
    1
      test/com/dmdirc/ServerManagerTest.java
  31. 1
    3
      test/com/dmdirc/ServerTest.java
  32. 0
    2
      test/com/dmdirc/config/prefs/PreferencesManagerTest.java
  33. 10
    10
      test/com/dmdirc/ui/WindowManagerTest.java

+ 0
- 30
src/com/dmdirc/FrameContainer.java ファイルの表示

@@ -36,7 +36,6 @@ import com.dmdirc.ui.messages.Formatter;
36 36
 import com.dmdirc.ui.messages.IRCDocument;
37 37
 import com.dmdirc.ui.messages.Styliser;
38 38
 import com.dmdirc.util.ListenerList;
39
-import com.dmdirc.util.StringTranscoder;
40 39
 
41 40
 import java.awt.Color;
42 41
 import java.util.Collection;
@@ -225,19 +224,6 @@ public abstract class FrameContainer<T extends Window> {
225 224
         }
226 225
     }
227 226
 
228
-    /**
229
-     * Retrieves the {@link StringTranscoder} used to transcode this frame's
230
-     * text.
231
-     *
232
-     * @deprecated Encoding is now handled by parsers, do not use.
233
-     * @return This frame's transcoder
234
-     * @since 0.6.4
235
-     */
236
-    @Deprecated
237
-    public StringTranscoder getTranscoder() {
238
-        return new StringTranscoder(null);
239
-    }
240
-
241 227
     /** {@inheritDoc} */
242 228
     @Override
243 229
     public String toString() {
@@ -427,14 +413,6 @@ public abstract class FrameContainer<T extends Window> {
427 413
         return windows.contains(target);
428 414
     }
429 415
 
430
-    /**
431
-     * Invoked when our window has been opened.
432
-     * @deprecated Pointless. Stop calling me.
433
-     */
434
-    @Deprecated
435
-    public void windowOpened() {
436
-    }
437
-
438 416
     /**
439 417
      * Invoked when our window is closing.
440 418
      * <p>
@@ -511,14 +489,6 @@ public abstract class FrameContainer<T extends Window> {
511 489
         }
512 490
     }
513 491
 
514
-    /**
515
-     * Invoked when our window is deactivated.
516
-     * @deprecated Not used. Stop calling me.
517
-     */
518
-    @Deprecated
519
-    public void windowDeactivated() {
520
-    }
521
-
522 492
     /**
523 493
      * Adds a line to this container's window. If the window is null for some
524 494
      * reason, the line is silently discarded.

+ 0
- 11
src/com/dmdirc/Main.java ファイルの表示

@@ -399,17 +399,6 @@ public final class Main {
399 399
         return CONTROLLERS.iterator().next();
400 400
     }
401 401
 
402
-    /**
403
-     * Sets the UI controller that should be used by this client.
404
-     *
405
-     * @param newController The new UI Controller
406
-     * @deprecated Shouldn't be used. UI plugins should declare services.
407
-     */
408
-    @Deprecated
409
-    public static synchronized void setUI(final UIController newController) {
410
-        // Do nothing.
411
-    }
412
-
413 402
     /**
414 403
      * Returns the application's config directory.
415 404
      *

+ 0
- 38
src/com/dmdirc/Server.java ファイルの表示

@@ -540,19 +540,6 @@ public class Server extends WritableFrameContainer<ServerWindow> implements Conf
540 540
         return Collections.unmodifiableCollection(queries.values());
541 541
     }
542 542
 
543
-
544
-    /**
545
-     * Adds a query to this server.
546
-     *
547
-     * @param host host of the remote client being queried
548
-     * @return The query that was added (may be null if closing)
549
-     * @deprecated Use {@link #getQuery(java.lang.String)} instead
550
-     */
551
-    @Deprecated
552
-    public Query addQuery(final String host) {
553
-        return getQuery(host);
554
-    }
555
-
556 543
     /**
557 544
      * Deletes a query from this server.
558 545
      *
@@ -849,19 +836,6 @@ public class Server extends WritableFrameContainer<ServerWindow> implements Conf
849 836
         }
850 837
     }
851 838
 
852
-    /**
853
-     * Joins the specified channel with the specified key.
854
-     *
855
-     * @since 0.6.3m1
856
-     * @param channel The channel to be joined
857
-     * @param key The key for the channel
858
-     * @deprecated Use {@link #join(com.dmdirc.parser.common.ChannelJoinRequest[])}
859
-     */
860
-    @Deprecated
861
-    public void join(final String channel, final String key) {
862
-        join(new ChannelJoinRequest(channel, key));
863
-    }
864
-
865 839
     /**
866 840
      * Attempts to join the specified channels. If channels with the same name
867 841
      * already exist, they are (re)joined and their windows activated.
@@ -916,18 +890,6 @@ public class Server extends WritableFrameContainer<ServerWindow> implements Conf
916 890
         }
917 891
     }
918 892
 
919
-    /**
920
-     * Joins the specified channel, or adds it to the auto-join list if the
921
-     * server is not connected.
922
-     *
923
-     * @param channel The channel to be joined
924
-     * @deprecated Use {@link #join(com.dmdirc.parser.common.ChannelJoinRequest[])}
925
-     */
926
-    @Deprecated
927
-    public void join(final String channel) {
928
-        join(new ChannelJoinRequest(channel));
929
-    }
930
-
931 893
     /** {@inheritDoc} */
932 894
     @Override
933 895
     public void sendLine(final String line) {

+ 0
- 22
src/com/dmdirc/ServerManager.java ファイルの表示

@@ -27,7 +27,6 @@ import com.dmdirc.config.IdentityManager;
27 27
 import com.dmdirc.logger.ErrorLevel;
28 28
 import com.dmdirc.logger.Logger;
29 29
 import com.dmdirc.parser.common.ChannelJoinRequest;
30
-import com.dmdirc.ui.interfaces.Window;
31 30
 
32 31
 import java.net.URI;
33 32
 import java.net.URISyntaxException;
@@ -146,27 +145,6 @@ public final class ServerManager {
146 145
         return servers.size();
147 146
     }
148 147
 
149
-    /**
150
-     * Returns the server instance that owns the specified internal frame.
151
-     *
152
-     * @param active The internal frame to check
153
-     * @return The server associated with the internal frame
154
-     * @deprecated Use {@link Window#getContainer()} and
155
-     * {@link FrameContainer#getServer()} instead.
156
-     */
157
-    @Deprecated
158
-    public Server getServerFromFrame(final Window active) {
159
-        synchronized (servers) {
160
-            for (Server server : servers) {
161
-                if (server.ownsFrame(active)) {
162
-                    return server;
163
-                }
164
-            }
165
-        }
166
-
167
-        return null;
168
-    }
169
-
170 148
     /**
171 149
      * Retrieves a list of servers connected to the specified network.
172 150
      *

+ 17
- 11
src/com/dmdirc/actions/Action.java ファイルの表示

@@ -145,7 +145,8 @@ public class Action extends ActionModel implements ConfigChangeListener {
145 145
 
146 146
         new File(dir).mkdirs();
147 147
 
148
-        ActionManager.processEvent(CoreActionType.ACTION_CREATED, null, this);
148
+        ActionManager.getActionManager().triggerEvent(
149
+                CoreActionType.ACTION_CREATED, null, this);
149 150
 
150 151
         save();
151 152
 
@@ -153,7 +154,7 @@ public class Action extends ActionModel implements ConfigChangeListener {
153 154
                 (group + "/" + name).replace(' ', '.'), this);
154 155
         checkDisabled();
155 156
 
156
-        ActionManager.registerAction(this);
157
+        ActionManager.getActionManager().addAction(this);
157 158
     }
158 159
 
159 160
     /**
@@ -220,7 +221,7 @@ public class Action extends ActionModel implements ConfigChangeListener {
220 221
             setStopping(Boolean.parseBoolean(config.getKeyDomain(DOMAIN_MISC).get("stopping")));
221 222
         }
222 223
 
223
-        ActionManager.registerAction(this);
224
+        ActionManager.getActionManager().addAction(this);
224 225
 
225 226
         checkMetaData();
226 227
     }
@@ -231,7 +232,8 @@ public class Action extends ActionModel implements ConfigChangeListener {
231 232
      */
232 233
     private void checkMetaData() {
233 234
         if (config.isKeyDomain(DOMAIN_METADATA)) {
234
-            final ActionGroup myGroup = ActionManager.getGroup(group);
235
+            final ActionGroup myGroup = ActionManager.getActionManager()
236
+                    .getOrCreateGroup(group);
235 237
             final Map<String, String> data = config.getKeyDomain(DOMAIN_METADATA);
236 238
 
237 239
             if (data.containsKey("description")) {
@@ -256,13 +258,15 @@ public class Action extends ActionModel implements ConfigChangeListener {
256 258
         }
257 259
 
258 260
         for (int i = 0; config.isKeyDomain("setting " + i); i++) {
259
-            final ActionGroup myGroup = ActionManager.getGroup(group);
261
+            final ActionGroup myGroup = ActionManager.getActionManager()
262
+                    .getOrCreateGroup(group);
260 263
             final Map<String, String> data = config.getKeyDomain("setting " + i);
261 264
 
262 265
             if (data.containsKey("type") && data.containsKey("setting")
263 266
                     && data.containsKey("title") && data.containsKey("default")
264 267
                     && data.containsKey("tooltip")) {
265
-                ActionManager.registerDefault(data.get("setting"), data.get("default"));
268
+                ActionManager.getActionManager().registerSetting(
269
+                        data.get("setting"), data.get("default"));
266 270
                 myGroup.getSettings().put(data.get("setting"), new PreferencesSetting(
267 271
                         PreferencesType.valueOf(data.get("type")), "actions",
268 272
                         data.get("setting"), data.get("title"), data.get("tooltip")));
@@ -280,7 +284,7 @@ public class Action extends ActionModel implements ConfigChangeListener {
280 284
         triggers = new ActionType[newTriggers.size()];
281 285
 
282 286
         for (int i = 0; i < triggers.length; i++) {
283
-            triggers[i] = ActionManager.getActionType(newTriggers.get(i));
287
+            triggers[i] = ActionManager.getActionManager().getType(newTriggers.get(i));
284 288
 
285 289
             if (triggers[i] == null) {
286 290
                 error("Invalid trigger specified: " + newTriggers.get(i));
@@ -383,7 +387,8 @@ public class Action extends ActionModel implements ConfigChangeListener {
383 387
             Logger.userError(ErrorLevel.HIGH, "I/O error when saving action: "
384 388
                     + group + "/" + name + ": " + ex.getMessage());
385 389
         }
386
-        ActionManager.processEvent(CoreActionType.ACTION_UPDATED, null, this);
390
+        ActionManager.getActionManager().triggerEvent(
391
+                CoreActionType.ACTION_UPDATED, null, this);
387 392
     }
388 393
 
389 394
     /**
@@ -431,7 +436,7 @@ public class Action extends ActionModel implements ConfigChangeListener {
431 436
 
432 437
         // ------ Read the comparison
433 438
 
434
-        comparison = ActionManager.getActionComparison(data.get("comparison"));
439
+        comparison = ActionManager.getActionManager().getComparison(data.get("comparison"));
435 440
         if (comparison == null) {
436 441
             error("Invalid comparison specified: " + data.get("comparison"));
437 442
             return false;
@@ -474,7 +479,7 @@ public class Action extends ActionModel implements ConfigChangeListener {
474 479
         ActionComponent component;
475 480
 
476 481
         if (componentName.indexOf('.') == -1) {
477
-            component = ActionManager.getActionComponent(componentName);
482
+            component = ActionManager.getActionManager().getComponent(componentName);
478 483
         } else {
479 484
             try {
480 485
                 component = new ActionComponentChain(triggers[0].getType().getArgTypes()[arg],
@@ -538,7 +543,8 @@ public class Action extends ActionModel implements ConfigChangeListener {
538 543
      * Deletes this action.
539 544
      */
540 545
     public void delete() {
541
-        ActionManager.processEvent(CoreActionType.ACTION_DELETED, null, getGroup(), getName());
546
+        ActionManager.getActionManager().triggerEvent(
547
+                CoreActionType.ACTION_DELETED, null, getGroup(), getName());
542 548
         new File(location).delete();
543 549
     }
544 550
 

+ 4
- 2
src/com/dmdirc/actions/ActionSubstitutor.java ファイルの表示

@@ -106,7 +106,8 @@ public class ActionSubstitutor {
106 106
 
107 107
         int i = 0;
108 108
         for (Class<?> myClass : type.getType().getArgTypes()) {
109
-            for (ActionComponent comp : ActionManager.getCompatibleComponents(myClass)) {
109
+            for (ActionComponent comp : ActionManager.getActionManager()
110
+                    .findCompatibleComponents(myClass)) {
110 111
                 final String key = "{" + i + "." + comp.toString() + "}";
111 112
                 final String desc = type.getType().getArgNames()[i] + "'s " + comp.getName();
112 113
 
@@ -130,7 +131,8 @@ public class ActionSubstitutor {
130 131
         final Map<String, String> res = new HashMap<String, String>();
131 132
 
132 133
         if (hasFrameContainer()) {
133
-            for (ActionComponent comp : ActionManager.getCompatibleComponents(Server.class)) {
134
+            for (ActionComponent comp : ActionManager.getActionManager()
135
+                    .findCompatibleComponents(Server.class)) {
134 136
                 final String key = "{" + comp.toString() + "}";
135 137
                 final String desc = "The connection's " + comp.getName();
136 138
 

+ 2
- 1
src/com/dmdirc/actions/internal/WhoisNumericFormatter.java ファイルの表示

@@ -63,7 +63,8 @@ public class WhoisNumericFormatter implements ActionListener {
63 63
      * manager.
64 64
      */
65 65
     public void register() {
66
-        ActionManager.addListener(this, CoreActionType.SERVER_NUMERIC,
66
+        ActionManager.getActionManager().registerListener(this,
67
+                CoreActionType.SERVER_NUMERIC,
67 68
                 CoreActionType.SERVER_DISCONNECTED);
68 69
     }
69 70
 

+ 1
- 1
src/com/dmdirc/actions/validators/ActionGroupValidator.java ファイルの表示

@@ -37,7 +37,7 @@ public class ActionGroupValidator implements Validator<String> {
37 37
     /** {@inheritDoc} */
38 38
     @Override
39 39
     public ValidationResponse validate(final String object) {
40
-        if (ActionManager.getGroups().containsKey(object)) {
40
+        if (ActionManager.getActionManager().getGroupsMap().containsKey(object)) {
41 41
             return new ValidationResponse(FAILURE_EXISTS);
42 42
         } else {
43 43
             return new ValidationResponse();

+ 3
- 2
src/com/dmdirc/commandparser/PopupManager.java ファイルの表示

@@ -52,8 +52,9 @@ public class PopupManager {
52 52
     public static PopupMenu getMenu(final PopupType menuType, final ConfigManager configManager) {
53 53
         final PopupMenu menu = getMenu(menuType.toString(), menuType, configManager);
54 54
 
55
-        ActionManager.processEvent(CoreActionType.CLIENT_POPUP_GENERATED,
56
-                null, menuType, menu, configManager);
55
+        ActionManager.getActionManager().triggerEvent(
56
+                CoreActionType.CLIENT_POPUP_GENERATED, null, menuType, menu,
57
+                configManager);
57 58
 
58 59
         return menu;
59 60
     }

+ 0
- 43
src/com/dmdirc/commandparser/commands/ChannelCommand.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.commandparser.commands;
24
-
25
-import com.dmdirc.commandparser.CommandInfo;
26
-import com.dmdirc.commandparser.CommandType;
27
-
28
-/**
29
- * Represents a command which can be performed only in the context of a channel.
30
- *
31
- * @deprecated Commands should extend {@link Command} directly
32
- * @author chris
33
- */
34
-@Deprecated
35
-public abstract class ChannelCommand extends Command implements CommandInfo {
36
-
37
-    /** {@inheritDoc} */
38
-    @Override
39
-    public CommandType getType() {
40
-        return CommandType.TYPE_CHANNEL;
41
-    }
42
-
43
-}

+ 0
- 44
src/com/dmdirc/commandparser/commands/ChatCommand.java ファイルの表示

@@ -1,44 +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.commandparser.commands;
24
-
25
-import com.dmdirc.commandparser.CommandInfo;
26
-import com.dmdirc.commandparser.CommandType;
27
-
28
-/**
29
- * Represents a command that can be performed in the context of a "chat" window
30
- * (i.e., a channel or a query).
31
- *
32
- * @deprecated Commands should extend {@link Command} directly
33
- * @author Chris
34
- */
35
-@Deprecated
36
-public abstract class ChatCommand extends Command implements CommandInfo {
37
-
38
-    /** {@inheritDoc} */
39
-    @Override
40
-    public CommandType getType() {
41
-        return CommandType.TYPE_CHAT;
42
-    }
43
-
44
-}

+ 0
- 43
src/com/dmdirc/commandparser/commands/GlobalCommand.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.commandparser.commands;
24
-
25
-import com.dmdirc.commandparser.CommandInfo;
26
-import com.dmdirc.commandparser.CommandType;
27
-
28
-/**
29
- * Represents a generic global command. Global commands are associated with
30
- * no servers.
31
- *
32
- * @deprecated Commands should extend {@link Command} directly
33
- * @author chris
34
- */
35
-@Deprecated
36
-public abstract class GlobalCommand extends Command implements CommandInfo {
37
-
38
-    /** {@inheritDoc} */
39
-    @Override
40
-    public CommandType getType() {
41
-        return CommandType.TYPE_GLOBAL;
42
-    }
43
-}

+ 0
- 42
src/com/dmdirc/commandparser/commands/QueryCommand.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.commandparser.commands;
24
-
25
-import com.dmdirc.commandparser.CommandInfo;
26
-import com.dmdirc.commandparser.CommandType;
27
-
28
-/**
29
- * Represents a command which can be performed only in the context of a query.
30
- *
31
- * @deprecated Commands should extend {@link Command} directly
32
- * @author chris
33
- */
34
-@Deprecated
35
-public abstract class QueryCommand extends Command implements CommandInfo {
36
-        
37
-    /** {@inheritDoc} */
38
-    @Override
39
-    public CommandType getType() {
40
-        return CommandType.TYPE_QUERY;
41
-    }
42
-}

+ 0
- 43
src/com/dmdirc/commandparser/commands/ServerCommand.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.commandparser.commands;
24
-
25
-import com.dmdirc.commandparser.CommandInfo;
26
-import com.dmdirc.commandparser.CommandType;
27
-
28
-/**
29
- * Represents a generic server command. Server commands are associated with
30
- * a server instance.
31
- *
32
- * @deprecated Commands should extend {@link Command} directly
33
- * @author chris
34
- */
35
-@Deprecated
36
-public abstract class ServerCommand extends Command implements CommandInfo {
37
-    
38
-    /** {@inheritDoc} */
39
-    @Override
40
-    public CommandType getType() {
41
-        return CommandType.TYPE_SERVER;
42
-    }
43
-}

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/AliasCommand.java ファイルの表示

@@ -108,7 +108,7 @@ public final class AliasCommand extends Command implements
108 108
             if (AliasWrapper.getCommandName(alias).substring(1).equalsIgnoreCase(
109 109
                     name)) {
110 110
                 alias.delete();
111
-                ActionManager.unregisterAction(alias);
111
+                ActionManager.getActionManager().removeAction(alias);
112 112
 
113 113
                 return true;
114 114
             }

+ 0
- 12
src/com/dmdirc/config/Identity.java ファイルの表示

@@ -569,18 +569,6 @@ public class Identity extends ConfigSource implements Comparable<Identity> {
569 569
         return myTarget;
570 570
     }
571 571
 
572
-    /**
573
-     * Retrieve this identity's ConfigFile.
574
-     *
575
-     * @return The ConfigFile object used by this identity
576
-     * @deprecated Direct access should be avoided to prevent synchronisation
577
-     * issues
578
-     */
579
-    @Deprecated
580
-    public ConfigFile getFile() {
581
-        return file;
582
-    }
583
-
584 572
     /**
585 573
      * Determines if this identity is loaded from the specified File.
586 574
      *

+ 0
- 24
src/com/dmdirc/config/IdentityManager.java ファイルの表示

@@ -459,18 +459,6 @@ public final class IdentityManager {
459 459
         }
460 460
     }
461 461
 
462
-    /**
463
-     * Adds a config manager to this manager.
464
-     *
465
-     * @param manager The ConfigManager to add
466
-     * @deprecated Use {@link #addIdentityListener(com.dmdirc.config.IdentityListener)}
467
-     */
468
-    @Deprecated
469
-    @Precondition("The specified ConfigManager is not null")
470
-    public static void addConfigManager(final ConfigManager manager) {
471
-        addIdentityListener(manager);
472
-    }
473
-
474 462
     /**
475 463
      * Adds a new identity listener which will be informed of all settings
476 464
      * identities which are added to this manager.
@@ -500,18 +488,6 @@ public final class IdentityManager {
500 488
         }
501 489
     }
502 490
 
503
-    /**
504
-     * Retrieves a list of identities that serve as profiles.
505
-     *
506
-     * @return A list of profiles
507
-     * @deprecated Use {@link #getCustomIdentities(java.lang.String)} with
508
-     * an argument of <code>profile</code> to retrieve profiles.
509
-     */
510
-    @Deprecated
511
-    public static List<Identity> getProfiles() {
512
-        return getCustomIdentities("profile");
513
-    }
514
-
515 491
     /**
516 492
      * Retrieves a list of identities that belong to the specified custom type.
517 493
      *

+ 0
- 60
src/com/dmdirc/plugins/PluginInfo.java ファイルの表示

@@ -1378,66 +1378,6 @@ public class PluginInfo implements Comparable<PluginInfo>, ServiceProvider {
1378 1378
         return loadAll.equalsIgnoreCase("true") || loadAll.equalsIgnoreCase("yes");
1379 1379
     }
1380 1380
 
1381
-    /**
1382
-     * Get misc meta-information.
1383
-     *
1384
-     * @param metainfo The metainfo to return
1385
-     * @deprecated Use {@link #getKeyValue(String, String, String) instead
1386
-     * @return Misc Meta Info (or "" if not found);
1387
-     */
1388
-    @Deprecated
1389
-    public String getMetaInfo(final String metainfo) {
1390
-        return getMetaInfo(metainfo, "");
1391
-    }
1392
-
1393
-    /**
1394
-     * Get misc meta-information.
1395
-     *
1396
-     * @param metainfo The metainfo to return
1397
-     * @param fallback Fallback value if requested value is not found
1398
-     * @deprecated Use {@link #getKeyValue(String, String, String) instead
1399
-     * @return Misc Meta Info (or fallback if not found);
1400
-     */
1401
-    @Deprecated
1402
-    public String getMetaInfo(final String metainfo, final String fallback) {
1403
-        return getKeyValue("misc", metainfo, fallback);
1404
-    }
1405
-
1406
-    /**
1407
-     * Get misc meta-information.
1408
-     *
1409
-     * @param metainfo The metainfos to look for in order. If the first item in
1410
-     *                 the array is not found, the next will be looked for, and
1411
-     *                 so on until either one is found, or none are found.
1412
-     * @deprecated Use {@link #getKeyValue(String, String, String) instead
1413
-     * @return Misc Meta Info (or "" if none are found);
1414
-     */
1415
-    @Deprecated
1416
-    public String getMetaInfo(final String[] metainfo) {
1417
-        return getMetaInfo(metainfo, "");
1418
-    }
1419
-
1420
-    /**
1421
-     * Get misc meta-information.
1422
-     *
1423
-     * @param metainfo The metainfos to look for in order. If the first item in
1424
-     *                 the array is not found, the next will be looked for, and
1425
-     *                 so on until either one is found, or none are found.
1426
-     * @param fallback Fallback value if requested values are not found
1427
-     * @deprecated Use {@link #getKeyValue(String, String, String) instead
1428
-     * @return Misc Meta Info (or "" if none are found);
1429
-     */
1430
-    @Deprecated
1431
-    public String getMetaInfo(final String[] metainfo, final String fallback) {
1432
-        for (String meta : metainfo) {
1433
-            final String result = getKeyValue("misc", meta, null);
1434
-            if (result != null) {
1435
-                return result;
1436
-            }
1437
-        }
1438
-        return fallback;
1439
-    }
1440
-
1441 1381
     /**
1442 1382
      * Compares this object with the specified object for order.
1443 1383
      * Returns a negative integer, zero, or a positive integer as per String.compareTo();

+ 7
- 4
src/com/dmdirc/plugins/PluginManager.java ファイルの表示

@@ -70,7 +70,9 @@ public class PluginManager implements ActionListener {
70 70
     private PluginManager() {
71 71
         final String fs = System.getProperty("file.separator");
72 72
         myDir = Main.getConfigDir() + "plugins" + fs;
73
-        ActionManager.addListener(this, CoreActionType.CLIENT_PREFS_OPENED, CoreActionType.CLIENT_PREFS_CLOSED);
73
+        ActionManager.getActionManager().registerListener(this,
74
+                CoreActionType.CLIENT_PREFS_OPENED,
75
+                CoreActionType.CLIENT_PREFS_CLOSED);
74 76
     }
75 77
 
76 78
     /**
@@ -274,8 +276,8 @@ public class PluginManager implements ActionListener {
274 276
             if (requirements.isEmpty()) {
275 277
                 knownPlugins.put(filename.toLowerCase(), pluginInfo);
276 278
 
277
-                ActionManager.processEvent(CoreActionType.PLUGIN_REFRESH, null,
278
-                        this);
279
+                ActionManager.getActionManager().triggerEvent(
280
+                        CoreActionType.PLUGIN_REFRESH, null, this);
279 281
                 return true;
280 282
             } else {
281 283
                 throw new PluginException("Plugin " + filename + " was not loaded, one or more requirements not met (" + requirements + ")");
@@ -451,7 +453,8 @@ public class PluginManager implements ActionListener {
451 453
             }
452 454
         }
453 455
 
454
-        ActionManager.processEvent(CoreActionType.PLUGIN_REFRESH, null, this);
456
+        ActionManager.getActionManager().triggerEvent(
457
+                CoreActionType.PLUGIN_REFRESH, null, this);
455 458
         return new LinkedList<PluginInfo>(res.values());
456 459
     }
457 460
 

+ 3
- 82
src/com/dmdirc/ui/WindowManager.java ファイルの表示

@@ -32,7 +32,6 @@ import com.dmdirc.interfaces.SelectionListener;
32 32
 import com.dmdirc.logger.ErrorLevel;
33 33
 import com.dmdirc.logger.Logger;
34 34
 import com.dmdirc.ui.interfaces.FrameListener;
35
-import com.dmdirc.ui.interfaces.Window;
36 35
 
37 36
 import java.util.ArrayList;
38 37
 import java.util.Collection;
@@ -159,34 +158,6 @@ public class WindowManager {
159 158
         fireAddWindow(window, focus);
160 159
     }
161 160
 
162
-    /**
163
-     * Adds a new root window to the Window Manager.
164
-     *
165
-     * @param window The window to be added
166
-     * @deprecated Use {@link #addWindow(com.dmdirc.FrameContainer)}
167
-     */
168
-    @Deprecated
169
-    public static void addWindow(final Window window) {
170
-        Logger.assertTrue(window != null);
171
-
172
-        addWindow(window.getContainer());
173
-    }
174
-
175
-    /**
176
-     * Adds a new child window to the Window Manager.
177
-     *
178
-     * @param parent The parent window
179
-     * @param child The child window to be added
180
-     * @deprecated Use {@link #addWindow(com.dmdirc.FrameContainer, com.dmdirc.FrameContainer)}
181
-     */
182
-    @Deprecated
183
-    public static void addWindow(final Window parent, final Window child) {
184
-        Logger.assertTrue(parent != null);
185
-        Logger.assertTrue(child != null);
186
-
187
-        addWindow(parent.getContainer(), child.getContainer());
188
-    }
189
-
190 161
     /**
191 162
      * Adds a new child window to the Window Manager.
192 163
      *
@@ -243,30 +214,6 @@ public class WindowManager {
243 214
                 || isInHierarchy(target.getParent()));
244 215
     }
245 216
 
246
-    /**
247
-     * Removes a window from the Window Manager. If the specified window
248
-     * has child windows, they are recursively removed before the target window.
249
-     * If the window hasn't previously been added, the request to remove it is
250
-     * ignored.
251
-     * <p>
252
-     * This method will not block, but may instead create a new thread in order
253
-     * to wait for child windows to be terminated. {@link FrameContainer}s
254
-     * calling this method should persist resource references until after the
255
-     * {@link FrameContainer#windowClosed()} method is called, to ensure
256
-     * correct state when the window deleted listeners are fired at a later
257
-     * time. See the documentation at {@link FrameContainer#windowClosing()} for
258
-     * further explanation.
259
-     *
260
-     * @see FrameContainer#windowClosing()
261
-     * @param window The window to be removed
262
-     * @deprecated Use {@link #removeWindow(com.dmdirc.FrameContainer)}
263
-     */
264
-    @Deprecated
265
-    public static void removeWindow(final Window window) {
266
-        Logger.assertTrue(window != null);
267
-        removeWindow(window.getContainer());
268
-    }
269
-
270 217
     /**
271 218
      * Removes a window from the Window Manager. If the specified window
272 219
      * has child windows, they are recursively removed before the target window.
@@ -413,20 +360,6 @@ public class WindowManager {
413 360
         return null;
414 361
     }
415 362
 
416
-    /**
417
-     * Retrieves the parent window of the specified window. If the window
418
-     * has no parent (i.e., it is a root window or it has not been added),
419
-     * returns null.
420
-     *
421
-     * @param window The window whose parent is being sought
422
-     * @return The parent of the specified window, or null if not found
423
-     * @deprecated Call {@link FrameContainer#getParent()} directly
424
-     */
425
-    @Deprecated
426
-    public static FrameContainer<?> getParent(final FrameContainer<?> window) {
427
-        return window.getParent();
428
-    }
429
-
430 363
     /**
431 364
      * Retrieves all known root (parent-less) windows.
432 365
      *
@@ -457,19 +390,6 @@ public class WindowManager {
457 390
         return activeWindow == null ? null : getActiveWindow().getServer();
458 391
     }
459 392
 
460
-    /**
461
-     * Retrieves all children of the specified window.
462
-     *
463
-     * @since 0.6.4
464
-     * @param window The window whose children are being requested
465
-     * @return A collection of all known child windows.
466
-     * @deprecated Call {@link FrameContainer#getChildren()} directly
467
-     */
468
-    @Deprecated
469
-    public static Collection<FrameContainer<?>> getChildren(final FrameContainer<?> window) {
470
-        return window.getChildren();
471
-    }
472
-
473 393
     /**
474 394
      * Fires the addWindow(Window) callback.
475 395
      *
@@ -532,7 +452,8 @@ public class WindowManager {
532 452
             listener.selectionChanged(window);
533 453
         }
534 454
 
535
-        ActionManager.processEvent(CoreActionType.CLIENT_FRAME_CHANGED, null, window);
455
+        ActionManager.getActionManager().triggerEvent(
456
+                CoreActionType.CLIENT_FRAME_CHANGED, null, window);
536 457
     }
537 458
 
538 459
     /**
@@ -550,4 +471,4 @@ public class WindowManager {
550 471
 
551 472
     }
552 473
 
553
-}
474
+}

+ 0
- 15
src/com/dmdirc/ui/core/util/URLHandler.java ファイルの表示

@@ -22,7 +22,6 @@
22 22
 
23 23
 package com.dmdirc.ui.core.util;
24 24
 
25
-import com.dmdirc.Main;
26 25
 import com.dmdirc.ServerManager;
27 26
 import com.dmdirc.config.ConfigManager;
28 27
 import com.dmdirc.config.IdentityManager;
@@ -63,20 +62,6 @@ public class URLHandler {
63 62
         this.desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
64 63
     }
65 64
 
66
-    /**
67
-     * Gets an instance of URLHandler.
68
-     *
69
-     * @return URLHandler instance
70
-     * @deprecated This will return a URLHandler for a random UI which may not
71
-     * implement the required methods. It will probably break. Users of this
72
-     * class must create instances of URLHandler directly with an appropriate
73
-     * UIController.
74
-     */
75
-    @Deprecated
76
-    public static URLHandler getURLHander() {
77
-        return new URLHandler(Main.getUI());
78
-    }
79
-
80 65
     /**
81 66
      * Launches an application for a given url.
82 67
      *

+ 0
- 10
src/com/dmdirc/ui/input/InputHandler.java ファイルの表示

@@ -386,16 +386,6 @@ public abstract class InputHandler implements ConfigChangeListener {
386 386
         return new ArrayList<String>(buffer.getList());
387 387
     }
388 388
 
389
-    /**
390
-     * Handles tab completion of a string. Called when the user presses tab.
391
-     *
392
-     * @deprecated Preferred method is {@link doTabCompletion(boolean)}
393
-     */
394
-    @Deprecated
395
-    protected void doTabCompletion() {
396
-        doTabCompletion(false);
397
-    }
398
-
399 389
     /**
400 390
      * Handles tab completion of a string. Called when the user presses
401 391
      * (shift) tab.

+ 0
- 21
src/com/dmdirc/ui/interfaces/InputWindow.java ファイルの表示

@@ -23,7 +23,6 @@
23 23
 package com.dmdirc.ui.interfaces;
24 24
 
25 25
 import com.dmdirc.WritableFrameContainer;
26
-import com.dmdirc.commandparser.parsers.CommandParser;
27 26
 import com.dmdirc.ui.input.InputHandler;
28 27
 
29 28
 /**
@@ -34,16 +33,6 @@ import com.dmdirc.ui.input.InputHandler;
34 33
  */
35 34
 public interface InputWindow extends Window {
36 35
 
37
-    /**
38
-     * Retrieves the command Parser for this input window.
39
-     *
40
-     * @return This window's command parser
41
-     *
42
-     * @deprecated Use {@link WritableFrameContainer.getCommandParser()} instead
43
-     */
44
-    @Deprecated
45
-    CommandParser getCommandParser();
46
-
47 36
     /**
48 37
      * Retrieves the input handler for this input window.
49 38
      *
@@ -51,16 +40,6 @@ public interface InputWindow extends Window {
51 40
      */
52 41
     InputHandler getInputHandler();
53 42
 
54
-    /**
55
-     * Toggles the away-status indicator for this input window, if the UI
56
-     * supports it.
57
-     *
58
-     * @param isAway Whether the away indicator should be displayed or not
59
-     * @deprecated Use {@link AwayStateListener}s to listen for changes instead
60
-     */
61
-    @Deprecated
62
-    void setAwayIndicator(boolean isAway);
63
-
64 43
     /**
65 44
      * Retrieves the container that owns this command window.
66 45
      *

+ 0
- 14
src/com/dmdirc/ui/interfaces/MainWindow.java ファイルの表示

@@ -41,20 +41,6 @@ public interface MainWindow {
41 41
      */
42 42
     void quit();
43 43
 
44
-    /**
45
-     * Sets whether or not the internal frame state is currently maximised.
46
-     *
47
-     * @param max whether the frame is maxomised
48
-     */
49
-    void setMaximised(final boolean max);
50
-
51
-    /**
52
-     * Gets whether or not the internal frame state is currently maximised.
53
-     *
54
-     * @return True iff frames should be maximised, false otherwise
55
-     */
56
-    boolean getMaximised();
57
-
58 44
     /**
59 45
      * Returns a prefix for use in the titlebar. Includes the version number
60 46
      * if the config option is set.

+ 0
- 94
src/com/dmdirc/ui/interfaces/UIController.java ファイルの表示

@@ -23,10 +23,7 @@
23 23
 package com.dmdirc.ui.interfaces;
24 24
 
25 25
 import com.dmdirc.Channel;
26
-import com.dmdirc.FrameContainer;
27
-import com.dmdirc.Query;
28 26
 import com.dmdirc.Server;
29
-import com.dmdirc.WritableFrameContainer;
30 27
 import com.dmdirc.config.prefs.PreferencesInterface;
31 28
 import com.dmdirc.ui.core.dialogs.sslcertificate.SSLCertificateDialogModel;
32 29
 import com.dmdirc.updater.Update;
@@ -49,71 +46,6 @@ public interface UIController {
49 46
      */
50 47
     MainWindow getMainWindow();
51 48
 
52
-    /**
53
-     * Retrieves the status bar component used by this UI.
54
-     *
55
-     * @deprecated Should not be used externally - use the
56
-     * {@link com.dmdirc.ui.core.components.StatusBarManager} instead.
57
-     * @return This UI's status bar
58
-     */
59
-    @Deprecated
60
-    StatusBar getStatusBar();
61
-
62
-    /**
63
-     * Creates a channel window for the specified channel.
64
-     *
65
-     * @param channel The channel that is requesting a window be made
66
-     * @return A new channel window for the specified channel
67
-     * @deprecated Controllers should listen for window events using a
68
-     * {@link FrameListener} and create windows as needed.
69
-     */
70
-    @Deprecated
71
-    ChannelWindow getChannel(Channel channel);
72
-
73
-    /**
74
-     * Creates a server window for the specified server.
75
-     *
76
-     * @param server The server that is requesting a window be made
77
-     * @return A new server window for the specified server
78
-     * @deprecated Controllers should listen for window events using a
79
-     * {@link FrameListener} and create windows as needed.
80
-     */
81
-    @Deprecated
82
-    ServerWindow getServer(Server server);
83
-
84
-    /**
85
-     * Creates a query window for the specified query.
86
-     *
87
-     * @param query The query that is requesting a window be made
88
-     * @return A new query window for the specified query
89
-     * @deprecated Controllers should listen for window events using a
90
-     * {@link FrameListener} and create windows as needed.
91
-     */
92
-    @Deprecated
93
-    QueryWindow getQuery(Query query);
94
-
95
-    /**
96
-     * Creates a new custom window instance.
97
-     *
98
-     * @param owner The owner of the input window
99
-     * @return A new custom window
100
-     * @deprecated Controllers should listen for window events using a
101
-     * {@link FrameListener} and create windows as needed.
102
-     */
103
-    @Deprecated
104
-    Window getWindow(FrameContainer<?> owner);
105
-
106
-    /**
107
-     * Creates a new custom input window instance.
108
-     *
109
-     * @param owner The owner of the input window
110
-     * @return A new custom input window
111
-     * @deprecated Controllers should listen for window events using a
112
-     * {@link FrameListener} and create windows as needed.
113
-     */
114
-    @Deprecated
115
-    InputWindow getInputWindow(WritableFrameContainer<?> owner);
116
-
117 49
     /**
118 50
      * Returns an updater dialog for the specified updates.
119 51
      *
@@ -128,14 +60,6 @@ public interface UIController {
128 60
      */
129 61
     void showFirstRunWizard();
130 62
 
131
-    /**
132
-     * Shows the (addons) migration wizard for the ui.
133
-     *
134
-     * @deprecated Migration wizard is no longer used or needed
135
-     */
136
-    @Deprecated
137
-    void showMigrationWizard();
138
-
139 63
     /**
140 64
      * Shows the SSL certificate information dialog.
141 65
      *
@@ -163,24 +87,6 @@ public interface UIController {
163 87
      */
164 88
     void initUISettings();
165 89
 
166
-    /**
167
-     * Returns the active window.
168
-     *
169
-     * @return Active window or null
170
-     * @deprecated Use {@link WindowManager#getActiveWindow()} instead
171
-     */
172
-    @Deprecated
173
-    Window getActiveWindow();
174
-
175
-    /**
176
-     * Returns the active server.
177
-     *
178
-     * @return Active server null
179
-     * @deprecated Use {@link WindowManager#getActiveServer()} instead
180
-     */
181
-    @Deprecated
182
-    Server getActiveServer();
183
-
184 90
     /**
185 91
      * Shows the unknown URL protocol handling dialog for a URL.
186 92
      *

+ 0
- 141
src/com/dmdirc/ui/interfaces/Window.java ファイルの表示

@@ -23,8 +23,6 @@
23 23
 package com.dmdirc.ui.interfaces;
24 24
 
25 25
 import com.dmdirc.FrameContainer;
26
-import com.dmdirc.config.ConfigManager;
27
-import com.dmdirc.util.StringTranscoder;
28 26
 
29 27
 /**
30 28
  * The Window interface specifies common methods that should be implemented
@@ -32,55 +30,6 @@ import com.dmdirc.util.StringTranscoder;
32 30
  */
33 31
 public interface Window {
34 32
 
35
-    /**
36
-     * Formats the arguments using the Formatter, then adds the result to the
37
-     * main text area.
38
-     *
39
-     * @param messageType The type of this message
40
-     * @param args The arguments for the message
41
-     * @deprecated Use corresponding methods in {@link FrameContainer} instead
42
-     */
43
-    @Deprecated
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
-     *
50
-     * @param messageType The type of this message
51
-     * @param args The arguments for the message
52
-     * @deprecated Use corresponding methods in {@link FrameContainer} instead
53
-     */
54
-    @Deprecated
55
-    void addLine(StringBuffer messageType, Object... args);
56
-
57
-    /**
58
-     * Adds the specified raw line to the window, without using a formatter.
59
-     *
60
-     * @param line The line to be added
61
-     * @param timestamp Whether or not to display the timestamp for this line
62
-     * @deprecated Use corresponding methods in {@link FrameContainer} instead
63
-     */
64
-    @Deprecated
65
-    void addLine(final String line, final boolean timestamp);
66
-
67
-    /**
68
-     * Clears the main text area of the command window.
69
-     *
70
-     * @deprecated Call {@link IRCDocument#clear()} via {@link FrameContainer#getDocument()}
71
-     */
72
-    @Deprecated
73
-    void clear();
74
-
75
-    /**
76
-     * Retrieves the config manager for this command window.
77
-     *
78
-     * @return This window's config manager
79
-     * @deprecated Use {@link FrameContainer#getConfigManager()}
80
-     */
81
-    @Deprecated
82
-    ConfigManager getConfigManager();
83
-
84 33
     /**
85 34
      * Retrieves the container that owns this command window.
86 35
      *
@@ -88,101 +37,11 @@ public interface Window {
88 37
      */
89 38
     FrameContainer<?> getContainer();
90 39
 
91
-    /**
92
-     * Determines if the current window is visible.
93
-     *
94
-     * @return boolean visibility
95
-     * @deprecated With MDI removal, the client no longer has a concept of
96
-     * visibility
97
-     */
98
-    @Deprecated
99
-    boolean isVisible();
100
-
101
-    /**
102
-     * Sets the visibility of this window.
103
-     *
104
-     * @param isVisible Whether the window should be visible or not
105
-     * @deprecated With MDI removal, the client no longer has a concept of
106
-     * visibility
107
-     */
108
-    @Deprecated
109
-    void setVisible(boolean isVisible);
110
-
111
-    /**
112
-     * Retrives the current title of this window.
113
-     *
114
-     * @return This window's title
115
-     * @deprecated Use {@link FrameContainer#getTitle()} instead
116
-     */
117
-    @Deprecated
118
-    String getTitle();
119
-
120
-    /**
121
-     * Determines if this frame is currently maximised.
122
-     *
123
-     * @return true if the frame is maximised, false otherwise
124
-     * @deprecated This shouldn't be used outside the UI
125
-     */
126
-    @Deprecated
127
-    boolean isMaximum();
128
-
129
-    /**
130
-     * Sets the title of this window.
131
-     *
132
-     * @param title The new title to be used.
133
-     * @deprecated Should use {@link FrameContainer#setTitle(java.lang.String)}
134
-     */
135
-    @Deprecated
136
-    void setTitle(String title);
137
-
138 40
     /**
139 41
      * Opens this window.
140 42
      */
141 43
     void open();
142 44
 
143
-    /**
144
-     * Restores this window.
145
-     *
146
-     * @since 0.6.3m1
147
-     * @deprecated This shouldn't be used outside the UI
148
-     */
149
-    @Deprecated
150
-    void restore();
151
-
152
-    /**
153
-     * Maximises this window.
154
-     *
155
-     * @since 0.6.3m1
156
-     * @deprecated This shouldn't be used outside the UI
157
-     */
158
-    @Deprecated
159
-    void maximise();
160
-
161
-    /**
162
-     * Toggles Maximise State.
163
-     *
164
-     * @since 0.6.3m1
165
-     * @deprecated This shouldn't be used outside the UI
166
-     */
167
-    @Deprecated
168
-    void toggleMaximise();
169
-
170
-    /**
171
-     * Minimises this window.
172
-     * @deprecated This shouldn't be used outside the UI
173
-     */
174
-    @Deprecated
175
-    void minimise();
176
-
177
-    /**
178
-     * Returns the transcoder that is being used by the UI.
179
-     *
180
-     * @return This window's transcoder
181
-     * @deprecated Use {@link FrameContainer#getTranscoder()} instead
182
-     */
183
-    @Deprecated
184
-    StringTranscoder getTranscoder();
185
-
186 45
     /** Closes this window. */
187 46
     void close();
188 47
 

+ 0
- 50
src/com/dmdirc/ui/messages/IRCDocument.java ファイルの表示

@@ -116,41 +116,6 @@ public class IRCDocument implements Serializable, ConfigChangeListener {
116 116
         }
117 117
     }
118 118
 
119
-    /**
120
-     * Adds the stylised string to the canvas.
121
-     *
122
-     * @param text stylised string to add to the text
123
-     * @deprecated Use {@link #addText(java.util.List)} instead
124
-     */
125
-    @Deprecated
126
-    public void addText(final String[] text) {
127
-        final int index;
128
-        synchronized (lines) {
129
-            final Line line = new Line(styliser, text, fontSize, fontName);
130
-            lines.add(line);
131
-            index = lines.indexOf(line);
132
-        }
133
-        fireLineAdded(index);
134
-    }
135
-
136
-    /**
137
-     * Adds the stylised string to the canvas.
138
-     *
139
-     * @param text stylised string to add to the text
140
-     * @param lineHeight Line height for the new line of text
141
-     * @deprecated Use {@link #addText(java.util.List)} instead
142
-     */
143
-    @Deprecated
144
-    public void addText(final String[] text, final int lineHeight) {
145
-        final int index;
146
-        synchronized (lines) {
147
-            final Line line = new Line(styliser, text, lineHeight, fontName);
148
-            lines.add(line);
149
-            index = lines.indexOf(line);
150
-        }
151
-        fireLineAdded(index);
152
-    }
153
-
154 119
     /**
155 120
      * Adds the stylised string to the canvas.
156 121
      *
@@ -237,21 +202,6 @@ public class IRCDocument implements Serializable, ConfigChangeListener {
237 202
         listeners.remove(IRCDocumentListener.class, listener);
238 203
     }
239 204
 
240
-    /**
241
-     * Fires the line added method on all listeners.
242
-     *
243
-     * @param index Index of the added line
244
-     * @deprecated Use {@link #fireLinesAdded(int, int)} instead
245
-     */
246
-    @Deprecated
247
-    protected void fireLineAdded(final int index) {
248
-        for (IRCDocumentListener listener
249
-                : listeners.get(IRCDocumentListener.class)) {
250
-            listener.lineAdded(index, lines.size());
251
-        }
252
-        trim(frameBufferSize);
253
-    }
254
-
255 205
     /**
256 206
      * Fires the lines added method on all listeners.
257 207
      *

+ 0
- 10
src/com/dmdirc/ui/messages/IRCDocumentListener.java ファイルの表示

@@ -29,16 +29,6 @@ import java.util.EventListener;
29 29
  */
30 30
 public interface IRCDocumentListener extends EventListener {
31 31
 
32
-    /**
33
-     * A line has been added to the textpane.
34
-     *
35
-     * @param line Index of the added line
36
-     * @param size New number of lines
37
-     * @deprecated Use {@link #linesAdded(line, length, size)}
38
-     */
39
-    @Deprecated
40
-    void lineAdded(final int line, final int size);
41
-
42 32
     /**
43 33
      * A line has been added to the textpane.
44 34
      *

+ 0
- 13
src/com/dmdirc/ui/themes/ThemeIdentity.java ファイルの表示

@@ -63,19 +63,6 @@ public class ThemeIdentity extends Identity {
63 63
         this.theme = theme;
64 64
     }
65 65
 
66
-    /** {@inheritDoc} */
67
-    @Override @Deprecated
68
-    public boolean hasOption(final String domain, final String option,
69
-            final Validator<String> validator) {
70
-        if (domain.equalsIgnoreCase("ui") || domain.equalsIgnoreCase("identity")
71
-                || domain.equalsIgnoreCase("icon")  || domain.equalsIgnoreCase("theme")
72
-                || domain.equalsIgnoreCase("formatter") || domain.equalsIgnoreCase("colour")) {
73
-            return super.hasOption(domain, option, validator);
74
-        } else {
75
-            return false;
76
-        }
77
-    }
78
-
79 66
     /** {@inheritDoc} */
80 67
     @Override
81 68
     public String getOption(final String domain,

+ 0
- 1
test/com/dmdirc/ServerManagerTest.java ファイルの表示

@@ -38,7 +38,6 @@ public class ServerManagerTest {
38 38
     @BeforeClass
39 39
     public static void setUp() throws Exception {
40 40
         IdentityManager.load();
41
-        Main.setUI(new DummyController());
42 41
         Main.ensureExists(PluginManager.getPluginManager(), "tabcompletion");
43 42
     }
44 43
 

+ 1
- 3
test/com/dmdirc/ServerTest.java ファイルの表示

@@ -23,7 +23,6 @@
23 23
 package com.dmdirc;
24 24
 
25 25
 import com.dmdirc.config.IdentityManager;
26
-import com.dmdirc.addons.ui_dummy.DummyController;
27 26
 
28 27
 import java.net.URI;
29 28
 import org.junit.BeforeClass;
@@ -36,11 +35,10 @@ public class ServerTest {
36 35
 
37 36
     @BeforeClass
38 37
     public static void setUp() throws Exception {
39
-        Main.setUI(new DummyController());
40 38
         Main.extractCorePlugins("tabcompletion_");
41 39
         IdentityManager.load();
42 40
         server = new Server(new URI("irc-test://255.255.255.255"),
43
-                IdentityManager.getProfiles().get(0));
41
+                IdentityManager.getCustomIdentities("profile").get(0));
44 42
         server.connect();
45 43
     }
46 44
 

+ 0
- 2
test/com/dmdirc/config/prefs/PreferencesManagerTest.java ファイルの表示

@@ -24,7 +24,6 @@ package com.dmdirc.config.prefs;
24 24
 import com.dmdirc.Main;
25 25
 import com.dmdirc.actions.ActionManager;
26 26
 import com.dmdirc.actions.CoreActionType;
27
-import com.dmdirc.addons.ui_swing.SwingController;
28 27
 import com.dmdirc.config.IdentityManager;
29 28
 import com.dmdirc.interfaces.ActionListener;
30 29
 
@@ -43,7 +42,6 @@ public class PreferencesManagerTest {
43 42
     public static void setUp() throws Exception {
44 43
         IdentityManager.load();
45 44
         Main.extractCorePlugins("ui_");
46
-        Main.setUI(new SwingController());
47 45
         PluginManager.getPluginManager();
48 46
         controller = mock(UIController.class);
49 47
     }

+ 10
- 10
test/com/dmdirc/ui/WindowManagerTest.java ファイルの表示

@@ -50,7 +50,7 @@ public class WindowManagerTest {
50 50
         verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), eq(true));
51 51
         verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), (FrameContainer<?>) anyObject(), eq(true));
52 52
         
53
-        WindowManager.addWindow(parent);
53
+        WindowManager.addWindow(parent.getContainer());
54 54
         
55 55
         verify(tfm).addWindow(same(parent.getContainer()), eq(true));
56 56
         verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), (FrameContainer<?>) anyObject(), eq(true));
@@ -61,10 +61,10 @@ public class WindowManagerTest {
61 61
         final FrameListener tfm = mock(FrameListener.class);
62 62
         final Window parent = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
63 63
         final Window child = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
64
-        WindowManager.addWindow(parent);
64
+        WindowManager.addWindow(parent.getContainer());
65 65
         WindowManager.addFrameListener(tfm);
66 66
         
67
-        WindowManager.addWindow(parent, child);
67
+        WindowManager.addWindow(parent.getContainer(), child.getContainer());
68 68
         
69 69
         verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), eq(true));
70 70
         verify(tfm).addWindow(same(parent.getContainer()), same(child.getContainer()), eq(true));
@@ -74,10 +74,10 @@ public class WindowManagerTest {
74 74
     public void testRemoveRoot() {
75 75
         final FrameListener tfm = mock(FrameListener.class);
76 76
         final Window parent = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
77
-        WindowManager.addWindow(parent);
77
+        WindowManager.addWindow(parent.getContainer());
78 78
         WindowManager.addFrameListener(tfm);
79 79
 
80
-        WindowManager.removeWindow(parent);
80
+        WindowManager.removeWindow(parent.getContainer());
81 81
         
82 82
         verify(tfm).delWindow(same(parent.getContainer()));
83 83
     }
@@ -87,11 +87,11 @@ public class WindowManagerTest {
87 87
         final FrameListener tfm = mock(FrameListener.class);
88 88
         final Window parent = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
89 89
         final Window child = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
90
-        WindowManager.addWindow(parent);
91
-        WindowManager.addWindow(parent, child);
90
+        WindowManager.addWindow(parent.getContainer());
91
+        WindowManager.addWindow(parent.getContainer(), child.getContainer());
92 92
         WindowManager.addFrameListener(tfm);
93 93
 
94
-        WindowManager.removeWindow(child);
94
+        WindowManager.removeWindow(child.getContainer());
95 95
 
96 96
         verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), eq(true));
97 97
         verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), (FrameContainer<?>) anyObject(), eq(true));
@@ -104,12 +104,12 @@ public class WindowManagerTest {
104 104
         final FrameListener tfm = mock(FrameListener.class);
105 105
         final Window parent = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
106 106
         final Window child = new DummyInputWindow(new TestWritableFrameContainer<DummyInputWindow>(512, DummyInputWindow.class), null);
107
-        WindowManager.addWindow(parent);
107
+        WindowManager.addWindow(parent.getContainer());
108 108
         
109 109
         WindowManager.addFrameListener(tfm);
110 110
 
111 111
         WindowManager.removeFrameListener(tfm);
112
-        WindowManager.addWindow(parent, child);
112
+        WindowManager.addWindow(parent.getContainer(), child.getContainer());
113 113
         
114 114
         verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), eq(true));
115 115
         verify(tfm, never()).addWindow((FrameContainer<?>) anyObject(), (FrameContainer<?>) anyObject(), eq(true));

読み込み中…
キャンセル
保存