Kaynağa Gözat

Merge pull request #305 from greboid/dev4

Remove getLookAndFeel method from SwingController.
pull/306/head
Chris Smith 9 yıl önce
ebeveyn
işleme
fbd968c211

+ 0
- 11
ui_swing/src/com/dmdirc/addons/ui_swing/SwingController.java Dosyayı Görüntüle

@@ -36,8 +36,6 @@ import com.dmdirc.plugins.implementations.BaseCommandPlugin;
36 36
 
37 37
 import java.awt.GraphicsEnvironment;
38 38
 
39
-import javax.swing.UIManager;
40
-
41 39
 import dagger.ObjectGraph;
42 40
 
43 41
 /**
@@ -82,15 +80,6 @@ public class SwingController extends BaseCommandPlugin implements UIController {
82 80
         super.onUnload();
83 81
     }
84 82
 
85
-    /**
86
-     * Returns the current look and feel.
87
-     *
88
-     * @return Current look and feel
89
-     */
90
-    public static String getLookAndFeel() {
91
-        return UIManager.getLookAndFeel().getName();
92
-    }
93
-
94 83
     /**
95 84
      * Returns an instance of SwingController. This method is exported for use in other plugins.
96 85
      *

+ 2
- 4
ui_swing/src/com/dmdirc/addons/ui_swing/dialogs/about/AboutDialog.java Dosyayı Görüntüle

@@ -40,6 +40,7 @@ import java.awt.Window;
40 40
 import javax.inject.Inject;
41 41
 import javax.swing.JButton;
42 42
 import javax.swing.JTabbedPane;
43
+import javax.swing.UIManager;
43 44
 import javax.swing.WindowConstants;
44 45
 
45 46
 import net.miginfocom.layout.LayoutUtil;
@@ -55,7 +56,6 @@ public class AboutDialog extends StandardDialog {
55 56
     private static final long serialVersionUID = 5;
56 57
     private final URLHandler urlHandler;
57 58
     private final AboutDialogModel model;
58
-    private final SwingController controller;
59 59
     private final DMDircMBassador eventBus;
60 60
     private final AggregateConfigProvider config;
61 61
     private final PluginInfo pluginInfo;
@@ -67,12 +67,10 @@ public class AboutDialog extends StandardDialog {
67 67
             final AboutDialogModel model,
68 68
             final URLHandler urlHandler,
69 69
             final DMDircMBassador eventBus,
70
-            final SwingController controller,
71 70
             @PluginDomain(SwingController.class) final PluginInfo pluginInfo) {
72 71
         super(parentWindow, ModalityType.MODELESS);
73 72
         this.urlHandler = urlHandler;
74 73
         this.model = model;
75
-        this.controller = controller;
76 74
         this.eventBus = eventBus;
77 75
         this.config = config;
78 76
         this.pluginInfo = pluginInfo;
@@ -110,7 +108,7 @@ public class AboutDialog extends StandardDialog {
110 108
     public void handleInfoRequest(final ClientInfoRequestEvent event) {
111 109
         event.addInfoItem(InfoItem.create("Swing UI Version",
112 110
                         pluginInfo.getMetaData().getVersion().toString()),
113
-                InfoItem.create("Look and Feel", SwingController.getLookAndFeel()),
111
+                InfoItem.create("Look and Feel", UIManager.getLookAndFeel().getName()),
114 112
                 InfoItem.create("MiG Layout Version", LayoutUtil.getVersion())
115 113
         );
116 114
     }

Loading…
İptal
Kaydet