X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=28d029c1ac68d23c33fc0d31bd7d62f279c7e2a5;hb=7d52ef194d39e75fed7730041da25c48e456cf8c;hp=d9de4692f1a0ca23eab66edb1d3fa50c584c77c0;hpb=1cec732f963ab102c9d8381203df8c8cba2a9ee4;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index d9de469..28d029c 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -83,9 +83,6 @@ import java.util.HashMap; import java.util.Hashtable; import java.util.Map; import java.util.Vector; -import java.util.logging.ConsoleHandler; -import java.util.logging.Level; -import java.util.logging.Logger; import javax.swing.LookAndFeel; import javax.swing.UIManager; @@ -148,6 +145,8 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi private boolean noCalculation, noMenuBar, noStatus; + private boolean noAnnotation; + public boolean getStartCalculations() { return !noCalculation; @@ -163,6 +162,10 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi return !noStatus; } + public boolean getShowAnnotation() + { + return !noAnnotation; + } public static AlignFrame getCurrentAlignFrame() { @@ -269,51 +272,12 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi */ public static void main(String[] args) { - // setLogging(); // BH - for event debugging in JavaScript + // Platform.startJavaLogging(); getInstance().doMain(args); } - private static void logClass(String name) - { - // BH - for event debugging in JavaScript - ConsoleHandler consoleHandler = new ConsoleHandler(); - consoleHandler.setLevel(Level.ALL); - Logger logger = Logger.getLogger(name); - logger.setLevel(Level.ALL); - logger.addHandler(consoleHandler); - } - @SuppressWarnings("unused") - private static void setLogging() - { - - /** - * @j2sIgnore - * - */ - { - System.out.println("not in js"); - } - - // BH - for event debugging in JavaScript (Java mode only) - if (!Platform.isJS()) - /** - * Java only - * - * @j2sIgnore - */ - { - Logger.getLogger("").setLevel(Level.ALL); - logClass("java.awt.EventDispatchThread"); - logClass("java.awt.EventQueue"); - logClass("java.awt.Component"); - logClass("java.awt.focus.Component"); - logClass("java.awt.focus.DefaultKeyboardFocusManager"); - } - - } - /** * @param args */ @@ -321,7 +285,11 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi { boolean isJS = Platform.isJS(); - if (!isJS) + if (isJS) + { + Platform.setAppClass(this); + } + else { System.setSecurityManager(null); } @@ -692,6 +660,12 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi System.out.println("CMD [nostatus] executed successfully!"); } + if (aparser.contains(ArgsParser.NOANNOTATION) + || aparser.contains(ArgsParser.NOANNOTATION2)) + { + noAnnotation = true; + System.out.println("CMD no-annotation executed successfully!"); + } if (aparser.contains(ArgsParser.NOCALCULATION)) { noCalculation = true; @@ -792,18 +766,30 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi System.out.println("CMD [-sortbytree] executed successfully!"); } } - + boolean doUpdateAnnotation = false; - - if (aparser.contains(ArgsParser.NOANNOTATION) - || aparser.contains(ArgsParser.NOANNOTATION2)) + /** + * we do this earlier in JalviewJS because of a complication with + * SHOWOVERVIEW + * + * For now, just fixing this in JalviewJS. + * + * + * @j2sIgnore + * + */ { - af.getViewport().setShowAnnotation(false); - if (!af.getViewport().isShowAnnotation()) + if (aparser.contains(ArgsParser.NOANNOTATION) + || aparser.contains(ArgsParser.NOANNOTATION2)) { - doUpdateAnnotation = true; - System.out.println("CMD no-annotation executed successfully!"); + af.getViewport().setShowAnnotation(false); + if (!af.getViewport().isShowAnnotation()) + { + doUpdateAnnotation = true; + System.out + .println("CMD no-annotation executed successfully!"); + } } } if (aparser.contains(ArgsParser.NOSORTBYTREE)) @@ -2058,5 +2044,11 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi } + @Override + public void showOverview() + { + currentAlignFrame.overviewMenuItem_actionPerformed(null); + } } +