JAL-1683 replace year/version strings with tokens in source
[jalview.git] / src / jalview / bin / Jalview.java
index 50e3559..5bb5e98 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -50,6 +50,7 @@ import java.util.Map;
 import java.util.Vector;
 
 import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
 
 /**
  * Main class for Jalview Application <br>
@@ -92,12 +93,23 @@ public class Jalview
     System.out.println(System.getProperty("os.arch") + " "
             + System.getProperty("os.name") + " "
             + System.getProperty("os.version"));
-    if (new Platform().isAMac())
-    {
-      System.setProperty("com.apple.mrj.application.apple.menu.about.name",
-              "Jalview");
-      System.setProperty("apple.laf.useScreenMenuBar", "true");
-    }
+    // if (new Platform().isAMac())
+    // {
+    // // System.setProperty("com.apple.mrj.application.apple.menu.about.name",
+    // // "Jalview");
+    // // System.setProperty("apple.laf.useScreenMenuBar", "true");
+    // try
+    // {
+    // UIManager.setLookAndFeel(ch.randelshofer.quaqua.QuaquaManager
+    // .getLookAndFeel());
+    // System.out
+    // .println("--------------------------------------------> in here");
+    // } catch (UnsupportedLookAndFeelException e)
+    // {
+    // // TODO Auto-generated catch block
+    // e.printStackTrace();
+    // }
+    // }
 
     ArgsParser aparser = new ArgsParser(args);
     boolean headless = false;
@@ -173,6 +185,21 @@ public class Jalview
     } catch (Exception ex)
     {
     }
+    if (new Platform().isAMac())
+    {
+      System.setProperty("com.apple.mrj.application.apple.menu.about.name",
+              "Jalview");
+      System.setProperty("apple.laf.useScreenMenuBar", "true");
+      try
+      {
+        UIManager.setLookAndFeel(ch.randelshofer.quaqua.QuaquaManager
+                .getLookAndFeel());
+      } catch (UnsupportedLookAndFeelException e)
+      {
+        // TODO Auto-generated catch block
+        e.printStackTrace();
+      }
+    }
 
     if (!headless)
     {