Pārlūkot izejas kodu

Make Chat return a WindowModel.

Start to move FrameContainers behind an iface so they can be
pulled out.

For now, just cast back when needed.
pull/359/head
Chris Smith 9 gadus atpakaļ
vecāks
revīzija
9f984720f4

+ 1
- 1
logging/src/com/dmdirc/addons/logging/LoggingManager.java Parādīt failu

@@ -371,7 +371,7 @@ public class LoggingManager implements ConfigChangeListener {
371 371
         final String filename = locator.getLogFile(event.getChannel().getName());
372 372
 
373 373
         if (autobackbuffer) {
374
-            showBackBuffer(event.getChannel().getWindowModel(), filename);
374
+            showBackBuffer((FrameContainer) event.getChannel().getWindowModel(), filename);
375 375
         }
376 376
 
377 377
         synchronized (FORMAT_LOCK) {

+ 3
- 2
redirect/src/com/dmdirc/addons/redirect/RedirectCommand.java Parādīt failu

@@ -82,8 +82,9 @@ public class RedirectCommand extends Command implements IntelligentCommand {
82 82
             final CommandArguments args, final CommandContext context) {
83 83
         final Chat target = ((ChatCommandContext) context).getChat();
84 84
         target.getWindowModel().getCommandParser().parseCommand(
85
-                new FakeWriteableFrameContainer(target.getWindowModel(), messageSinkManager,
86
-                        eventBus, backBufferFactory), args.getArgumentsAsString());
85
+                new FakeWriteableFrameContainer((FrameContainer) target.getWindowModel(),
86
+                        messageSinkManager, eventBus, backBufferFactory),
87
+                args.getArgumentsAsString());
87 88
     }
88 89
 
89 90
     @Override

+ 3
- 1
ui_swing/src/com/dmdirc/addons/ui_swing/components/TopicBar.java Parādīt failu

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.addons.ui_swing.components;
24 24
 
25 25
 import com.dmdirc.DMDircMBassador;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Topic;
27 28
 import com.dmdirc.addons.ui_swing.EdtHandlerInvocation;
28 29
 import com.dmdirc.addons.ui_swing.UIUtilities;
@@ -162,7 +163,8 @@ public class TopicBar extends JComponent implements ActionListener, ConfigChange
162 163
         final SwingInputHandler handler = new SwingInputHandler(
163 164
                 serviceManager, topicText, commandController,
164 165
                 channel.getWindowModel().getCommandParser(),
165
-                channel.getWindowModel(), tabCompleterUtils, channel.getEventBus());
166
+                (FrameContainer) channel.getWindowModel(), tabCompleterUtils,
167
+                channel.getEventBus());
166 168
         handler.setTypes(true, false, true, false);
167 169
         handler.setTabCompleter(channel.getWindowModel().getTabCompleter());
168 170
 

+ 3
- 1
ui_swing/src/com/dmdirc/addons/ui_swing/components/frames/ChannelFrame.java Parādīt failu

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.addons.ui_swing.components.frames;
24 24
 
25 25
 import com.dmdirc.DMDircMBassador;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.ServerState;
27 28
 import com.dmdirc.addons.ui_swing.EDTInvocation;
28 29
 import com.dmdirc.addons.ui_swing.EdtHandlerInvocation;
@@ -105,7 +106,8 @@ public final class ChannelFrame extends InputTextFrame {
105 106
             final InputTextFramePasteActionFactory inputTextFramePasteActionFactory,
106 107
             final TopicBarFactory topicBarFactory,
107 108
             final GroupChat owner) {
108
-        super(deps, inputFieldProvider, inputTextFramePasteActionFactory, owner.getWindowModel());
109
+        super(deps, inputFieldProvider, inputTextFramePasteActionFactory,
110
+                (FrameContainer) owner.getWindowModel());
109 111
 
110 112
         this.eventBus = deps.eventBus;
111 113
         this.globalConfig = deps.globalConfig;

+ 3
- 1
ui_swing/src/com/dmdirc/addons/ui_swing/dialogs/channelsetting/ChannelSettingsDialog.java Parādīt failu

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.addons.ui_swing.dialogs.channelsetting;
24 24
 
25 25
 import com.dmdirc.DMDircMBassador;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.addons.ui_swing.PrefsComponentFactory;
27 28
 import com.dmdirc.addons.ui_swing.SwingWindowFactory;
28 29
 import com.dmdirc.addons.ui_swing.UIUtilities;
@@ -140,7 +141,8 @@ public class ChannelSettingsDialog extends StandardDialog implements ActionListe
140 141
 
141 142
         identity = identityFactory.createChannelConfig(groupChat.getConnection().get().getNetwork(),
142 143
                 groupChat.getName());
143
-        channelWindow = (InputWindow) windowFactory.getSwingWindow(groupChat.getWindowModel());
144
+        channelWindow = (InputWindow) windowFactory.getSwingWindow(
145
+                (FrameContainer) groupChat.getWindowModel());
144 146
 
145 147
         initComponents(tabCompleterUtils);
146 148
         initListeners();

Notiek ielāde…
Atcelt
Saglabāt