X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=f59c37f16cae5d38c3848d231c4e168a08e9f57c;hb=4dd96dd41cb37178a6dc0298ce08c8bfcdfab715;hp=060d6ad91de0ed04babf071c0f44089b05b0586b;hpb=7a5cac232c59bba9964ec32ecdd787b8028cde48;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 060d6ad..f59c37f 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -20,6 +20,7 @@ */ package jalview.bin; +import jalview.api.AlignCalcWorkerI; import jalview.api.AlignFrameI; import jalview.api.AlignViewportI; import jalview.api.JalviewApp; @@ -304,6 +305,15 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi String usrPropsFile = aparser.getValue(ArgsParser.PROPS); Cache.loadProperties(usrPropsFile); + + if (aparser.contains(ArgsParser.NODISPLAY) + || aparser.contains(ArgsParser.NOGUI) + || aparser.contains(ArgsParser.HEADLESS) + || "true".equals(System.getProperty("java.awt.headless"))) + { + headless = true; + } + if (isJS) { isJavaAppletTag = aparser.isApplet(); @@ -335,13 +345,7 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi showUsage(); System.exit(0); } - if (aparser.contains(ArgsParser.NODISPLAY) - || aparser.contains(ArgsParser.NOGUI) - || aparser.contains(ArgsParser.HEADLESS) - || "true".equals(System.getProperty("java.awt.headless"))) - { - headless = true; - } + // anything else! @@ -397,7 +401,13 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + if (!isJS && Platform.isWin()) + { + UIManager.setLookAndFeel( + headless ? "javax.swing.plaf.metal.MetalLookAndFeel" + : UIManager.getSystemLookAndFeelClassName()); +// UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } } catch (Exception ex) { System.err.println("Unexpected Look and Feel Exception"); @@ -640,14 +650,6 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi // TODO ? } - if (aparser.contains(ArgsParser.SHOWOVERVIEW)) - { - jalview.bin.Cache.setPropertyNoSave(Preferences.SHOW_OVERVIEW, - "true"); - - System.out.println("CMD [showoverview] executed successfully!"); - } - if (aparser.contains(ArgsParser.NOMENUBAR)) { noMenuBar = true; @@ -757,6 +759,13 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi System.out.println( "CMD [-annotations " + data + "] executed successfully!"); } + + if (aparser.contains(ArgsParser.SHOWOVERVIEW)) + { + af.overviewMenuItem_actionPerformed(null); + System.out.println("CMD [showoverview] executed successfully!"); + } + // set or clear the sortbytree flag. if (aparser.contains(ArgsParser.SORTBYTREE)) { @@ -849,11 +858,11 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi + "] executed successfully!"); groovyscript = null; } - checkOutputFile(aparser, af, format); - while (aparser.getSize() > 0) - { - System.out.println("Unknown arg: " + aparser.nextValue()); - } + } + checkOutputFile(aparser, af, format); + while (aparser.getSize() > 0) + { + System.out.println("Unknown arg: " + aparser.nextValue()); } } } @@ -1043,6 +1052,8 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi // biojsmsa filename String outputFormat = aparser.nextValue(); String file = aparser.nextValue(); + System.out.println("format " + outputFormat); + if (outputFormat.equalsIgnoreCase("png")) { af.createPNG(new File(file)); @@ -2044,6 +2055,17 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi } + @Override + public void showOverview() + { + currentAlignFrame.overviewMenuItem_actionPerformed(null); + } + + public void notifyWorker(AlignCalcWorkerI worker, String status) + { + // System.out.println("Jalview worker " + worker.getClass().getSimpleName() + // + " " + status); + } }