X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=e98ea638a5b8d0cc0844d8beca81dcd1612c6d79;hb=564c47bdd60cf84046269e45d2f85f39408e4441;hp=98dc0399a5d420471d75fc4d7ae311cc3e75e554;hpb=b93f8af382bb2fbdb0c974558bcef57750d1bdd6;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 98dc039..e98ea63 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -20,6 +20,34 @@ */ package jalview.bin; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.security.AllPermission; +import java.security.CodeSource; +import java.security.PermissionCollection; +import java.security.Permissions; +import java.security.Policy; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.Map; +import java.util.Vector; + +import javax.swing.LookAndFeel; +import javax.swing.UIManager; + +import com.threerings.getdown.util.LaunchUtil; + +import groovy.lang.Binding; +import groovy.util.GroovyScriptEngine; import jalview.api.AlignCalcWorkerI; import jalview.api.AlignViewportI; import jalview.api.JalviewApp; @@ -31,9 +59,11 @@ import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import jalview.ext.so.SequenceOntology; import jalview.gui.AlignFrame; +import jalview.gui.AlignViewport; import jalview.gui.AlignmentPanel; import jalview.gui.CalculationChooser; import jalview.gui.Desktop; +import jalview.gui.Preferences; import jalview.gui.PromptUserConfig; import jalview.gui.StructureViewer; import jalview.io.AppletFormatAdapter; @@ -42,6 +72,7 @@ import jalview.io.DataSourceType; import jalview.io.FileFormat; import jalview.io.FileFormatException; import jalview.io.FileFormatI; +import jalview.io.FileFormats; import jalview.io.FileLoader; import jalview.io.HtmlSvgOutput; import jalview.io.IdentifyFile; @@ -59,39 +90,6 @@ import jalview.util.Platform; import jalview.ws.jws2.Jws2Discoverer; import netscape.javascript.JSObject; -import java.applet.AppletContext; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.PrintWriter; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; -import java.security.AllPermission; -import java.security.CodeSource; -import java.security.PermissionCollection; -import java.security.Permissions; -import java.security.Policy; -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; - -import com.threerings.getdown.util.LaunchUtil; - -import groovy.lang.Binding; -import groovy.util.GroovyScriptEngine; - /** * Main class for Jalview Application
*
@@ -114,6 +112,8 @@ public class Jalview implements JalviewJSApi Platform.getURLCommandArguments(); } + private boolean headless; + // singleton instance of this class private static Jalview instance; @@ -154,7 +154,6 @@ public class Jalview implements JalviewJSApi return !noAnnotation; } - static { if (!Platform.isJS()) @@ -165,21 +164,21 @@ public class Jalview implements JalviewJSApi */ { // grab all the rights we can for the JVM - Policy.setPolicy(new Policy() - { - @Override - public PermissionCollection getPermissions(CodeSource codesource) - { - Permissions perms = new Permissions(); - perms.add(new AllPermission()); - return (perms); - } - - @Override - public void refresh() - { - } - }); + Policy.setPolicy(new Policy() + { + @Override + public PermissionCollection getPermissions(CodeSource codesource) + { + Permissions perms = new Permissions(); + perms.add(new AllPermission()); + return (perms); + } + + @Override + public void refresh() + { + } + }); } } @@ -246,23 +245,26 @@ public class Jalview implements JalviewJSApi { return instance; } + + + private final static boolean doPlatformLogging = false; /** * main class for Jalview application * * @param args - * open filename + * open filename */ public static void main(String[] args) { - if (false) + if (doPlatformLogging) { Platform.startJavaLogging(); } instance = new Jalview(); instance.doMain(args); -} + } /** * @param args @@ -270,28 +272,35 @@ public class Jalview implements JalviewJSApi void doMain(String[] args) { - if (!Platform.isJS()) + boolean isJS = Platform.isJS(); + if (isJS) + { + Platform.setAppClass(this); + } + else { System.setSecurityManager(null); } System.out - .println("Java version: " - + System.getProperty("java.version")); + .println("Java version: " + System.getProperty("java.version")); System.out.println("Java Home: " + System.getProperty("java.home")); System.out.println(System.getProperty("os.arch") + " " + System.getProperty("os.name") + " " + System.getProperty("os.version")); String val = System.getProperty("sys.install4jVersion"); - if (val != null) { - System.out.println("Install4j version: " + val); + if (val != null) + { + System.out.println("Install4j version: " + val); } val = System.getProperty("installer_template_version"); - if (val != null) { + if (val != null) + { System.out.println("Install4j template version: " + val); } val = System.getProperty("launcher_version"); - if (val != null) { + if (val != null) + { System.out.println("Launcher version: " + val); } @@ -299,37 +308,55 @@ public class Jalview implements JalviewJSApi Cache.loadBuildProperties(true); ArgsParser aparser = new ArgsParser(args); - boolean headless = false; + headless = false; String usrPropsFile = aparser.getValue("props"); + Cache.loadProperties(usrPropsFile); // must do this before - if (usrPropsFile != null) + + if (isJS) { + isJavaAppletTag = aparser.isApplet(); + if (isJavaAppletTag) + { + Preferences.setAppletDefaults(); + Cache.loadProperties(usrPropsFile); // again, because we + // might be changing defaults here? + } System.out.println( - "CMD [-props " + usrPropsFile + "] executed successfully!"); + " found: " + aparser.getValue("Info.j2sAppletID")); + appletResourcePath = aparser.getValue("Info.resourcePath"); } - - if (!Platform.isJS()) + else /** * Java only * * @j2sIgnore */ { + + if (usrPropsFile != null) + { + System.out.println( + "CMD [-props " + usrPropsFile + "] executed successfully!"); + } if (aparser.contains("help") || aparser.contains("h")) { showUsage(); System.exit(0); } + // ?>> if (aparser.contains("nodisplay") || aparser.contains("nogui") || aparser.contains("headless")) { System.setProperty("java.awt.headless", "true"); headless = true; } + // < 0) + parseArguments(aparser, true); + } + + /** + * Allow an outside entity to initiate the second half of argument parsing + * (only). + * + * @param args + * @return null is good + */ + @Override + public Object parseArguments(String[] args) + { + + try { - final File appdir = new File(appdirString); - new Thread() - { - @Override - public void run() - { - LaunchUtil.upgradeGetdown( - new File(appdir, "getdown-launcher-old.jar"), - new File(appdir, "getdown-launcher.jar"), - new File(appdir, "getdown-launcher-new.jar")); - } - }.start(); + parseArguments(new ArgsParser(args), false); + return null; + } catch (Throwable t) + { + return t; } + } - String file = null, data = null; - FileFormatI format = null; - DataSourceType protocol = null; - FileLoader fileLoader = new FileLoader(!headless); + /** + * + * @param aparser + * @param isStartup + */ + private void parseArguments(ArgsParser aparser, boolean isStartup) + { String groovyscript = null; // script to execute after all loading is - // completed one way or another - // extract groovy argument and execute if necessary - groovyscript = aparser.getValue("groovy", true); - file = aparser.getValue("open", true); + boolean isJS = Platform.isJS(); + if (!isJS) + /** @j2sIgnore */ + { + // Move any new getdown-launcher-new.jar into place over old + // getdown-launcher.jar + String appdirString = System.getProperty("getdownappdir"); + if (appdirString != null && appdirString.length() > 0) + { + final File appdir = new File(appdirString); + new Thread() + { + @Override + public void run() + { + LaunchUtil.upgradeGetdown( + new File(appdir, "getdown-launcher-old.jar"), + new File(appdir, "getdown-launcher.jar"), + new File(appdir, "getdown-launcher-new.jar")); + } + }.start(); + } + + // completed one way or another + // extract groovy argument and execute if necessary + groovyscript = aparser.getValue("groovy", true); + + } + + String file = aparser.getValue("open", true); if (file == null && desktop == null) { System.out.println("No files to open!"); System.exit(1); } + long progress = -1; + DataSourceType protocol = null; + FileLoader fileLoader = new FileLoader(!headless); + FileFormatI format = null; // Finally, deal with the remaining input data. if (file != null) { @@ -563,11 +632,11 @@ public class Jalview implements JalviewJSApi System.out.println("CMD [-open " + file + "] executed successfully!"); if (!Platform.isJS()) - /** - * ignore in JavaScript -- can't just file existence - could load it? - * - * @j2sIgnore - */ + /** + * ignore in JavaScript -- can't just file existence - could load it? + * + * @j2sIgnore + */ { if (!file.startsWith("http://") && !file.startsWith("https://")) // BH 2019 added https check for Java @@ -582,27 +651,89 @@ public class Jalview implements JalviewJSApi } } } - - protocol = AppletFormatAdapter.checkProtocol(file); - + String fileFormat = (isJavaAppletTag + ? aparser.getAppletValue("format", null) + : null); + protocol = AppletFormatAdapter.checkProtocol(file); try { + format = (isJavaAppletTag && fileFormat != null + ? FileFormats.getInstance().forName(fileFormat) + : null); + if (format == null) + { + format = new IdentifyFile().identify(file, protocol); + } format = new IdentifyFile().identify(file, protocol); } catch (FileFormatException e1) { // TODO ? } - AlignFrame af = fileLoader.LoadFileWaitTillLoaded(file, protocol, - format); + if (aparser.contains(ArgsParser.NOMENUBAR)) + { + noMenuBar = true; + System.out.println("CMD [nomenu] executed successfully!"); + } + + if (aparser.contains(ArgsParser.NOSTATUS)) + { + noStatus = true; + 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; + System.out.println("CMD [nocalculation] executed successfully!"); + } + + AlignFrame af = new FileLoader(!headless).LoadFileWaitTillLoaded(file, + protocol, format); if (af == null) { System.out.println("error"); } else { + + // JalviewLite interface for JavaScript allows second file open + String file2 = aparser.getValue(ArgsParser.OPEN2, true); + if (file2 != null) + { + protocol = AppletFormatAdapter.checkProtocol(file2); + try + { + format = new IdentifyFile().identify(file2, protocol); + } catch (FileFormatException e1) + { + // TODO ? + } + AlignFrame af2 = new FileLoader(!headless) + .LoadFileWaitTillLoaded(file2, protocol, format); + if (af2 == null) + { + System.out.println("error"); + } + else + { + AlignViewport.openLinkedAlignmentAs(af, + af.getViewport().getAlignment(), + af2.getViewport().getAlignment(), "", + AlignViewport.SPLIT_FRAME); + System.out.println( + "CMD [-open2 " + file2 + "] executed successfully!"); + } + } setCurrentAlignFrame(af); - data = aparser.getValue("colour", true); + + String data = aparser.getValue(ArgsParser.COLOUR, true); if (data != null) { data.replaceAll("%20", " "); @@ -619,7 +750,7 @@ public class Jalview implements JalviewJSApi } // Must maintain ability to use the groups flag - data = aparser.getValue("groups", true); + data = aparser.getValue(ArgsParser.GROUPS, true); if (data != null) { af.parseFeaturesFile(data, @@ -628,7 +759,7 @@ public class Jalview implements JalviewJSApi System.out.println( "CMD groups[-" + data + "] executed successfully!"); } - data = aparser.getValue("features", true); + data = aparser.getValue(ArgsParser.FEATURES, true); if (data != null) { af.parseFeaturesFile(data, @@ -637,8 +768,7 @@ public class Jalview implements JalviewJSApi System.out.println( "CMD [-features " + data + "] executed successfully!"); } - - data = aparser.getValue("annotations", true); + data = aparser.getValue(ArgsParser.ANNOTATIONS, true); if (data != null) { af.loadJalviewDataFile(data, null, null, null); @@ -646,8 +776,17 @@ public class Jalview implements JalviewJSApi System.out.println( "CMD [-annotations " + data + "] executed successfully!"); } + + // JavaScript feature + + 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("sortbytree")) + if (aparser.contains(ArgsParser.SORTBYTREE)) { af.getViewport().setSortByTree(true); if (af.getViewport().getSortByTree()) @@ -655,24 +794,50 @@ public class Jalview implements JalviewJSApi System.out.println("CMD [-sortbytree] executed successfully!"); } } - if (aparser.contains("no-annotation")) + + boolean doUpdateAnnotation = false; + /** + * 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)) { - 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("nosortbytree")) + + + if (aparser.contains(ArgsParser.NOSORTBYTREE)) { af.getViewport().setSortByTree(false); if (!af.getViewport().getSortByTree()) { + doUpdateAnnotation = true; System.out .println("CMD [-nosortbytree] executed successfully!"); } } - data = aparser.getValue("tree", true); + if (doUpdateAnnotation) + { // BH 2019.07.24 + af.setMenusForViewport(); + af.alignPanel.updateLayout(); + } + + data = aparser.getValue(ArgsParser.TREE, true); if (data != null) { try @@ -692,109 +857,44 @@ public class Jalview implements JalviewJSApi // TODO - load PDB structure(s) to alignment JAL-629 // (associate with identical sequence in alignment, or a specified // sequence) - if (groovyscript != null) + if (isJavaAppletTag) { - // Execute the groovy script after we've done all the rendering stuff - // and before any images or figures are generated. - System.out.println("Executing script " + groovyscript); - executeGroovyScript(groovyscript, af); - System.out.println("CMD groovy[" + groovyscript - + "] executed successfully!"); - groovyscript = null; + loadAppletParams(aparser, af); } - String imageName = "unnamed.png"; - while (aparser.getSize() > 1) + else if (!isJS) + /** + * Java only + * + * @j2sIgnore + */ { - String outputFormat = aparser.nextValue(); - file = aparser.nextValue(); - - if (outputFormat.equalsIgnoreCase("png")) - { - af.createPNG(new File(file)); - imageName = (new File(file)).getName(); - System.out.println("Creating PNG image: " + file); - continue; - } - else if (outputFormat.equalsIgnoreCase("svg")) - { - File imageFile = new File(file); - imageName = imageFile.getName(); - af.createSVG(imageFile); - System.out.println("Creating SVG image: " + file); - continue; - } - else if (outputFormat.equalsIgnoreCase("html")) - { - File imageFile = new File(file); - imageName = imageFile.getName(); - HtmlSvgOutput htmlSVG = new HtmlSvgOutput(af.alignPanel); - htmlSVG.exportHTML(file); - - System.out.println("Creating HTML image: " + file); - continue; - } - else if (outputFormat.equalsIgnoreCase("biojsmsa")) - { - if (file == null) - { - System.err.println("The output html file must not be null"); - return; - } - try - { - BioJsHTMLOutput.refreshVersionInfo( - BioJsHTMLOutput.BJS_TEMPLATES_LOCAL_DIRECTORY); - } catch (URISyntaxException e) - { - e.printStackTrace(); - } - BioJsHTMLOutput bjs = new BioJsHTMLOutput(af.alignPanel); - bjs.exportHTML(file); - System.out - .println("Creating BioJS MSA Viwer HTML file: " + file); - continue; - } - else if (outputFormat.equalsIgnoreCase("imgMap")) - { - af.createImageMap(new File(file), imageName); - System.out.println("Creating image map: " + file); - continue; - } - else if (outputFormat.equalsIgnoreCase("eps")) - { - File outputFile = new File(file); - System.out.println( - "Creating EPS file: " + outputFile.getAbsolutePath()); - af.createEPS(outputFile); - continue; - } - - af.saveAlignment(file, format); - if (af.isSaveAlignmentSuccessful()) - { - System.out.println("Written alignment in " + format - + " format to " + file); - } - else + if (groovyscript != null) { - System.out.println("Error writing file " + file + " in " - + format + " format!!"); + // Execute the groovy script after we've done all the rendering + // stuff + // and before any images or figures are generated. + System.out.println("Executing script " + groovyscript); + executeGroovyScript(groovyscript, af); + System.out.println("CMD groovy[" + groovyscript + + "] executed successfully!"); + groovyscript = null; } - } - + createOutputFiles(aparser, af, format); while (aparser.getSize() > 0) { System.out.println("Unknown arg: " + aparser.nextValue()); } } } + + AlignFrame startUpAlframe = null; // We'll only open the default file if the desktop is visible. // And the user // //////////////////// - if (!Platform.isJS() && !headless && file == null + if (!isJS && !headless && file == null && Cache.getDefault("SHOW_STARTUP_FILE", true)) /** * Java only @@ -803,8 +903,7 @@ public class Jalview implements JalviewJSApi */ { file = Cache.getDefault("STARTUP_FILE", - Cache.getDefault("www.jalview.org", - "http://www.jalview.org") + Cache.getDefault("www.jalview.org", "http://www.jalview.org") + "/examples/exampleFile_2_7.jar"); if (file.equals( "http://www.jalview.org/examples/exampleFile_2_3.jar")) @@ -839,9 +938,10 @@ public class Jalview implements JalviewJSApi startUpAlframe = fileLoader.LoadFileWaitTillLoaded(file, protocol, format); - // extract groovy arguments before anything else. - } + } + + // extract groovy arguments before anything else. // Once all other stuff is done, execute any groovy scripts (in order) if (groovyscript != null) { @@ -857,6 +957,7 @@ public class Jalview implements JalviewJSApi + groovyscript); } } + // and finally, turn off batch mode indicator - if the desktop still exists if (desktop != null) { @@ -868,6 +969,109 @@ public class Jalview implements JalviewJSApi } } + /** + * Writes an output file for each format (if any) specified in the + * command-line arguments. Supported formats are currently + * + * A format parameter should be followed by a parameter specifying the output + * file name. {@code imgMap} parameters should follow those for the + * corresponding alignment image output. + * + * @param aparser + * @param af + * @param format + */ + private void createOutputFiles(ArgsParser aparser, AlignFrame af, + FileFormatI format) + { + String imageName = "unnamed.png"; + while (aparser.getSize() > 1) + { + String outputFormat = aparser.nextValue(); + String file = aparser.nextValue(); + + if (outputFormat.equalsIgnoreCase("png")) + { + af.createPNG(new File(file)); + imageName = (new File(file)).getName(); + System.out.println("Creating PNG image: " + file); + continue; + } + else if (outputFormat.equalsIgnoreCase("svg")) + { + File imageFile = new File(file); + imageName = imageFile.getName(); + af.createSVG(imageFile); + System.out.println("Creating SVG image: " + file); + continue; + } + else if (outputFormat.equalsIgnoreCase("html")) + { + File imageFile = new File(file); + imageName = imageFile.getName(); + HtmlSvgOutput htmlSVG = new HtmlSvgOutput(af.alignPanel); + htmlSVG.exportHTML(file); + System.out.println("Creating HTML image: " + file); + continue; + } + else if (outputFormat.equalsIgnoreCase("biojsmsa")) + { + if (file == null) + { + System.err.println("The output html file must not be null"); + return; + } + try + { + BioJsHTMLOutput.refreshVersionInfo( + BioJsHTMLOutput.BJS_TEMPLATES_LOCAL_DIRECTORY); + } catch (URISyntaxException e) + { + e.printStackTrace(); + } + BioJsHTMLOutput bjs = new BioJsHTMLOutput(af.alignPanel); + bjs.exportHTML(file); + System.out.println("Creating BioJS MSA Viwer HTML file: " + file); + continue; + } + else if (outputFormat.equalsIgnoreCase("imgMap")) + { + af.createImageMap(new File(file), imageName); + System.out.println("Creating image map: " + file); + continue; + } + else if (outputFormat.equalsIgnoreCase("eps")) + { + File outputFile = new File(file); + System.out.println( + "Creating EPS file: " + outputFile.getAbsolutePath()); + af.createEPS(outputFile); + continue; + } + + af.saveAlignment(file, format); + if (af.isSaveAlignmentSuccessful()) + { + System.out.println( + "Written alignment in " + format + " format to " + file); + } + else + { + System.out.println("Error writing file " + file + " in " + format + + " format!!"); + } + + } + + } + private static void showUsage() { System.out.println( @@ -944,10 +1148,10 @@ public class Jalview implements JalviewJSApi * Locate the given string as a file and pass it to the groovy interpreter. * * @param groovyscript - * the script to execute + * the script to execute * @param jalviewContext - * the Jalview Desktop object passed in to the groovy - * binding as the 'Jalview' object. + * the Jalview Desktop object passed in to the groovy binding as the + * 'Jalview' object. */ private void executeGroovyScript(String groovyscript, AlignFrame af) { @@ -1076,8 +1280,8 @@ public class Jalview implements JalviewJSApi } /** - * Quit method delegates to Desktop.quit - unless running in headless mode when - * it just ends the JVM + * Quit method delegates to Desktop.quit - unless running in headless mode + * when it just ends the JVM */ public void quit() { @@ -1100,7 +1304,7 @@ public class Jalview implements JalviewJSApi { Jalview.currentAlignFrame = currentAlignFrame; } - + /** * Get the SwingJS applet ID and combine that with the frameType * @@ -1267,13 +1471,15 @@ public class Jalview implements JalviewJSApi : jsExecQueue); } - @Override - public AppletContext getAppletContext() - { - // TODO Auto-generated method stub - return null; - } - +// AppletContext deprecated +// +// @Override +// public AppletContext getAppletContext() +// { +// // TODO Auto-generated method stub +// return null; +// } +// @Override public boolean isJsfallbackEnabled() { @@ -1422,8 +1628,7 @@ public class Jalview implements JalviewJSApi public void highlight(String sequenceId, String position, String alignedPosition) { - highlightIn(null, sequenceId, position, - alignedPosition); + highlightIn(null, sequenceId, position, alignedPosition); } @Override @@ -1470,8 +1675,7 @@ public class Jalview implements JalviewJSApi public String getSelectedSequencesAsAlignment(String format, String suffix) { - return getSelectedSequencesAsAlignmentFrom(null, - format, suffix); + return getSelectedSequencesAsAlignmentFrom(null, format, suffix); } @Override @@ -1620,33 +1824,33 @@ public class Jalview implements JalviewJSApi return appLoader.getAnnotationFrom(alf); } -// @Override -// public AlignFrame newView() -// { -// return newViewFrom(null, null); -// } -// -// @Override -// public AlignFrame newView(String name) -// { -// return newViewFrom(null, name); -// } -// -// @Override -// public AlignFrame newViewFrom(AlignFrame alf) -// { -// return newViewFrom(alf, null); -// } -// -// @Override -// public AlignFrame newViewFrom(AlignFrame alf, String name) -// { -// if (alf == null) -// { -// alf = getCurrentAlignFrame(); -// } -// return appLoader.newViewFrom(alf, name); -// } + // @Override + // public AlignFrame newView() + // { + // return newViewFrom(null, null); + // } + // + // @Override + // public AlignFrame newView(String name) + // { + // return newViewFrom(null, name); + // } + // + // @Override + // public AlignFrame newViewFrom(AlignFrame alf) + // { + // return newViewFrom(alf, null); + // } + // + // @Override + // public AlignFrame newViewFrom(AlignFrame alf, String name) + // { + // if (alf == null) + // { + // alf = getCurrentAlignFrame(); + // } + // return appLoader.newViewFrom(alf, name); + // } @Override public AlignFrame loadAlignment(String text, String title) @@ -1810,8 +2014,7 @@ public class Jalview implements JalviewJSApi public String getSelectedSequencesAsAlignment(String format, boolean suffix) { - return getSelectedSequencesAsAlignmentFrom(null, - format, suffix); + return getSelectedSequencesAsAlignmentFrom(null, format, suffix); } @Override @@ -1903,14 +2106,4 @@ public class Jalview implements JalviewJSApi // + " " + status); } - @Override - public Object parseArguments(String[] args) - { - // TODO Auto-generated method stub - return null; - } - - - - }