From: jprocter Date: Wed, 9 Jun 2010 12:07:58 +0000 (+0000) Subject: OSX look and feel JAL-577 X-Git-Tag: Release_2_5_1~18 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b818036f372ce85ffe9434d1820679698750a031;p=jalview.git OSX look and feel JAL-577 --- diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index b36ac18..833f5c3 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -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
@@ -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();