java 1.1 compatibility
[jalview.git] / src / jalview / gui / Desktop.java
index cdb18e7..ed968f8 100755 (executable)
@@ -64,6 +64,11 @@ public class Desktop
    */
   public Desktop()
   {
+    /**
+     * A note to implementors. It is ESSENTIAL that any 
+     * activities that might block are spawned off as threads rather 
+     * than waited for during this constructor.
+     */
     instance = this;
     doVamsasClientCheck();
     doGroovyCheck();
@@ -121,10 +126,9 @@ public class Desktop
 
 
     this.setDropTarget(new java.awt.dnd.DropTarget(desktop, this));
+    // Spawn a thread that shows the splashscreen
+    new SplashScreen();     
 
-    /////////Add a splashscreen on startup
-    /////////Add a splashscreen on startup
-    new SplashScreen();
 
 
     discoverer = new jalview.ws.Discoverer(); // Only gets started if gui is displayed.
@@ -1217,7 +1221,8 @@ public class Desktop
   public void checkForQuestionnaire(String url)
   {
     UserQuestionnaireCheck jvq = new UserQuestionnaireCheck(url);
-    javax.swing.SwingUtilities.invokeLater(jvq);
+    //javax.swing.SwingUtilities.invokeLater(jvq);
+    new Thread(jvq).start();
   }
   /**
    * Proxy class for JDesktopPane which optionally 
@@ -1225,7 +1230,7 @@ public class Desktop
    * the desktop area with a red bar if free memory runs low.
    * @author AMW
    */
-  class  MyDesktopPane extends JDesktopPane implements Runnable
+  public class  MyDesktopPane extends JDesktopPane implements Runnable
   {
     
     boolean showMemoryUsage = false;
@@ -1248,7 +1253,10 @@ public class Desktop
         worker.start();
       }
     }
-
+    public boolean isShowMemoryUsage()
+    {
+      return showMemoryUsage;
+    }
     public void run()
     {
       df = java.text.NumberFormat.getNumberInstance();