OSX look and feel JAL-577
authorjprocter <Jim Procter>
Wed, 9 Jun 2010 12:07:58 +0000 (12:07 +0000)
committerjprocter <Jim Procter>
Wed, 9 Jun 2010 12:07:58 +0000 (12:07 +0000)
src/jalview/bin/Jalview.java

index b36ac18..833f5c3 100755 (executable)
@@ -36,7 +36,7 @@ import java.util.*;
 import javax.swing.*;
 
 import jalview.gui.*;
-import jalview.io.AppletFormatAdapter;
+import jalview.util.Platform;
 
 /**
  * Main class for Jalview Application <br>
@@ -79,6 +79,11 @@ 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");
+    }
 
     ArgsParser aparser = new ArgsParser(args);
     boolean headless = false;
@@ -162,20 +167,14 @@ public class Jalview
     }
 
     Desktop desktop = null;
-
+    
     try
     {
-      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()
-      // UIManager.getCrossPlatformLookAndFeelClassName()
-              // "com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
-              // "javax.swing.plaf.metal.MetalLookAndFeel"
-              // "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"
-              // "com.sun.java.swing.plaf.motif.MotifLookAndFeel"
-
-              );
+      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
     } catch (Exception ex)
     {
     }
+
     if (!headless)
     {
       desktop = new Desktop();