From b818036f372ce85ffe9434d1820679698750a031 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 9 Jun 2010 12:07:58 +0000 Subject: [PATCH] OSX look and feel JAL-577 --- src/jalview/bin/Jalview.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) 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(); -- 1.7.10.2