2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 import jalview.ext.so.SequenceOntology;
24 import jalview.gui.AlignFrame;
25 import jalview.gui.Desktop;
26 import jalview.gui.PromptUserConfig;
27 import jalview.io.AppletFormatAdapter;
28 import jalview.io.BioJsHTMLOutput;
29 import jalview.io.DataSourceType;
30 import jalview.io.FileFormat;
31 import jalview.io.FileFormatException;
32 import jalview.io.FileFormatI;
33 import jalview.io.FileLoader;
34 import jalview.io.HtmlSvgOutput;
35 import jalview.io.IdentifyFile;
36 import jalview.io.NewickFile;
37 import jalview.io.gff.SequenceOntologyFactory;
38 import jalview.schemes.ColourSchemeI;
39 import jalview.schemes.ColourSchemeProperty;
40 import jalview.util.MessageManager;
41 import jalview.util.Platform;
42 import jalview.ws.jws2.Jws2Discoverer;
44 import java.io.BufferedReader;
46 import java.io.FileOutputStream;
47 import java.io.IOException;
48 import java.io.InputStreamReader;
49 import java.io.OutputStreamWriter;
50 import java.io.PrintWriter;
51 import java.net.MalformedURLException;
53 import java.net.URISyntaxException;
55 import java.security.AllPermission;
56 import java.security.CodeSource;
57 import java.security.PermissionCollection;
58 import java.security.Permissions;
59 import java.security.Policy;
60 import java.util.HashMap;
62 import java.util.Vector;
63 import java.util.logging.ConsoleHandler;
64 import java.util.logging.Level;
65 import java.util.logging.Logger;
67 import javax.swing.LookAndFeel;
68 import javax.swing.UIManager;
70 import com.threerings.getdown.util.LaunchUtil;
72 import groovy.lang.Binding;
73 import groovy.util.GroovyScriptEngine;
76 * Main class for Jalview Application <br>
78 * start with: java -classpath "$PATH_TO_LIB$/*:$PATH_TO_CLASSES$" \
81 * or on Windows: java -classpath "$PATH_TO_LIB$/*;$PATH_TO_CLASSES$" \
82 * jalview.bin.Jalview jalview.bin.Jalview
84 * (ensure -classpath arg is quoted to avoid shell expansion of '*' and do not
85 * embellish '*' to e.g. '*.jar')
94 Platform.getURLCommandArguments();
97 // singleton instance of this class
99 private static Jalview instance;
101 private Desktop desktop;
103 public static AlignFrame currentAlignFrame;
107 if (!Platform.isJS())
114 // grab all the rights we can for the JVM
115 Policy.setPolicy(new Policy()
118 public PermissionCollection getPermissions(CodeSource codesource)
120 Permissions perms = new Permissions();
121 perms.add(new AllPermission());
126 public void refresh()
134 * keep track of feature fetching tasks.
142 * TODO: generalise to track all jalview events to orchestrate batch processing
146 private int queued = 0;
148 private int running = 0;
150 public FeatureFetcher()
155 public void addFetcher(final AlignFrame af,
156 final Vector<String> dasSources)
158 final long id = System.currentTimeMillis();
160 final FeatureFetcher us = this;
161 new Thread(new Runnable()
173 af.setProgressBar(MessageManager
174 .getString("status.das_features_being_retrived"), id);
175 af.featureSettings_actionPerformed(null);
176 af.setProgressBar(null, id);
185 public synchronized boolean allFinished()
187 return queued == 0 && running == 0;
192 public static Jalview getInstance()
198 * main class for Jalview application
201 * open <em>filename</em>
203 public static void main(String[] args)
205 // setLogging(); // BH - for event debugging in JavaScript
206 instance = new Jalview();
207 instance.doMain(args);
210 private static void logClass(String name)
212 // BH - for event debugging in JavaScript
213 ConsoleHandler consoleHandler = new ConsoleHandler();
214 consoleHandler.setLevel(Level.ALL);
215 Logger logger = Logger.getLogger(name);
216 logger.setLevel(Level.ALL);
217 logger.addHandler(consoleHandler);
220 @SuppressWarnings("unused")
221 private static void setLogging()
229 System.out.println("not in js");
232 // BH - for event debugging in JavaScript (Java mode only)
233 if (!Platform.isJS())
240 Logger.getLogger("").setLevel(Level.ALL);
241 logClass("java.awt.EventDispatchThread");
242 logClass("java.awt.EventQueue");
243 logClass("java.awt.Component");
244 logClass("java.awt.focus.Component");
245 logClass("java.awt.focus.DefaultKeyboardFocusManager");
256 void doMain(String[] args)
259 if (!Platform.isJS())
261 System.setSecurityManager(null);
265 .println("Java version: " + System.getProperty("java.version"));
266 System.out.println(System.getProperty("os.arch") + " "
267 + System.getProperty("os.name") + " "
268 + System.getProperty("os.version"));
269 // report Jalview version
270 Cache.loadBuildProperties(true);
272 ArgsParser aparser = new ArgsParser(args);
273 boolean headless = false;
275 String usrPropsFile = aparser.getValue("props");
276 Cache.loadProperties(usrPropsFile); // must do this before
277 if (usrPropsFile != null)
280 "CMD [-props " + usrPropsFile + "] executed successfully!");
283 if (!Platform.isJS())
290 if (aparser.contains("help") || aparser.contains("h"))
295 if (aparser.contains("nodisplay") || aparser.contains("nogui")
296 || aparser.contains("headless"))
298 System.setProperty("java.awt.headless", "true");
303 final String jabawsUrl = aparser.getValue("jabaws");
304 if (jabawsUrl != null)
308 Jws2Discoverer.getDiscoverer().setPreferredUrl(jabawsUrl);
310 "CMD [-jabaws " + jabawsUrl + "] executed successfully!");
311 } catch (MalformedURLException e)
314 "Invalid jabaws parameter: " + jabawsUrl + " ignored");
319 String defs = aparser.getValue("setprop");
322 int p = defs.indexOf('=');
325 System.err.println("Ignoring invalid setprop argument : " + defs);
329 System.out.println("Executing setprop argument: " + defs);
332 Cache.setProperty(defs.substring(0,p), defs.substring(p+1));
335 defs = aparser.getValue("setprop");
337 if (System.getProperty("java.awt.headless") != null
338 && System.getProperty("java.awt.headless").equals("true"))
342 System.setProperty("http.agent",
343 "Jalview Desktop/" + Cache.getDefault("VERSION", "Unknown"));
347 } catch (NoClassDefFoundError error)
349 error.printStackTrace();
350 System.out.println("\nEssential logging libraries not found."
351 + "\nUse: java -classpath \"$PATH_TO_LIB$/*:$PATH_TO_CLASSES$\" jalview.bin.Jalview");
359 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
360 } catch (Exception ex)
362 System.err.println("Unexpected Look and Feel Exception");
363 ex.printStackTrace();
365 if (Platform.isAMacAndNotJS())
368 LookAndFeel lookAndFeel = ch.randelshofer.quaqua.QuaquaManager
370 System.setProperty("com.apple.mrj.application.apple.menu.about.name",
372 System.setProperty("apple.laf.useScreenMenuBar", "true");
373 if (lookAndFeel != null)
377 UIManager.setLookAndFeel(lookAndFeel);
378 } catch (Throwable e)
381 "Failed to set QuaQua look and feel: " + e.toString());
384 if (lookAndFeel == null
385 || !(lookAndFeel.getClass().isAssignableFrom(
386 UIManager.getLookAndFeel().getClass()))
387 || !UIManager.getLookAndFeel().getClass().toString()
388 .toLowerCase().contains("quaqua"))
393 "Quaqua LaF not available on this plaform. Using VAqua(4).\nSee https://issues.jalview.org/browse/JAL-2976");
394 UIManager.setLookAndFeel("org.violetlib.aqua.AquaLookAndFeel");
395 } catch (Throwable e)
398 "Failed to reset look and feel: " + e.toString());
404 * configure 'full' SO model if preferences say to, else use the default (full SO)
405 * - as JS currently doesn't have OBO parsing, it must use 'Lite' version
407 boolean soDefault = !Platform.isJS();
408 if (Cache.getDefault("USE_FULL_SO", soDefault))
410 SequenceOntologyFactory.setInstance(new SequenceOntology());
415 desktop = new Desktop();
416 desktop.setInBatchMode(true); // indicate we are starting up
420 JalviewTaskbar.setTaskbar(this);
421 } catch (Throwable t)
423 System.out.println("Error setting Taskbar: " + t.getMessage());
426 desktop.setVisible(true);
428 if (!Platform.isJS())
435 desktop.startServiceDiscovery();
436 if (!aparser.contains("nousagestats"))
438 startUsageStats(desktop);
442 System.err.println("CMD [-nousagestats] executed successfully!");
445 if (!aparser.contains("noquestionnaire"))
447 String url = aparser.getValue("questionnaire");
450 // Start the desktop questionnaire prompter with the specified
452 Cache.log.debug("Starting questionnaire url at " + url);
453 desktop.checkForQuestionnaire(url);
454 System.out.println("CMD questionnaire[-" + url
455 + "] executed successfully!");
459 if (Cache.getProperty("NOQUESTIONNAIRES") == null)
461 // Start the desktop questionnaire prompter with the specified
464 // "http://anaplog.compbio.dundee.ac.uk/cgi-bin/questionnaire.pl";
466 String defurl = "http://www.jalview.org/cgi-bin/questionnaire.pl";
468 "Starting questionnaire with default url: " + defurl);
469 desktop.checkForQuestionnaire(defurl);
476 .println("CMD [-noquestionnaire] executed successfully!");
479 if (!aparser.contains("nonews"))
481 desktop.checkForNews();
484 BioJsHTMLOutput.updateBioJS();
488 // Move any new getdown-launcher-new.jar into place over old
489 // getdown-launcher.jar
490 String appdirString = System.getProperty("getdownappdir");
491 if (appdirString != null && appdirString.length() > 0)
493 final File appdir = new File(appdirString);
499 LaunchUtil.upgradeGetdown(
500 new File(appdir, "getdown-launcher-old.jar"),
501 new File(appdir, "getdown-launcher.jar"),
502 new File(appdir, "getdown-launcher-new.jar"));
507 String file = null, data = null;
508 FileFormatI format = null;
509 DataSourceType protocol = null;
510 FileLoader fileLoader = new FileLoader(!headless);
512 String groovyscript = null; // script to execute after all loading is
513 // completed one way or another
514 // extract groovy argument and execute if necessary
515 groovyscript = aparser.getValue("groovy", true);
516 file = aparser.getValue("open", true);
518 if (file == null && desktop == null)
520 System.out.println("No files to open!");
524 // Finally, deal with the remaining input data.
529 desktop.setProgressBar(
531 .getString("status.processing_commandline_args"),
532 progress = System.currentTimeMillis());
534 System.out.println("CMD [-open " + file + "] executed successfully!");
536 if (!Platform.isJS())
538 * ignore in JavaScript -- can't just file existence - could load it?
543 if (!file.startsWith("http://") && !file.startsWith("https://"))
544 // BH 2019 added https check for Java
546 if (!(new File(file)).exists())
548 System.out.println("Can't find " + file);
557 protocol = AppletFormatAdapter.checkProtocol(file);
561 format = new IdentifyFile().identify(file, protocol);
562 } catch (FileFormatException e1)
567 AlignFrame af = fileLoader.LoadFileWaitTillLoaded(file, protocol,
571 System.out.println("error");
575 setCurrentAlignFrame(af);
576 data = aparser.getValue("colour", true);
579 data.replaceAll("%20", " ");
581 ColourSchemeI cs = ColourSchemeProperty.getColourScheme(
582 af.getViewport(), af.getViewport().getAlignment(), data);
587 "CMD [-color " + data + "] executed successfully!");
592 // Must maintain ability to use the groups flag
593 data = aparser.getValue("groups", true);
596 af.parseFeaturesFile(data,
597 AppletFormatAdapter.checkProtocol(data));
598 // System.out.println("Added " + data);
600 "CMD groups[-" + data + "] executed successfully!");
602 data = aparser.getValue("features", true);
605 af.parseFeaturesFile(data,
606 AppletFormatAdapter.checkProtocol(data));
607 // System.out.println("Added " + data);
609 "CMD [-features " + data + "] executed successfully!");
612 data = aparser.getValue("annotations", true);
615 af.loadJalviewDataFile(data, null, null, null);
616 // System.out.println("Added " + data);
618 "CMD [-annotations " + data + "] executed successfully!");
620 // set or clear the sortbytree flag.
621 if (aparser.contains("sortbytree"))
623 af.getViewport().setSortByTree(true);
624 if (af.getViewport().getSortByTree())
626 System.out.println("CMD [-sortbytree] executed successfully!");
629 if (aparser.contains("no-annotation"))
631 af.getViewport().setShowAnnotation(false);
632 if (!af.getViewport().isShowAnnotation())
634 System.out.println("CMD no-annotation executed successfully!");
637 if (aparser.contains("nosortbytree"))
639 af.getViewport().setSortByTree(false);
640 if (!af.getViewport().getSortByTree())
643 .println("CMD [-nosortbytree] executed successfully!");
646 data = aparser.getValue("tree", true);
652 "CMD [-tree " + data + "] executed successfully!");
653 NewickFile nf = new NewickFile(data,
654 AppletFormatAdapter.checkProtocol(data));
656 .setCurrentTree(af.showNewickTree(nf, data).getTree());
657 } catch (IOException ex)
659 System.err.println("Couldn't add tree " + data);
660 ex.printStackTrace(System.err);
663 // TODO - load PDB structure(s) to alignment JAL-629
664 // (associate with identical sequence in alignment, or a specified
666 if (groovyscript != null)
668 // Execute the groovy script after we've done all the rendering stuff
669 // and before any images or figures are generated.
670 System.out.println("Executing script " + groovyscript);
671 executeGroovyScript(groovyscript, af);
672 System.out.println("CMD groovy[" + groovyscript
673 + "] executed successfully!");
676 String imageName = "unnamed.png";
677 while (aparser.getSize() > 1)
679 String outputFormat = aparser.nextValue();
680 file = aparser.nextValue();
682 if (outputFormat.equalsIgnoreCase("png"))
684 af.createPNG(new File(file));
685 imageName = (new File(file)).getName();
686 System.out.println("Creating PNG image: " + file);
689 else if (outputFormat.equalsIgnoreCase("svg"))
691 File imageFile = new File(file);
692 imageName = imageFile.getName();
693 af.createSVG(imageFile);
694 System.out.println("Creating SVG image: " + file);
697 else if (outputFormat.equalsIgnoreCase("html"))
699 File imageFile = new File(file);
700 imageName = imageFile.getName();
701 HtmlSvgOutput htmlSVG = new HtmlSvgOutput(af.alignPanel);
702 htmlSVG.exportHTML(file);
704 System.out.println("Creating HTML image: " + file);
707 else if (outputFormat.equalsIgnoreCase("biojsmsa"))
711 System.err.println("The output html file must not be null");
716 BioJsHTMLOutput.refreshVersionInfo(
717 BioJsHTMLOutput.BJS_TEMPLATES_LOCAL_DIRECTORY);
718 } catch (URISyntaxException e)
722 BioJsHTMLOutput bjs = new BioJsHTMLOutput(af.alignPanel);
723 bjs.exportHTML(file);
725 .println("Creating BioJS MSA Viwer HTML file: " + file);
728 else if (outputFormat.equalsIgnoreCase("imgMap"))
730 af.createImageMap(new File(file), imageName);
731 System.out.println("Creating image map: " + file);
734 else if (outputFormat.equalsIgnoreCase("eps"))
736 File outputFile = new File(file);
738 "Creating EPS file: " + outputFile.getAbsolutePath());
739 af.createEPS(outputFile);
743 af.saveAlignment(file, format);
744 if (af.isSaveAlignmentSuccessful())
746 System.out.println("Written alignment in " + format
747 + " format to " + file);
751 System.out.println("Error writing file " + file + " in "
752 + format + " format!!");
757 while (aparser.getSize() > 0)
759 System.out.println("Unknown arg: " + aparser.nextValue());
763 AlignFrame startUpAlframe = null;
764 // We'll only open the default file if the desktop is visible.
766 // ////////////////////
768 if (!Platform.isJS() && !headless && file == null
769 && Cache.getDefault("SHOW_STARTUP_FILE", true))
776 file = Cache.getDefault("STARTUP_FILE",
777 Cache.getDefault("www.jalview.org",
778 "http://www.jalview.org")
779 + "/examples/exampleFile_2_7.jar");
781 "http://www.jalview.org/examples/exampleFile_2_3.jar"))
783 // hardwire upgrade of the startup file
784 file.replace("_2_3.jar", "_2_7.jar");
785 // and remove the stale setting
786 Cache.removeProperty("STARTUP_FILE");
789 protocol = DataSourceType.FILE;
791 if (file.indexOf("http:") > -1)
793 protocol = DataSourceType.URL;
796 if (file.endsWith(".jar"))
798 format = FileFormat.Jalview;
804 format = new IdentifyFile().identify(file, protocol);
805 } catch (FileFormatException e)
811 startUpAlframe = fileLoader.LoadFileWaitTillLoaded(file, protocol,
813 // extract groovy arguments before anything else.
816 // Once all other stuff is done, execute any groovy scripts (in order)
817 if (groovyscript != null)
819 if (Cache.groovyJarsPresent())
821 System.out.println("Executing script " + groovyscript);
822 executeGroovyScript(groovyscript, startUpAlframe);
827 "Sorry. Groovy Support is not available, so ignoring the provided groovy script "
831 // and finally, turn off batch mode indicator - if the desktop still exists
836 desktop.setProgressBar(null, progress);
838 desktop.setInBatchMode(false);
842 private static void showUsage()
845 "Usage: jalview -open [FILE] [OUTPUT_FORMAT] [OUTPUT_FILE]\n\n"
846 + "-nodisplay\tRun Jalview without User Interface.\n"
847 + "-props FILE\tUse the given Jalview properties file instead of users default.\n"
848 + "-colour COLOURSCHEME\tThe colourscheme to be applied to the alignment\n"
849 + "-annotations FILE\tAdd precalculated annotations to the alignment.\n"
850 + "-tree FILE\tLoad the given newick format tree file onto the alignment\n"
851 + "-features FILE\tUse the given file to mark features on the alignment.\n"
852 + "-fasta FILE\tCreate alignment file FILE in Fasta format.\n"
853 + "-clustal FILE\tCreate alignment file FILE in Clustal format.\n"
854 + "-pfam FILE\tCreate alignment file FILE in PFAM format.\n"
855 + "-msf FILE\tCreate alignment file FILE in MSF format.\n"
856 + "-pileup FILE\tCreate alignment file FILE in Pileup format\n"
857 + "-pir FILE\tCreate alignment file FILE in PIR format.\n"
858 + "-blc FILE\tCreate alignment file FILE in BLC format.\n"
859 + "-json FILE\tCreate alignment file FILE in JSON format.\n"
860 + "-jalview FILE\tCreate alignment file FILE in Jalview format.\n"
861 + "-png FILE\tCreate PNG image FILE from alignment.\n"
862 + "-svg FILE\tCreate SVG image FILE from alignment.\n"
863 + "-html FILE\tCreate HTML file from alignment.\n"
864 + "-biojsMSA FILE\tCreate BioJS MSA Viewer HTML file from alignment.\n"
865 + "-imgMap FILE\tCreate HTML file FILE with image map of PNG image.\n"
866 + "-eps FILE\tCreate EPS file FILE from alignment.\n"
867 + "-questionnaire URL\tQueries the given URL for information about any Jalview user questionnaires.\n"
868 + "-noquestionnaire\tTurn off questionnaire check.\n"
869 + "-nonews\tTurn off check for Jalview news.\n"
870 + "-nousagestats\tTurn off google analytics tracking for this session.\n"
871 + "-sortbytree OR -nosortbytree\tEnable or disable sorting of the given alignment by the given tree\n"
873 // "-setprop PROPERTY=VALUE\tSet the given Jalview property,
874 // after all other properties files have been read\n\t
875 // (quote the 'PROPERTY=VALUE' pair to ensure spaces are
876 // passed in correctly)"
877 + "-jabaws URL\tSpecify URL for Jabaws services (e.g. for a local installation).\n"
878 + "-fetchfrom nickname\tQuery nickname for features for the alignments and display them.\n"
879 + "-groovy FILE\tExecute groovy script in FILE, after all other arguments have been processed (if FILE is the text 'STDIN' then the file will be read from STDIN)\n"
880 + "\n~Read documentation in Application or visit http://www.jalview.org for description of Features and Annotations file~\n\n");
883 private static void startUsageStats(final Desktop desktop)
886 * start a User Config prompt asking if we can log usage statistics.
888 PromptUserConfig prompter = new PromptUserConfig(Desktop.desktop,
889 "USAGESTATS", "Jalview Usage Statistics",
890 "Do you want to help make Jalview better by enabling "
891 + "the collection of usage statistics with Google Analytics ?"
892 + "\n\n(you can enable or disable usage tracking in the preferences)",
899 "Initialising googletracker for usage stats.");
900 Cache.initGoogleTracker();
901 Cache.log.debug("Tracking enabled.");
908 Cache.log.debug("Not enabling Google Tracking.");
911 desktop.addDialogThread(prompter);
915 * Locate the given string as a file and pass it to the groovy interpreter.
917 * @param groovyscript
918 * the script to execute
919 * @param jalviewContext
920 * the Jalview Desktop object passed in to the groovy
921 * binding as the 'Jalview' object.
923 private void executeGroovyScript(String groovyscript, AlignFrame af)
926 * for scripts contained in files
933 if (groovyscript.trim().equals("STDIN"))
935 // read from stdin into a tempfile and execute it
938 tfile = File.createTempFile("jalview", "groovy");
939 PrintWriter outfile = new PrintWriter(
940 new OutputStreamWriter(new FileOutputStream(tfile)));
941 BufferedReader br = new BufferedReader(
942 new InputStreamReader(System.in));
944 while ((line = br.readLine()) != null)
946 outfile.write(line + "\n");
952 } catch (Exception ex)
954 System.err.println("Failed to read from STDIN into tempfile "
955 + ((tfile == null) ? "(tempfile wasn't created)"
956 : tfile.toString()));
957 ex.printStackTrace();
962 sfile = tfile.toURI().toURL();
963 } catch (Exception x)
966 "Unexpected Malformed URL Exception for temporary file created from STDIN: "
976 sfile = new URI(groovyscript).toURL();
977 } catch (Exception x)
979 tfile = new File(groovyscript);
982 System.err.println("File '" + groovyscript + "' does not exist.");
985 if (!tfile.canRead())
987 System.err.println("File '" + groovyscript + "' cannot be read.");
990 if (tfile.length() < 1)
992 System.err.println("File '" + groovyscript + "' is empty.");
997 sfile = tfile.getAbsoluteFile().toURI().toURL();
998 } catch (Exception ex)
1000 System.err.println("Failed to create a file URL for "
1001 + tfile.getAbsoluteFile());
1008 Map<String, java.lang.Object> vbinding = new HashMap<>();
1009 vbinding.put("Jalview", this);
1012 vbinding.put("currentAlFrame", af);
1014 Binding gbinding = new Binding(vbinding);
1015 GroovyScriptEngine gse = new GroovyScriptEngine(new URL[] { sfile });
1016 gse.run(sfile.toString(), gbinding);
1017 if ("STDIN".equals(groovyscript))
1019 // delete temp file that we made -
1020 // only if it was successfully executed
1023 } catch (Exception e)
1025 System.err.println("Exception Whilst trying to execute file " + sfile
1026 + " as a groovy script.");
1027 e.printStackTrace(System.err);
1032 public static boolean isHeadlessMode()
1034 String isheadless = System.getProperty("java.awt.headless");
1035 if (isheadless != null && isheadless.equalsIgnoreCase("true"))
1042 public AlignFrame[] getAlignFrames()
1044 return desktop == null ? new AlignFrame[] { getCurrentAlignFrame() }
1045 : Desktop.getAlignFrames();
1050 * Quit method delegates to Desktop.quit - unless running in headless mode when
1051 * it just ends the JVM
1055 if (desktop != null)
1065 public static AlignFrame getCurrentAlignFrame()
1067 return Jalview.currentAlignFrame;
1070 public static void setCurrentAlignFrame(AlignFrame currentAlignFrame)
1072 Jalview.currentAlignFrame = currentAlignFrame;