X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=6a59093047939cc74d559162723d223133918ca2;hb=c13784724ba3826e6cc3faeb85571cf30776592d;hp=b36ac18329af93261cf29e793416939934bdcf93;hpb=d423f22792e47dbc800ae220a58677f988971d06;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index b36ac18..6a59093 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; @@ -89,6 +94,7 @@ public class Jalview .println("Usage: jalview -open [FILE] [OUTPUT_FORMAT] [OUTPUT_FILE]\n\n" + "-nodisplay\tRun Jalview without User Interface.\n" + "-props FILE\tUse the given Jalview properties file instead of users default.\n" + + "-colour COLOURSCHEME\tThe colourscheme to be applied to the alignment\n" + "-annotations FILE\tAdd precalculated annotations to the alignment.\n" + "-tree FILE\tLoad the given newick format tree file onto the alignment\n" + "-features FILE\tUse the given file to mark features on the alignment.\n" @@ -165,22 +171,17 @@ 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(); + desktop.setInBatchMode(true); // indicate we are starting up desktop.setVisible(true); - desktop.discoverer.start(); + desktop.startServiceDiscovery(); if (!aparser.contains("nousagestats")) { startUsageStats(desktop); @@ -411,7 +412,7 @@ public class Jalview ex.printStackTrace(System.err); } } - // todo - load PDB structure to alignment + // TODO - load PDB structure(s) to alignment JAL-629 // (associate with identical sequence in alignment, or a specified // sequence) @@ -536,7 +537,7 @@ public class Jalview startFeatureFetching(getFeatures); } } - // execute a groovy script. + // Once all other stuff is done, execute any groovy scripts (in order) if (groovyscript != null) { if (jalview.bin.Cache.groovyJarsPresent()) @@ -551,8 +552,11 @@ public class Jalview + groovyscript); } } - - // Once all other stuff is done, execute any groovy scripts (in order) + // and finally, turn off batch mode indicator - if the desktop still exists + if (desktop!=null) + { + desktop.setInBatchMode(false); + } } private static void startUsageStats(final Desktop desktop)