From b1deb68e5a9d3540dac61da787ee810a80e24630 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 9 Jun 2010 12:07:57 +0000 Subject: [PATCH] OSX look and feel JAL-577 --- src/jalview/bin/Jalview.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 2c68662..64ffd38 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; @@ -165,17 +170,11 @@ public class Jalview 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