only recalc group conservation after last sequence operated on in a bulk add/remove...
[jalview.git] / src / jalview / gui / Desktop.java
index 300fcc2..d6ab3ae 100644 (file)
@@ -80,8 +80,10 @@ import javax.swing.JPanel;
 import javax.swing.JPopupMenu;
 import javax.swing.JProgressBar;
 import javax.swing.SwingUtilities;
+import javax.swing.event.HyperlinkEvent;
 import javax.swing.event.MenuEvent;
 import javax.swing.event.MenuListener;
+import javax.swing.event.HyperlinkEvent.EventType;
 
 /**
  * Jalview Desktop
@@ -1060,10 +1062,11 @@ public class Desktop extends jalview.jbgui.GDesktop implements
    */
   public void aboutMenuItem_actionPerformed(ActionEvent e)
   {
-    StringBuffer message = getAboutMessage(false);
-    JOptionPane.showInternalMessageDialog(Desktop.desktop,
-
-    message.toString(), "About Jalview", JOptionPane.INFORMATION_MESSAGE);
+//    StringBuffer message = getAboutMessage(false);
+//    JOptionPane.showInternalMessageDialog(Desktop.desktop,
+//
+//    message.toString(), "About Jalview", JOptionPane.INFORMATION_MESSAGE);
+    new Thread(new Runnable() { public void run() {new SplashScreen(true);}}).start();
   }
 
   public StringBuffer getAboutMessage(boolean shortv)
@@ -1072,7 +1075,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     message.append("<html>");
     if (shortv)
     {
-      message.append("<h1><strong>Jalview "
+      message.append("<h1><strong>Version: "
               + jalview.bin.Cache.getProperty("VERSION")
               + "</strong></h1><br>");
       message.append("<strong>Last Updated: <em>"
@@ -1083,7 +1086,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     else
     {
 
-      message.append("<strong>Jalview version "
+      message.append("<strong>Version "
               + jalview.bin.Cache.getProperty("VERSION")
               + "; last updated: "
               + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown"));
@@ -1107,7 +1110,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
         message.append("<div style=\"color: #FF0000;font-style: bold;\">");
       }
 
-      message.append("<br>!! Jalview version "
+      message.append("<br>!! Version "
               + jalview.bin.Cache.getDefault("LATEST_VERSION",
                       "..Checking..")
               + " is available for download from "
@@ -1124,7 +1127,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
                             "AUTHORNAMES",
                             "Jim Procter, Andrew Waterhouse, Jan Engelhardt, Lauren Lui, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton")
             + "<br>Development managed by The Barton Group, University of Dundee, Scotland, UK.<br>"
-            + "<br>For help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list"
+            + "<br>For help, see the FAQ at <a href=\"http://www.jalview.org\">www.jalview.org</a> and/or join the jalview-discuss@jalview.org mailing list"
             + "<br>If  you use Jalview, please cite:"
             + "<br>Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)"
             + "<br>Jalview Version 2 - a multiple sequence alignment editor and analysis workbench"
@@ -2328,6 +2331,20 @@ public class Desktop extends jalview.jbgui.GDesktop implements
   }
 
   /**
+   * 
+   * @return true if any progress bars are still active
+   */
+  @Override
+  public boolean operationInProgress()
+  {
+    if (progressBars != null && progressBars.size() > 0)
+    {
+      return true;
+    }
+    return false;
+  }
+
+  /**
    * This will return the first AlignFrame viewing AlignViewport av. It will
    * break if there are more than one AlignFrames viewing a particular av. This
    * 
@@ -2560,5 +2577,33 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     return wsparamManager;
   }
 
+  /**
+   * static hyperlink handler proxy method for use by Jalview's internal windows 
+   * @param e
+   */
+  public static void hyperlinkUpdate(HyperlinkEvent e)
+  {
+    if (e.getEventType() == EventType.ACTIVATED)
+    {
+      String url=null;
+      try
+      {
+        url = e.getURL().toString();
+        Desktop.showUrl(url);
+      } catch (Exception x)
+      {
+        if (url!=null) { 
+          if (Cache.log!=null) { 
+            Cache.log.error("Couldn't handle string "+url+" as a URL.");
+          } else {
+            System.err.println("Couldn't handle string "+url+" as a URL.");
+          }
+        }
+        // ignore any exceptions due to dud links.
+      }
+
+    }    
+  }
+
 
 }