Browse Source

Use services for frame managers.

To add a frame manager, a plugin must export a FrameManagerProvider instance.
This will drop users back to using a treeview as their previous config setting
will be wrong (it needs to point to the Provider class now), and I don't think
it's worth adding migration code given we know of 0 users of the buttonbar.

This also enables us to dependency inject the frame managers.

Change-Id: Ic66997625587e1adc0ee6ed1c7e38fba31ec47e7
Reviewed-on: http://gerrit.dmdirc.com/3283
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
changes/83/3283/2
Chris Smith 10 years ago
parent
commit
31dc4b5c37

+ 17
- 27
src/com/dmdirc/addons/ui_swing/MainFrame.java View File

32
 import com.dmdirc.addons.ui_swing.framemanager.FrameManager;
32
 import com.dmdirc.addons.ui_swing.framemanager.FrameManager;
33
 import com.dmdirc.addons.ui_swing.framemanager.FramemanagerPosition;
33
 import com.dmdirc.addons.ui_swing.framemanager.FramemanagerPosition;
34
 import com.dmdirc.addons.ui_swing.framemanager.ctrltab.CtrlTabWindowManager;
34
 import com.dmdirc.addons.ui_swing.framemanager.ctrltab.CtrlTabWindowManager;
35
-import com.dmdirc.addons.ui_swing.framemanager.tree.TreeFrameManager;
36
 import com.dmdirc.events.ClientFocusGainedEvent;
35
 import com.dmdirc.events.ClientFocusGainedEvent;
37
 import com.dmdirc.events.ClientFocusLostEvent;
36
 import com.dmdirc.events.ClientFocusLostEvent;
38
 import com.dmdirc.events.ClientMinimisedEvent;
37
 import com.dmdirc.events.ClientMinimisedEvent;
42
 import com.dmdirc.interfaces.NotificationListener;
41
 import com.dmdirc.interfaces.NotificationListener;
43
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
42
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
44
 import com.dmdirc.interfaces.config.ConfigChangeListener;
43
 import com.dmdirc.interfaces.config.ConfigChangeListener;
45
-import com.dmdirc.logger.ErrorLevel;
46
-import com.dmdirc.logger.Logger;
47
 import com.dmdirc.ui.Colour;
44
 import com.dmdirc.ui.Colour;
48
 import com.dmdirc.ui.CoreUIUtils;
45
 import com.dmdirc.ui.CoreUIUtils;
49
 import com.dmdirc.ui.IconManager;
46
 import com.dmdirc.ui.IconManager;
111
     private final ListenerList listeners = new ListenerList();
108
     private final ListenerList listeners = new ListenerList();
112
     /** Window management. */
109
     /** Window management. */
113
     private final WindowManager windowManager;
110
     private final WindowManager windowManager;
111
+    /** Provider of frame managers. */
112
+    private final Provider<FrameManager> frameManagerProvider;
114
     /** The bus to despatch events on. */
113
     /** The bus to despatch events on. */
115
     private final EventBus eventBus;
114
     private final EventBus eventBus;
116
     /** The main application icon. */
115
     /** The main application icon. */
139
     /**
138
     /**
140
      * Creates new form MainFrame.
139
      * Creates new form MainFrame.
141
      *
140
      *
142
-     * @param controller          Swing controller
143
-     * @param apple               Apple instance
144
-     * @param windowFactory       The window factory to use to create and listen for windows.
145
-     * @param lifecycleController Controller to use to end the application.
146
-     * @param globalConfig        The config to read settings from.
147
-     * @param quitWorker          The quit worker to use when quitting the app.
148
-     * @param iconManager         The icon manager to use to get icons.
149
-     * @param windowManager       Window management
150
-     * @param eventBus            The event bus to post events to.
141
+     * @param controller           Swing controller
142
+     * @param apple                Apple instance
143
+     * @param windowFactory        The window factory to use to create and listen for windows.
144
+     * @param lifecycleController  Controller to use to end the application.
145
+     * @param globalConfig         The config to read settings from.
146
+     * @param quitWorker           The quit worker to use when quitting the app.
147
+     * @param iconManager          The icon manager to use to get icons.
148
+     * @param windowManager        Window management
149
+     * @param frameManagerProvider Provider to use to retrieve frame managers.
150
+     * @param eventBus             The event bus to post events to.
151
      */
151
      */
152
     public MainFrame(
152
     public MainFrame(
153
             final Apple apple,
153
             final Apple apple,
158
             final Provider<QuitWorker> quitWorker,
158
             final Provider<QuitWorker> quitWorker,
159
             final IconManager iconManager,
159
             final IconManager iconManager,
160
             final WindowManager windowManager,
160
             final WindowManager windowManager,
161
+            final Provider<FrameManager> frameManagerProvider,
161
             final EventBus eventBus) {
162
             final EventBus eventBus) {
162
         checkOnEDT();
163
         checkOnEDT();
163
         this.apple = apple;
164
         this.apple = apple;
168
         this.quitWorker = quitWorker;
169
         this.quitWorker = quitWorker;
169
         this.iconManager = iconManager;
170
         this.iconManager = iconManager;
170
         this.windowManager = windowManager;
171
         this.windowManager = windowManager;
172
+        this.frameManagerProvider = frameManagerProvider;
171
         this.eventBus = eventBus;
173
         this.eventBus = eventBus;
172
 
174
 
173
         focusOrder = new QueuedLinkedHashSet<>();
175
         focusOrder = new QueuedLinkedHashSet<>();
215
      * @return Frame manager size.
217
      * @return Frame manager size.
216
      */
218
      */
217
     public int getFrameManagerSize() {
219
     public int getFrameManagerSize() {
218
-        if (position == FramemanagerPosition.LEFT
219
-                || position == FramemanagerPosition.RIGHT) {
220
+        if (position == FramemanagerPosition.LEFT || position == FramemanagerPosition.RIGHT) {
220
             return frameManagerPanel.getWidth();
221
             return frameManagerPanel.getWidth();
221
         } else {
222
         } else {
222
             return frameManagerPanel.getHeight();
223
             return frameManagerPanel.getHeight();
346
                 frameManagerPanel.removeAll();
347
                 frameManagerPanel.removeAll();
347
                 if (mainFrameManager != null) {
348
                 if (mainFrameManager != null) {
348
                     windowFactory.removeWindowListener(mainFrameManager);
349
                     windowFactory.removeWindowListener(mainFrameManager);
350
+                    removeSelectionListener(mainFrameManager);
349
                 }
351
                 }
350
-                final String manager = globalConfig.getOption("ui", "framemanager");
351
-                try {
352
-                    mainFrameManager = (FrameManager) Class.forName(manager)
353
-                            .getConstructor(WindowManager.class).newInstance(windowManager);
354
-                } catch (final ReflectiveOperationException | SecurityException | LinkageError ex) {
355
-                    Logger.appError(ErrorLevel.MEDIUM, "Unable to load frame "
356
-                            + "manager, falling back to default.", ex);
357
-                } finally {
358
-                    if (mainFrameManager == null) {
359
-                        mainFrameManager = new TreeFrameManager(windowManager);
360
-                    }
361
-                }
362
-                mainFrameManager.setController(controller);
352
+                mainFrameManager = frameManagerProvider.get();
363
                 mainFrameManager.setParent(frameManagerPanel);
353
                 mainFrameManager.setParent(frameManagerPanel);
364
                 addSelectionListener(mainFrameManager);
354
                 addSelectionListener(mainFrameManager);
365
                 windowFactory.addWindowListener(mainFrameManager);
355
                 windowFactory.addWindowListener(mainFrameManager);

+ 14
- 2
src/com/dmdirc/addons/ui_swing/SwingController.java View File

32
 import com.dmdirc.addons.ui_swing.commands.ServerSettings;
32
 import com.dmdirc.addons.ui_swing.commands.ServerSettings;
33
 import com.dmdirc.addons.ui_swing.components.frames.TextFrame;
33
 import com.dmdirc.addons.ui_swing.components.frames.TextFrame;
34
 import com.dmdirc.addons.ui_swing.dialogs.error.ErrorListDialog;
34
 import com.dmdirc.addons.ui_swing.dialogs.error.ErrorListDialog;
35
+import com.dmdirc.addons.ui_swing.framemanager.FrameManagerProvider;
35
 import com.dmdirc.addons.ui_swing.injection.SwingModule;
36
 import com.dmdirc.addons.ui_swing.injection.SwingModule;
36
 import com.dmdirc.config.prefs.PluginPreferencesCategory;
37
 import com.dmdirc.config.prefs.PluginPreferencesCategory;
37
 import com.dmdirc.config.prefs.PreferencesCategory;
38
 import com.dmdirc.config.prefs.PreferencesCategory;
423
         final Map<String, String> framemanagers = new HashMap<>();
424
         final Map<String, String> framemanagers = new HashMap<>();
424
         final Map<String, String> fmpositions = new HashMap<>();
425
         final Map<String, String> fmpositions = new HashMap<>();
425
 
426
 
427
+        // TODO: When we can inject nicely, use a service locator to find all implementations.
426
         framemanagers.put(
428
         framemanagers.put(
427
-                "com.dmdirc.addons.ui_swing.framemanager.tree.TreeFrameManager",
429
+                "com.dmdirc.addons.ui_swing.framemanager.tree.TreeFrameManagerProvider",
428
                 "Treeview");
430
                 "Treeview");
429
         framemanagers.put(
431
         framemanagers.put(
430
-                "com.dmdirc.addons.ui_swing.framemanager.buttonbar.ButtonBar",
432
+                "com.dmdirc.addons.ui_swing.framemanager.buttonbar.ButtonBarProvider",
431
                 "Button bar");
433
                 "Button bar");
432
 
434
 
433
         fmpositions.put("top", "Top");
435
         fmpositions.put("top", "Top");
717
         return swingManager.getMainFrame();
719
         return swingManager.getMainFrame();
718
     }
720
     }
719
 
721
 
722
+    @Exported
723
+    public FrameManagerProvider getTreeManager() {
724
+        return swingManager.getTreeProvider();
725
+    }
726
+
727
+    @Exported
728
+    public FrameManagerProvider getButtonManager() {
729
+        return swingManager.getButtonProvider();
730
+    }
731
+
720
 }
732
 }

+ 38
- 11
src/com/dmdirc/addons/ui_swing/SwingManager.java View File

31
 import com.dmdirc.addons.ui_swing.dialogs.channelsetting.ChannelSettingsDialog;
31
 import com.dmdirc.addons.ui_swing.dialogs.channelsetting.ChannelSettingsDialog;
32
 import com.dmdirc.addons.ui_swing.dialogs.serversetting.ServerSettingsDialog;
32
 import com.dmdirc.addons.ui_swing.dialogs.serversetting.ServerSettingsDialog;
33
 import com.dmdirc.addons.ui_swing.dialogs.url.URLDialogFactory;
33
 import com.dmdirc.addons.ui_swing.dialogs.url.URLDialogFactory;
34
+import com.dmdirc.addons.ui_swing.framemanager.buttonbar.ButtonBarProvider;
34
 import com.dmdirc.addons.ui_swing.framemanager.ctrltab.CtrlTabWindowManager;
35
 import com.dmdirc.addons.ui_swing.framemanager.ctrltab.CtrlTabWindowManager;
36
+import com.dmdirc.addons.ui_swing.framemanager.tree.TreeFrameManagerProvider;
35
 import com.dmdirc.addons.ui_swing.injection.KeyedDialogProvider;
37
 import com.dmdirc.addons.ui_swing.injection.KeyedDialogProvider;
36
 import com.dmdirc.addons.ui_swing.wizard.firstrun.FirstRunWizardExecutor;
38
 import com.dmdirc.addons.ui_swing.wizard.firstrun.FirstRunWizardExecutor;
37
 import com.dmdirc.ui.WindowManager;
39
 import com.dmdirc.ui.WindowManager;
58
     private final SwingWindowFactory windowFactory;
60
     private final SwingWindowFactory windowFactory;
59
     /** The status bar manager to register our status bar with. */
61
     /** The status bar manager to register our status bar with. */
60
     private final StatusBarManager statusBarManager;
62
     private final StatusBarManager statusBarManager;
63
+    private final MenuBar menuBar;
61
     /** The status bar in use. */
64
     /** The status bar in use. */
62
     private final SwingStatusBar statusBar;
65
     private final SwingStatusBar statusBar;
63
     /** The window manager to listen on for events. */
66
     /** The window manager to listen on for events. */
64
     private final WindowManager windowManager;
67
     private final WindowManager windowManager;
65
-    /** The main frame of the Swing UI. */
66
-    private final MainFrame mainFrame;
68
+    private final CtrlTabWindowManager ctrlTabManager;
67
     /** The key listener that supports dialogs. */
69
     /** The key listener that supports dialogs. */
68
     private final DialogKeyListener dialogKeyListener;
70
     private final DialogKeyListener dialogKeyListener;
69
     /** Provider of first run executors. */
71
     /** Provider of first run executors. */
80
     private final SwingLinkHandler linkHandler;
82
     private final SwingLinkHandler linkHandler;
81
     /** Bus to listen on for events. */
83
     /** Bus to listen on for events. */
82
     private final EventBus eventBus;
84
     private final EventBus eventBus;
85
+    /** The provider to use to create tree-based frame managers. */
86
+    private final TreeFrameManagerProvider treeProvider;
87
+    /** The provider to use to create button-based frame managers. */
88
+    private final ButtonBarProvider buttonProvider;
89
+    /** The provider to use to create new main frames. */
90
+    private final Provider<MainFrame> mainFrameProvider;
91
+    /** The main frame of the Swing UI. */
92
+    private MainFrame mainFrame;
83
 
93
 
84
     /**
94
     /**
85
      * Creates a new instance of {@link SwingManager}.
95
      * Creates a new instance of {@link SwingManager}.
88
      * @param windowFactory                 The window factory in use.
98
      * @param windowFactory                 The window factory in use.
89
      * @param windowManager                 The window manager to listen on for events.
99
      * @param windowManager                 The window manager to listen on for events.
90
      * @param statusBarManager              The status bar manager to register our status bar with.
100
      * @param statusBarManager              The status bar manager to register our status bar with.
91
-     * @param mainFrame                     The main frame of the Swing UI.
101
+     * @param mainFrameProvider             The provider to use for the main frame.
92
      * @param menuBar                       The menu bar to use for the main frame.
102
      * @param menuBar                       The menu bar to use for the main frame.
93
      * @param statusBar                     The status bar to use in the main frame.
103
      * @param statusBar                     The status bar to use in the main frame.
94
      * @param ctrlTabManager                The window manager that handles ctrl+tab behaviour.
104
      * @param ctrlTabManager                The window manager that handles ctrl+tab behaviour.
100
      * @param urlDialogFactory              Factory to use to create URL dialogs.
110
      * @param urlDialogFactory              Factory to use to create URL dialogs.
101
      * @param linkHandler                   The handler to use when users click links.
111
      * @param linkHandler                   The handler to use when users click links.
102
      * @param eventBus                      The bus to listen on for events.
112
      * @param eventBus                      The bus to listen on for events.
113
+     * @param treeProvider                  Provider to use for tree-based frame managers.
114
+     * @param buttonProvider                Provider to use for button-based frame managers.
103
      */
115
      */
104
     @Inject
116
     @Inject
105
     public SwingManager(
117
     public SwingManager(
107
             final SwingWindowFactory windowFactory,
119
             final SwingWindowFactory windowFactory,
108
             final WindowManager windowManager,
120
             final WindowManager windowManager,
109
             final StatusBarManager statusBarManager,
121
             final StatusBarManager statusBarManager,
110
-            final MainFrame mainFrame,
122
+            final Provider<MainFrame> mainFrameProvider,
111
             final MenuBar menuBar,
123
             final MenuBar menuBar,
112
             final SwingStatusBar statusBar,
124
             final SwingStatusBar statusBar,
113
             final CtrlTabWindowManager ctrlTabManager,
125
             final CtrlTabWindowManager ctrlTabManager,
118
             final Provider<FeedbackNag> feedbackNagProvider,
130
             final Provider<FeedbackNag> feedbackNagProvider,
119
             final URLDialogFactory urlDialogFactory,
131
             final URLDialogFactory urlDialogFactory,
120
             final SwingLinkHandler linkHandler,
132
             final SwingLinkHandler linkHandler,
121
-            final EventBus eventBus) {
133
+            final EventBus eventBus,
134
+            final TreeFrameManagerProvider treeProvider,
135
+            final ButtonBarProvider buttonProvider) {
122
         this.eventQueue = eventQueue;
136
         this.eventQueue = eventQueue;
123
         this.windowFactory = windowFactory;
137
         this.windowFactory = windowFactory;
124
         this.windowManager = windowManager;
138
         this.windowManager = windowManager;
139
+        this.menuBar = menuBar;
125
         this.statusBar = statusBar;
140
         this.statusBar = statusBar;
126
         this.statusBarManager = statusBarManager;
141
         this.statusBarManager = statusBarManager;
142
+        this.mainFrameProvider = mainFrameProvider;
143
+        this.ctrlTabManager = ctrlTabManager;
127
         this.dialogKeyListener = dialogKeyListener;
144
         this.dialogKeyListener = dialogKeyListener;
128
         this.firstRunExecutor = firstRunExecutor;
145
         this.firstRunExecutor = firstRunExecutor;
129
         this.serverSettingsDialogProvider = serverSettingsDialogProvider;
146
         this.serverSettingsDialogProvider = serverSettingsDialogProvider;
132
         this.urlDialogFactory = urlDialogFactory;
149
         this.urlDialogFactory = urlDialogFactory;
133
         this.linkHandler = linkHandler;
150
         this.linkHandler = linkHandler;
134
         this.eventBus = eventBus;
151
         this.eventBus = eventBus;
135
-
136
-        this.mainFrame = mainFrame;
137
-        this.mainFrame.setMenuBar(menuBar);
138
-        this.mainFrame.setWindowManager(ctrlTabManager);
139
-        this.mainFrame.setStatusBar(statusBar);
140
-        this.mainFrame.initComponents();
152
+        this.treeProvider = treeProvider;
153
+        this.buttonProvider = buttonProvider;
141
     }
154
     }
142
 
155
 
143
     /**
156
     /**
144
      * Handles loading of the UI.
157
      * Handles loading of the UI.
145
      */
158
      */
146
     public void load() {
159
     public void load() {
160
+        this.mainFrame = mainFrameProvider.get();
161
+        this.mainFrame.setMenuBar(menuBar);
162
+        this.mainFrame.setWindowManager(ctrlTabManager);
163
+        this.mainFrame.setStatusBar(statusBar);
164
+        this.mainFrame.initComponents();
165
+
147
         installEventQueue();
166
         installEventQueue();
148
         installKeyListener();
167
         installKeyListener();
149
 
168
 
219
         return mainFrame;
238
         return mainFrame;
220
     }
239
     }
221
 
240
 
241
+    public TreeFrameManagerProvider getTreeProvider() {
242
+        return treeProvider;
243
+    }
244
+
245
+    public ButtonBarProvider getButtonProvider() {
246
+        return buttonProvider;
247
+    }
248
+
222
     /**
249
     /**
223
      * Installs the DMDirc event queue.
250
      * Installs the DMDirc event queue.
224
      */
251
      */

+ 0
- 9
src/com/dmdirc/addons/ui_swing/framemanager/FrameManager.java View File

23
 package com.dmdirc.addons.ui_swing.framemanager;
23
 package com.dmdirc.addons.ui_swing.framemanager;
24
 
24
 
25
 import com.dmdirc.addons.ui_swing.SelectionListener;
25
 import com.dmdirc.addons.ui_swing.SelectionListener;
26
-import com.dmdirc.addons.ui_swing.SwingController;
27
 import com.dmdirc.addons.ui_swing.SwingWindowListener;
26
 import com.dmdirc.addons.ui_swing.SwingWindowListener;
28
 
27
 
29
 import javax.swing.JComponent;
28
 import javax.swing.JComponent;
42
      */
41
      */
43
     void setParent(JComponent parent);
42
     void setParent(JComponent parent);
44
 
43
 
45
-    /**
46
-     * Sets the UIController for the frame manager. This method will be called immediately after
47
-     * construction of the frame manager.
48
-     *
49
-     * @param controller UIController
50
-     */
51
-    void setController(SwingController controller);
52
-
53
     /**
44
     /**
54
      * Indicates whether this frame manager can be positioned vertically (i.e., at the side of the
45
      * Indicates whether this frame manager can be positioned vertically (i.e., at the side of the
55
      * screen).
46
      * screen).

+ 32
- 0
src/com/dmdirc/addons/ui_swing/framemanager/FrameManagerProvider.java View File

1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.addons.ui_swing.framemanager;
24
+
25
+/**
26
+ * Service interface for plugins that provide frame managers.
27
+ */
28
+public interface FrameManagerProvider {
29
+
30
+    FrameManager getFrameManager();
31
+
32
+}

+ 57
- 48
src/com/dmdirc/addons/ui_swing/framemanager/buttonbar/ButtonBar.java View File

22
 
22
 
23
 package com.dmdirc.addons.ui_swing.framemanager.buttonbar;
23
 package com.dmdirc.addons.ui_swing.framemanager.buttonbar;
24
 
24
 
25
+import com.dmdirc.ClientModule.GlobalConfig;
25
 import com.dmdirc.FrameContainer;
26
 import com.dmdirc.FrameContainer;
26
 import com.dmdirc.FrameContainerComparator;
27
 import com.dmdirc.FrameContainerComparator;
28
+import com.dmdirc.addons.ui_swing.MainFrame;
27
 import com.dmdirc.addons.ui_swing.SwingController;
29
 import com.dmdirc.addons.ui_swing.SwingController;
28
 import com.dmdirc.addons.ui_swing.SwingWindowFactory;
30
 import com.dmdirc.addons.ui_swing.SwingWindowFactory;
29
 import com.dmdirc.addons.ui_swing.UIUtilities;
31
 import com.dmdirc.addons.ui_swing.UIUtilities;
33
 import com.dmdirc.addons.ui_swing.framemanager.FramemanagerPosition;
35
 import com.dmdirc.addons.ui_swing.framemanager.FramemanagerPosition;
34
 import com.dmdirc.interfaces.FrameInfoListener;
36
 import com.dmdirc.interfaces.FrameInfoListener;
35
 import com.dmdirc.interfaces.NotificationListener;
37
 import com.dmdirc.interfaces.NotificationListener;
38
+import com.dmdirc.interfaces.config.AggregateConfigProvider;
36
 import com.dmdirc.interfaces.config.ConfigChangeListener;
39
 import com.dmdirc.interfaces.config.ConfigChangeListener;
37
 import com.dmdirc.interfaces.ui.Window;
40
 import com.dmdirc.interfaces.ui.Window;
38
 import com.dmdirc.ui.Colour;
41
 import com.dmdirc.ui.Colour;
53
 import java.util.HashMap;
56
 import java.util.HashMap;
54
 import java.util.Map;
57
 import java.util.Map;
55
 
58
 
59
+import javax.inject.Inject;
60
+import javax.inject.Provider;
56
 import javax.swing.JComponent;
61
 import javax.swing.JComponent;
57
 import javax.swing.JMenuItem;
62
 import javax.swing.JMenuItem;
58
 import javax.swing.JPopupMenu;
63
 import javax.swing.JPopupMenu;
78
     /** The default height of buttons. */
83
     /** The default height of buttons. */
79
     private static final int BUTTON_HEIGHT = 25;
84
     private static final int BUTTON_HEIGHT = 25;
80
     /** A map of windows to the buttons we're using for them. */
85
     /** A map of windows to the buttons we're using for them. */
81
-    private Map<Window, FrameToggleButton> buttons;
86
+    private final Map<Window, FrameToggleButton> buttons;
82
     /** The scrolling panel for our ButtonBar. */
87
     /** The scrolling panel for our ButtonBar. */
83
     private final JScrollPane scrollPane;
88
     private final JScrollPane scrollPane;
84
     /** The panel used for our buttons. */
89
     /** The panel used for our buttons. */
85
-    private ButtonPanel buttonPanel;
90
+    private final ButtonPanel buttonPanel;
86
     /** The position of this frame manager. */
91
     /** The position of this frame manager. */
87
-    private FramemanagerPosition position;
92
+    private final FramemanagerPosition position;
88
     /** The default width of buttons. */
93
     /** The default width of buttons. */
89
     private int buttonWidth = 0;
94
     private int buttonWidth = 0;
90
     /** The parent for the manager. */
95
     /** The parent for the manager. */
98
     /** Sort child windows prefs setting. */
103
     /** Sort child windows prefs setting. */
99
     private boolean sortChildWindows;
104
     private boolean sortChildWindows;
100
     /** UI Window Factory. */
105
     /** UI Window Factory. */
101
-    private SwingWindowFactory windowFactory;
102
-    /** UI Controller. */
103
-    private SwingController controller;
106
+    private final SwingWindowFactory windowFactory;
104
     /** Window management. */
107
     /** Window management. */
105
     private final WindowManager windowManager;
108
     private final WindowManager windowManager;
109
+    /** Global configuration to read settings from. */
110
+    private final AggregateConfigProvider globalConfig;
111
+    /** Provider to use to retrieve the current main frame. */
112
+    private final Provider<MainFrame> mainFrameProvider;
106
 
113
 
107
     /**
114
     /**
108
      * Creates a new instance of ButtonBar.
115
      * Creates a new instance of ButtonBar.
109
      *
116
      *
110
-     * @param windowManager Window management
117
+     * @param controller        The controller to use to change window focus.
118
+     * @param windowFactory     The factory to use to retrieve window information.
119
+     * @param windowManager     The window manager to use to read window state.
120
+     * @param globalConfig      Global configuration to read settings from.
121
+     * @param mainFrameProvider The provider to use to retrieve the current main frame.
111
      */
122
      */
112
-    public ButtonBar(final WindowManager windowManager) {
123
+    @Inject
124
+    public ButtonBar(
125
+            final SwingController controller,
126
+            final SwingWindowFactory windowFactory,
127
+            @GlobalConfig final AggregateConfigProvider globalConfig,
128
+            final WindowManager windowManager,
129
+            final Provider<MainFrame> mainFrameProvider) {
130
+        this.windowFactory = windowFactory;
131
+        this.globalConfig = globalConfig;
113
         this.windowManager = windowManager;
132
         this.windowManager = windowManager;
133
+        this.mainFrameProvider = mainFrameProvider;
134
+
114
         scrollPane = new JScrollPane();
135
         scrollPane = new JScrollPane();
115
         scrollPane.setBorder(null);
136
         scrollPane.setBorder(null);
116
         scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
137
         scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
118
         scrollPane.setMinimumSize(new Dimension(0, BUTTON_HEIGHT
139
         scrollPane.setMinimumSize(new Dimension(0, BUTTON_HEIGHT
119
                 + ((int) PlatformDefaults.getUnitValueX("related")
140
                 + ((int) PlatformDefaults.getUnitValueX("related")
120
                 .getValue()) * 2));
141
                 .getValue()) * 2));
142
+
143
+        position = FramemanagerPosition.getPosition(
144
+                globalConfig.getOption("ui", "framemanagerPosition"));
145
+
146
+        if (position.isHorizontal()) {
147
+            buttonPanel = new ButtonPanel(controller,
148
+                    new MigLayout("ins rel, fill, flowx"), this);
149
+        } else {
150
+            buttonPanel = new ButtonPanel(controller,
151
+                    new MigLayout("ins rel, fill, flowy"), this);
152
+        }
153
+        scrollPane.getViewport().addMouseWheelListener(buttonPanel);
154
+        scrollPane.getViewport().add(buttonPanel);
155
+
156
+        buttons = Collections.synchronizedMap(new HashMap<Window, FrameToggleButton>());
157
+        sortChildWindows = globalConfig.getOptionBool("ui", "sortchildwindows");
158
+        sortRootWindows = globalConfig.getOptionBool("ui", "sortrootwindows");
159
+
160
+        globalConfig.addChangeListener("ui", "sortrootwindows", this);
161
+        globalConfig.addChangeListener("ui", "sortchildwindows", this);
121
     }
162
     }
122
 
163
 
123
     /**
164
     /**
156
                 ButtonBar.this.buttonWidth = position.isHorizontal()
197
                 ButtonBar.this.buttonWidth = position.isHorizontal()
157
                         ? 150 : (parent.getWidth() / NUM_CELLS);
198
                         ? 150 : (parent.getWidth() / NUM_CELLS);
158
                 initButtons(windowManager.getRootWindows());
199
                 initButtons(windowManager.getRootWindows());
159
-                if (controller.getMainFrame().getActiveFrame() != null) {
160
-                    selectionChanged(controller.getMainFrame()
161
-                            .getActiveFrame());
200
+
201
+                final TextFrame activeFrame = mainFrameProvider.get().getActiveFrame();
202
+                if (activeFrame != null) {
203
+                    selectionChanged(activeFrame);
162
                 }
204
                 }
163
                 parent.setVisible(true);
205
                 parent.setVisible(true);
164
             }
206
             }
209
         return null;
251
         return null;
210
     }
252
     }
211
 
253
 
212
-    @Override
213
-    public void setController(final SwingController controller) {
214
-        this.windowFactory = controller.getWindowFactory();
215
-        this.controller = controller;
216
-
217
-        position = FramemanagerPosition.getPosition(
218
-                controller.getGlobalConfig().getOption("ui",
219
-                        "framemanagerPosition"));
220
-
221
-        if (position.isHorizontal()) {
222
-            buttonPanel = new ButtonPanel(controller,
223
-                    new MigLayout("ins rel, fill, flowx"), this);
224
-        } else {
225
-            buttonPanel = new ButtonPanel(controller,
226
-                    new MigLayout("ins rel, fill, flowy"), this);
227
-        }
228
-        scrollPane.getViewport().addMouseWheelListener(buttonPanel);
229
-        scrollPane.getViewport().add(buttonPanel);
230
-
231
-        buttons = Collections.synchronizedMap(
232
-                new HashMap<Window, FrameToggleButton>());
233
-        sortChildWindows = controller.getGlobalConfig()
234
-                .getOptionBool("ui", "sortchildwindows");
235
-        sortRootWindows = controller.getGlobalConfig()
236
-                .getOptionBool("ui", "sortrootwindows");
237
-
238
-        controller.getGlobalConfig().addChangeListener("ui",
239
-                "sortrootwindows", this);
240
-        controller.getGlobalConfig().addChangeListener("ui",
241
-                "sortchildwindows", this);
242
-    }
243
-
244
     /**
254
     /**
245
      * Adds buttons for the collection of windows that is passed to it. This method also iterates
255
      * Adds buttons for the collection of windows that is passed to it. This method also iterates
246
      * through any children for each item in the collection.
256
      * through any children for each item in the collection.
363
         if (frame != null && frame.equals(activeWindow)) {
373
         if (frame != null && frame.equals(activeWindow)) {
364
             button.setSelected(true);
374
             button.setSelected(true);
365
         }
375
         }
366
-        controller.getMainFrame().setActiveFrame(frame);
376
+
377
+        mainFrameProvider.get().setActiveFrame(frame);
367
     }
378
     }
368
 
379
 
369
     /**
380
     /**
568
     public void configChanged(final String domain, final String key) {
579
     public void configChanged(final String domain, final String key) {
569
         switch (key) {
580
         switch (key) {
570
             case "sortrootwindows":
581
             case "sortrootwindows":
571
-                sortRootWindows = controller.getGlobalConfig()
572
-                        .getOptionBool("ui", "sortrootwindows");
582
+                sortRootWindows = globalConfig.getOptionBool("ui", "sortrootwindows");
573
                 break;
583
                 break;
574
             case "sortchildwindows":
584
             case "sortchildwindows":
575
-                sortChildWindows = controller.getGlobalConfig()
576
-                        .getOptionBool("ui", "sortrootwindows");
585
+                sortChildWindows = globalConfig.getOptionBool("ui", "sortrootwindows");
577
                 break;
586
                 break;
578
         }
587
         }
579
         relayout();
588
         relayout();

+ 48
- 0
src/com/dmdirc/addons/ui_swing/framemanager/buttonbar/ButtonBarProvider.java View File

1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.addons.ui_swing.framemanager.buttonbar;
24
+
25
+import com.dmdirc.addons.ui_swing.framemanager.FrameManager;
26
+import com.dmdirc.addons.ui_swing.framemanager.FrameManagerProvider;
27
+
28
+import javax.inject.Inject;
29
+import javax.inject.Provider;
30
+
31
+/**
32
+ * Provider for button bar frame managers.
33
+ */
34
+public class ButtonBarProvider implements FrameManagerProvider {
35
+
36
+    private final Provider<ButtonBar> provider;
37
+
38
+    @Inject
39
+    public ButtonBarProvider(final Provider<ButtonBar> provider) {
40
+        this.provider = provider;
41
+    }
42
+
43
+    @Override
44
+    public FrameManager getFrameManager() {
45
+        return provider.get();
46
+    }
47
+
48
+}

+ 48
- 33
src/com/dmdirc/addons/ui_swing/framemanager/tree/TreeFrameManager.java View File

22
 
22
 
23
 package com.dmdirc.addons.ui_swing.framemanager.tree;
23
 package com.dmdirc.addons.ui_swing.framemanager.tree;
24
 
24
 
25
+import com.dmdirc.ClientModule.GlobalConfig;
25
 import com.dmdirc.FrameContainer;
26
 import com.dmdirc.FrameContainer;
27
+import com.dmdirc.addons.ui_swing.MainFrame;
26
 import com.dmdirc.addons.ui_swing.SwingController;
28
 import com.dmdirc.addons.ui_swing.SwingController;
27
 import com.dmdirc.addons.ui_swing.UIUtilities;
29
 import com.dmdirc.addons.ui_swing.UIUtilities;
28
 import com.dmdirc.addons.ui_swing.components.TreeScroller;
30
 import com.dmdirc.addons.ui_swing.components.TreeScroller;
46
 import java.util.HashMap;
48
 import java.util.HashMap;
47
 import java.util.Map;
49
 import java.util.Map;
48
 
50
 
51
+import javax.inject.Inject;
52
+import javax.inject.Provider;
49
 import javax.swing.JComponent;
53
 import javax.swing.JComponent;
50
 import javax.swing.JScrollPane;
54
 import javax.swing.JScrollPane;
51
 import javax.swing.JTree;
55
 import javax.swing.JTree;
73
     /** node storage, used for adding and deleting nodes correctly. */
77
     /** node storage, used for adding and deleting nodes correctly. */
74
     private final Map<FrameContainer, TreeViewNode> nodes;
78
     private final Map<FrameContainer, TreeViewNode> nodes;
75
     /** UI Controller. */
79
     /** UI Controller. */
76
-    private SwingController controller;
80
+    private final SwingController controller;
77
     /** Tree scroller. */
81
     /** Tree scroller. */
78
     private TreeScroller scroller;
82
     private TreeScroller scroller;
79
     /** Configuration manager. */
83
     /** Configuration manager. */
80
-    private AggregateConfigProvider config;
84
+    private final AggregateConfigProvider config;
81
     /** Colour manager. */
85
     /** Colour manager. */
82
-    private ColourManager colourManager;
86
+    private final ColourManager colourManager;
83
     /** Window manage. */
87
     /** Window manage. */
84
     private final WindowManager windowManager;
88
     private final WindowManager windowManager;
89
+    /** Provider to use to retrieve the current main frame. */
90
+    private final Provider<MainFrame> mainFrameProvider;
85
 
91
 
86
     /**
92
     /**
87
      * Creates a new instance of the TreeFrameManager.
93
      * Creates a new instance of the TreeFrameManager.
88
      *
94
      *
89
-     * @param windowManager Window Management
95
+     * @param controller        The controller to use to switch windows.
96
+     * @param windowManager     The window manager to use to read window state.
97
+     * @param globalConfig      The provider to read config settings from.
98
+     * @param colourManager     The colour manager to use to retrieve colours.
99
+     * @param mainFrameProvider The provider to use to retrieve the current main frame.
90
      */
100
      */
91
-    public TreeFrameManager(final WindowManager windowManager) {
101
+    @Inject
102
+    public TreeFrameManager(
103
+            final SwingController controller,
104
+            final WindowManager windowManager,
105
+            @GlobalConfig final AggregateConfigProvider globalConfig,
106
+            final ColourManager colourManager,
107
+            final Provider<MainFrame> mainFrameProvider) {
92
         this.windowManager = windowManager;
108
         this.windowManager = windowManager;
93
         nodes = new HashMap<>();
109
         nodes = new HashMap<>();
110
+
111
+        this.controller = controller;
112
+        this.config = globalConfig;
113
+        this.colourManager = colourManager;
114
+
115
+        UIUtilities.invokeLater(new Runnable() {
116
+            @Override
117
+            public void run() {
118
+                model = new TreeViewModel(config, new TreeViewNode(null, null));
119
+                tree = new Tree(TreeFrameManager.this, model,
120
+                        TreeFrameManager.this.controller);
121
+                tree.setCellRenderer(new TreeViewTreeCellRenderer(config, colourManager,
122
+                        TreeFrameManager.this));
123
+                tree.setVisible(true);
124
+
125
+                config.addChangeListener("treeview", TreeFrameManager.this);
126
+                config.addChangeListener("ui", "sortrootwindows", TreeFrameManager.this);
127
+                config.addChangeListener("ui", "sortchildwindows", TreeFrameManager.this);
128
+                config.addChangeListener("ui", "backgroundcolour", TreeFrameManager.this);
129
+                config.addChangeListener("ui", "foregroundcolour", TreeFrameManager.this);
130
+            }
131
+        });
132
+        this.mainFrameProvider = mainFrameProvider;
94
     }
133
     }
95
 
134
 
96
     @Override
135
     @Override
127
         });
166
         });
128
     }
167
     }
129
 
168
 
130
-    @Override
131
-    public void setController(final SwingController controller) {
132
-        this.controller = controller;
133
-        this.config = controller.getGlobalConfig();
134
-        this.colourManager = controller.getColourManager();
135
-
136
-        UIUtilities.invokeLater(new Runnable() {
137
-            @Override
138
-            public void run() {
139
-                model = new TreeViewModel(config, new TreeViewNode(null, null));
140
-                tree = new Tree(TreeFrameManager.this, model,
141
-                        TreeFrameManager.this.controller);
142
-                tree.setCellRenderer(new TreeViewTreeCellRenderer(config, colourManager,
143
-                        TreeFrameManager.this));
144
-                tree.setVisible(true);
145
-
146
-                config.addChangeListener("treeview", TreeFrameManager.this);
147
-                config.addChangeListener("ui", "sortrootwindows", TreeFrameManager.this);
148
-                config.addChangeListener("ui", "sortchildwindows", TreeFrameManager.this);
149
-                config.addChangeListener("ui", "backgroundcolour", TreeFrameManager.this);
150
-                config.addChangeListener("ui", "foregroundcolour", TreeFrameManager.this);
151
-            }
152
-        });
153
-    }
154
-
155
     @Override
169
     @Override
156
     public void windowAdded(final TextFrame parent, final TextFrame window) {
170
     public void windowAdded(final TextFrame parent, final TextFrame window) {
157
         if (nodes.containsKey(window.getContainer())) {
171
         if (nodes.containsKey(window.getContainer())) {
310
                         addWindow(nodes.get(window), childWindow);
324
                         addWindow(nodes.get(window), childWindow);
311
                     }
325
                     }
312
                 }
326
                 }
313
-                if (controller.getMainFrame() != null
314
-                        && controller.getMainFrame().getActiveFrame() != null) {
315
-                    selectionChanged(controller.getMainFrame().getActiveFrame());
327
+
328
+                final MainFrame mainFrame = mainFrameProvider.get();
329
+                if (mainFrame != null && mainFrame.getActiveFrame() != null) {
330
+                    selectionChanged(mainFrame.getActiveFrame());
316
                 }
331
                 }
317
             }
332
             }
318
         });
333
         });

+ 48
- 0
src/com/dmdirc/addons/ui_swing/framemanager/tree/TreeFrameManagerProvider.java View File

1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.addons.ui_swing.framemanager.tree;
24
+
25
+import com.dmdirc.addons.ui_swing.framemanager.FrameManager;
26
+import com.dmdirc.addons.ui_swing.framemanager.FrameManagerProvider;
27
+
28
+import javax.inject.Inject;
29
+import javax.inject.Provider;
30
+
31
+/**
32
+ * Provider for tree frame managers.
33
+ */
34
+public class TreeFrameManagerProvider implements FrameManagerProvider {
35
+
36
+    private final Provider<TreeFrameManager> provider;
37
+
38
+    @Inject
39
+    public TreeFrameManagerProvider(final Provider<TreeFrameManager> provider) {
40
+        this.provider = provider;
41
+    }
42
+
43
+    @Override
44
+    public FrameManager getFrameManager() {
45
+        return provider.get();
46
+    }
47
+
48
+}

+ 22
- 0
src/com/dmdirc/addons/ui_swing/injection/SwingModule.java View File

48
 import com.dmdirc.addons.ui_swing.components.statusbar.UpdaterLabel;
48
 import com.dmdirc.addons.ui_swing.components.statusbar.UpdaterLabel;
49
 import com.dmdirc.addons.ui_swing.dialogs.prefs.URLConfigPanel;
49
 import com.dmdirc.addons.ui_swing.dialogs.prefs.URLConfigPanel;
50
 import com.dmdirc.addons.ui_swing.dialogs.prefs.UpdateConfigPanel;
50
 import com.dmdirc.addons.ui_swing.dialogs.prefs.UpdateConfigPanel;
51
+import com.dmdirc.addons.ui_swing.framemanager.FrameManager;
52
+import com.dmdirc.addons.ui_swing.framemanager.FrameManagerProvider;
53
+import com.dmdirc.addons.ui_swing.framemanager.tree.TreeFrameManagerProvider;
51
 import com.dmdirc.config.prefs.PreferencesDialogModel;
54
 import com.dmdirc.config.prefs.PreferencesDialogModel;
52
 import com.dmdirc.interfaces.LifecycleController;
55
 import com.dmdirc.interfaces.LifecycleController;
53
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
56
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
54
 import com.dmdirc.interfaces.config.ConfigProvider;
57
 import com.dmdirc.interfaces.config.ConfigProvider;
55
 import com.dmdirc.plugins.PluginDomain;
58
 import com.dmdirc.plugins.PluginDomain;
56
 import com.dmdirc.plugins.PluginManager;
59
 import com.dmdirc.plugins.PluginManager;
60
+import com.dmdirc.plugins.ServiceLocator;
57
 import com.dmdirc.ui.IconManager;
61
 import com.dmdirc.ui.IconManager;
58
 import com.dmdirc.ui.WindowManager;
62
 import com.dmdirc.ui.WindowManager;
59
 import com.dmdirc.ui.core.components.StatusBarManager;
63
 import com.dmdirc.ui.core.components.StatusBarManager;
118
             final Provider<QuitWorker> quitWorker,
122
             final Provider<QuitWorker> quitWorker,
119
             final URLBuilder urlBuilder,
123
             final URLBuilder urlBuilder,
120
             final WindowManager windowManager,
124
             final WindowManager windowManager,
125
+            final Provider<FrameManager> frameManagerProvider,
121
             final EventBus eventBus) {
126
             final EventBus eventBus) {
122
         return UIUtilities.invokeAndWait(new Callable<MainFrame>() {
127
         return UIUtilities.invokeAndWait(new Callable<MainFrame>() {
123
 
128
 
132
                         quitWorker,
137
                         quitWorker,
133
                         new IconManager(globalConfig, urlBuilder),
138
                         new IconManager(globalConfig, urlBuilder),
134
                         windowManager,
139
                         windowManager,
140
+                        frameManagerProvider,
135
                         eventBus);
141
                         eventBus);
136
             }
142
             }
137
         });
143
         });
176
                 configManager, identity, actionManager, pluginManager);
182
                 configManager, identity, actionManager, pluginManager);
177
     }
183
     }
178
 
184
 
185
+    @Provides
186
+    public FrameManager getFrameManager(
187
+            @GlobalConfig final AggregateConfigProvider globalConfig,
188
+            final TreeFrameManagerProvider fallbackProvider,
189
+            final ServiceLocator locator) {
190
+        final String manager = globalConfig.getOption("ui", "framemanager");
191
+
192
+        FrameManagerProvider provider = locator.getService(FrameManagerProvider.class, manager);
193
+        if (provider == null) {
194
+            // Couldn't find the user's selected provider - let's just use the fallback.
195
+            provider = fallbackProvider;
196
+        }
197
+
198
+        return provider.getFrameManager();
199
+    }
200
+
179
 }
201
 }

Loading…
Cancel
Save