JAL-3253 preliminary static fixes for JavaScript
[jalview.git] / src / jalview / gui / WsPreferences.java
index 850ef21..9966c02 100644 (file)
@@ -454,7 +454,7 @@ public class WsPreferences extends GWsPreferences
     boolean valid = false;
     int resp = JvOptionPane.CANCEL_OPTION;
     while (!valid && (resp = JvOptionPane.showInternalConfirmDialog(
-            Desktop.desktop, panel, title,
+            Desktop.getDesktopPane(), panel, title,
             JvOptionPane.OK_CANCEL_OPTION)) == JvOptionPane.OK_OPTION)
     {
       try
@@ -472,13 +472,13 @@ public class WsPreferences extends GWsPreferences
       } catch (Exception e)
       {
         valid = false;
-        JvOptionPane.showInternalMessageDialog(Desktop.desktop,
+        JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(),
                 MessageManager.getString("label.invalid_url"));
       }
     }
     if (valid && resp == JvOptionPane.OK_OPTION)
     {
-      int validate = JvOptionPane.showInternalConfirmDialog(Desktop.desktop,
+      int validate = JvOptionPane.showInternalConfirmDialog(Desktop.getDesktopPane(),
               MessageManager.getString("info.validate_jabaws_server"),
               MessageManager.getString("label.test_server"),
               JvOptionPane.YES_NO_OPTION);
@@ -491,7 +491,7 @@ public class WsPreferences extends GWsPreferences
         }
         else
         {
-          int opt = JvOptionPane.showInternalOptionDialog(Desktop.desktop,
+          int opt = JvOptionPane.showInternalOptionDialog(Desktop.getDesktopPane(),
                   "The Server  '" + foo.toString()
                           + "' failed validation,\ndo you want to add it anyway? ",
                   "Server Validation Failed", JvOptionPane.YES_NO_OPTION,
@@ -502,7 +502,7 @@ public class WsPreferences extends GWsPreferences
           }
           else
           {
-            JvOptionPane.showInternalMessageDialog(Desktop.desktop,
+            JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(),
                     MessageManager.getString(
                             "warn.server_didnt_pass_validation"));
           }
@@ -595,7 +595,7 @@ public class WsPreferences extends GWsPreferences
           if (lastrefresh != update)
           {
             lastrefresh = update;
-            Desktop.instance.startServiceDiscovery(true); // wait around for all
+            Desktop.getInstance().startServiceDiscovery(true); // wait around for all
                                                           // threads to complete
             updateList();
 
@@ -616,15 +616,15 @@ public class WsPreferences extends GWsPreferences
         public void run()
         {
           long ct = System.currentTimeMillis();
-          Desktop.instance.setProgressBar(MessageManager
+          Desktop.getInstance().setProgressBar(MessageManager
                   .getString("status.refreshing_web_service_menus"), ct);
           if (lastrefresh != update)
           {
             lastrefresh = update;
-            Desktop.instance.startServiceDiscovery(true);
+            Desktop.getInstance().startServiceDiscovery(true);
             updateList();
           }
-          Desktop.instance.setProgressBar(null, ct);
+          Desktop.getInstance().setProgressBar(null, ct);
         }
 
       }).start();