Browse Source

Fix some uses of deprecated methods

Change-Id: I5322851385f32efb46b6345c5c48801dc7e70669
Reviewed-on: http://gerrit.dmdirc.com/1095
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
tags/0.6.4
Chris Smith 14 years ago
parent
commit
1473de0e57

+ 1
- 1
src/com/dmdirc/addons/dcc/DCCCommand.java View File

@@ -109,7 +109,7 @@ public final class DCCCommand extends ServerCommand implements IntelligentComman
109 109
 
110 110
                     sendLine(origin, isSilent, "DCCChatStarting", target,
111 111
                             chat.getHost(), chat.getPort());
112
-                    window.getFrame().addLine("DCCChatStarting", target,
112
+                    window.addLine("DCCChatStarting", target,
113 113
                             chat.getHost(), chat.getPort());
114 114
                 } else {
115 115
                     sendLine(origin, isSilent, "DCCChatError",

+ 1
- 1
src/com/dmdirc/addons/dcc/DCCPlugin.java View File

@@ -261,7 +261,7 @@ public final class DCCPlugin extends Plugin implements ActionListener {
261 261
                         }
262 262
                         final String myNickname = ((Server) arguments[0]).getParser().getLocalClient().getNickname();
263 263
                         final DCCFrame f = new DCCChatWindow(this, chat, "Chat: " + nickname, myNickname, nickname);
264
-                        f.getFrame().addLine("DCCChatStarting", nickname, chat.getHost(), chat.getPort());
264
+                        f.addLine("DCCChatStarting", nickname, chat.getHost(), chat.getPort());
265 265
                         chat.connect();
266 266
                     } else {
267 267
                         ActionManager.processEvent(DCCActions.DCC_CHAT_REQUEST, null, ((Server) arguments[0]), nickname);

+ 1
- 1
src/com/dmdirc/addons/logging/HistoryWindow.java View File

@@ -63,7 +63,7 @@ public class HistoryWindow extends FrameContainer {
63 63
         window.open();
64 64
         final int frameBufferSize = IdentityManager.getGlobalConfig().getOptionInt(
65 65
                 "ui", "frameBufferSize");
66
-        window.addLine(reader.getLinesAsString(Math.min(frameBufferSize, numLines)), false);
66
+        addLine(reader.getLinesAsString(Math.min(frameBufferSize, numLines)), false);
67 67
     }
68 68
 
69 69
     /** {@inheritDoc} */

+ 6
- 3
src/com/dmdirc/addons/redirect/FakeInputWindow.java View File

@@ -74,20 +74,23 @@ public class FakeInputWindow implements InputWindow {
74 74
 
75 75
     /** {@inheritDoc} */
76 76
     @Override
77
+    @Deprecated
77 78
     public void addLine(final String messageType, final Object... args) {
78
-        target.sendLine(Formatter.formatMessage(getConfigManager(), messageType, args));
79
+        getContainer().addLine(messageType, args);
79 80
     }
80 81
 
81 82
     /** {@inheritDoc} */
82 83
     @Override
84
+    @Deprecated
83 85
     public void addLine(final StringBuffer messageType, final Object... args) {
84
-        addLine(messageType.toString(), args);
86
+        getContainer().addLine(messageType, args);
85 87
     }
86 88
 
87 89
     /** {@inheritDoc} */
88 90
     @Override
91
+    @Deprecated
89 92
     public void addLine(final String line, final boolean timestamp) {
90
-        target.sendLine(line);
93
+        getContainer().addLine(line, timestamp);
91 94
     }
92 95
 
93 96
     /** {@inheritDoc} */

+ 4
- 3
src/com/dmdirc/addons/ui_dummy/DummyInputWindow.java View File

@@ -82,19 +82,20 @@ public class DummyInputWindow implements InputWindow {
82 82
     /** {@inheritDoc} */
83 83
     @Override
84 84
     public void addLine(final String messageType, final Object... args) {
85
-        System.out.println("DummyInputWindow.addLine(" + messageType + ", " + Arrays.toString(args) + ")");
85
+        getContainer().addLine(messageType, args);
86 86
     }
87 87
     
88 88
     /** {@inheritDoc} */
89 89
     @Override
90 90
     public void addLine(final StringBuffer messageType, final Object... args) {
91
-        addLine(messageType.toString(), args);
91
+        getContainer().addLine(messageType, args);
92 92
     }
93 93
     
94 94
     /** {@inheritDoc} */
95 95
     @Override
96
+    @Deprecated
96 97
     public void addLine(final String line, final boolean timestamp) {
97
-        throw new UnsupportedOperationException("Not supported yet.");
98
+        getContainer().addLine(line, timestamp);
98 99
     }
99 100
     
100 101
     /** {@inheritDoc} */

+ 3
- 0
src/com/dmdirc/addons/ui_swing/components/frames/TextFrame.java View File

@@ -425,18 +425,21 @@ public abstract class TextFrame extends JInternalFrame implements Window,
425 425
 
426 426
     /** {@inheritDoc} */
427 427
     @Override
428
+    @Deprecated
428 429
     public final void addLine(final String line, final boolean timestamp) {
429 430
         frameParent.addLine(line, timestamp);
430 431
     }
431 432
 
432 433
     /** {@inheritDoc} */
433 434
     @Override
435
+    @Deprecated
434 436
     public final void addLine(final String messageType, final Object... args) {
435 437
         frameParent.addLine(messageType, args);
436 438
     }
437 439
 
438 440
     /** {@inheritDoc} */
439 441
     @Override
442
+    @Deprecated
440 443
     public final void addLine(final StringBuffer messageType, final Object... args) {
441 444
         frameParent.addLine(messageType, args);
442 445
     }

Loading…
Cancel
Save