File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/main/java/org/scijava/ui/swing/options Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 4545import org .scijava .plugin .Menu ;
4646import org .scijava .plugin .Parameter ;
4747import org .scijava .plugin .Plugin ;
48+ import org .scijava .ui .UIService ;
4849import org .scijava .ui .UserInterface ;
4950import org .scijava .ui .swing .SwingApplicationFrame ;
5051
@@ -67,7 +68,7 @@ public class OptionsLookAndFeel extends OptionsPlugin {
6768 // -- Parameters --
6869
6970 @ Parameter
70- private UserInterface ui ;
71+ private UIService uiService ;
7172
7273 @ Parameter
7374 private LogService log ;
@@ -101,6 +102,7 @@ public void run() {
101102 @ Override
102103 public void run () {
103104 // FIXME: Get all windows from UIService rather than just app.
105+ final UserInterface ui = uiService .getDefaultUI ();
104106 final SwingApplicationFrame swingAppFrame =
105107 (SwingApplicationFrame ) ui .getApplicationFrame ();
106108 SwingUtilities .updateComponentTreeUI (swingAppFrame );
@@ -151,11 +153,11 @@ protected void initLookAndFeel() {
151153
152154 @ Deprecated
153155 public UserInterface getUI () {
154- return ui ;
156+ return uiService . getDefaultUI () ;
155157 }
156158
157159 @ Deprecated
158- public void setUI (final UserInterface ui ) {
159- this . ui = ui ;
160+ public void setUI (@ SuppressWarnings ( "unused" ) final UserInterface ui ) {
161+ throw new UnsupportedOperationException () ;
160162 }
161163}
You can’t perform that action at this time.
0 commit comments