2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3 * Copyright (C) 2014 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 java.awt.FlowLayout;
24 import java.awt.Frame;
25 import java.awt.event.ActionEvent;
26 import java.awt.event.ActionListener;
27 import java.io.BufferedReader;
29 import java.io.FileOutputStream;
30 import java.io.IOException;
31 import java.io.OutputStreamWriter;
32 import java.io.PrintWriter;
33 import java.lang.reflect.Constructor;
36 import java.net.URLDecoder;
37 import java.security.AllPermission;
38 import java.security.CodeSource;
39 import java.security.PermissionCollection;
40 import java.security.Permissions;
41 import java.security.Policy;
47 import jalview.util.Platform;
50 * Main class for Jalview Application <br>
52 * start with java -Djava.ext.dirs=$PATH_TO_LIB$ jalview.bin.Jalview
61 // grab all the rights we can the JVM
62 Policy.setPolicy(new Policy()
64 public PermissionCollection getPermissions(CodeSource codesource)
66 Permissions perms = new Permissions();
67 perms.add(new AllPermission());
78 * Put protein=true for get a protein example
80 private static boolean protein = false;
83 * main class for Jalview application
86 * open <em>filename</em>
88 public static void main(String[] args)
90 System.out.println("Java version: "
91 + System.getProperty("java.version"));
92 System.out.println(System.getProperty("os.arch") + " "
93 + System.getProperty("os.name") + " "
94 + System.getProperty("os.version"));
95 if (new Platform().isAMac())
97 System.setProperty("com.apple.mrj.application.apple.menu.about.name",
99 System.setProperty("apple.laf.useScreenMenuBar", "true");
102 ArgsParser aparser = new ArgsParser(args);
103 boolean headless = false;
105 if (aparser.contains("help") || aparser.contains("h"))
108 .println("Usage: jalview -open [FILE] [OUTPUT_FORMAT] [OUTPUT_FILE]\n\n"
109 + "-nodisplay\tRun Jalview without User Interface.\n"
110 + "-props FILE\tUse the given Jalview properties file instead of users default.\n"
111 + "-colour COLOURSCHEME\tThe colourscheme to be applied to the alignment\n"
112 + "-annotations FILE\tAdd precalculated annotations to the alignment.\n"
113 + "-tree FILE\tLoad the given newick format tree file onto the alignment\n"
114 + "-features FILE\tUse the given file to mark features on the alignment.\n"
115 + "-fasta FILE\tCreate alignment file FILE in Fasta format.\n"
116 + "-clustal FILE\tCreate alignment file FILE in Clustal format.\n"
117 + "-pfam FILE\tCreate alignment file FILE in PFAM format.\n"
118 + "-msf FILE\tCreate alignment file FILE in MSF format.\n"
119 + "-pileup FILE\tCreate alignment file FILE in Pileup format\n"
120 + "-pir FILE\tCreate alignment file FILE in PIR format.\n"
121 + "-blc FILE\tCreate alignment file FILE in BLC format.\n"
122 + "-jalview FILE\tCreate alignment file FILE in Jalview format.\n"
123 + "-png FILE\tCreate PNG image FILE from alignment.\n"
124 + "-imgMap FILE\tCreate HTML file FILE with image map of PNG image.\n"
125 + "-eps FILE\tCreate EPS file FILE from alignment.\n"
126 + "-questionnaire URL\tQueries the given URL for information about any Jalview user questionnaires.\n"
127 + "-noquestionnaire\tTurn off questionnaire check.\n"
128 + "-nousagestats\tTurn off google analytics tracking for this session.\n"
129 + "-sortbytree OR -nosortbytree\tEnable or disable sorting of the given alignment by the given tree\n"
131 // "-setprop PROPERTY=VALUE\tSet the given Jalview property, after all other properties files have been read\n\t (quote the 'PROPERTY=VALUE' pair to ensure spaces are passed in correctly)"
132 + "-dasserver nickname=URL\tAdd and enable a das server with given nickname\n\t\t\t(alphanumeric or underscores only) for retrieval of features for all alignments.\n"
133 + "\t\t\tSources that also support the sequence command may be specified by prepending the URL with sequence:\n"
134 + "\t\t\t e.g. sequence:http://localdas.somewhere.org/das/source)\n"
135 + "-fetchfrom nickname\tQuery nickname for features for the alignments and display them.\n"
137 // "-vdoc vamsas-document\tImport vamsas document into new session or join existing session with same URN\n"
138 // + "-vses vamsas-session\tJoin session with given URN\n"
139 + "-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"
140 + "\n~Read documentation in Application or visit http://www.jalview.org for description of Features and Annotations file~\n\n");
143 if (aparser.contains("nodisplay") || aparser.contains("nogui")
144 || aparser.contains("headless"))
146 System.setProperty("java.awt.headless", "true");
149 Cache.loadProperties(aparser.getValue("props")); // must do this before
151 String defs = aparser.getValue("setprop");
154 int p = defs.indexOf('=');
157 System.err.println("Ignoring invalid setprop argument : " + defs);
161 System.out.println("Executing setprop argument: " + defs);
162 // DISABLED FOR SECURITY REASONS
163 // TODO: add a property to allow properties to be overriden by cli args
164 // Cache.setProperty(defs.substring(0,p), defs.substring(p+1));
166 defs = aparser.getValue("setprop");
168 if (System.getProperty("java.awt.headless") != null
169 && System.getProperty("java.awt.headless").equals("true"))
173 System.setProperty("http.agent",
174 "Jalview Desktop/" + Cache.getDefault("VERSION", "Unknown"));
178 } catch (java.lang.NoClassDefFoundError error)
180 error.printStackTrace();
182 .println("\nEssential logging libraries not found."
183 + "\nUse: java -Djava.ext.dirs=$PATH_TO_LIB$ jalview.bin.Jalview");
187 Desktop desktop = null;
191 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
192 } catch (Exception ex)
198 desktop = new Desktop();
199 desktop.setInBatchMode(true); // indicate we are starting up
200 desktop.setVisible(true);
201 desktop.startServiceDiscovery();
202 if (!aparser.contains("nousagestats"))
204 startUsageStats(desktop);
206 if (!aparser.contains("noquestionnaire"))
208 String url = aparser.getValue("questionnaire");
211 // Start the desktop questionnaire prompter with the specified
213 Cache.log.debug("Starting questionnaire url at " + url);
214 desktop.checkForQuestionnaire(url);
218 if (Cache.getProperty("NOQUESTIONNAIRES") == null)
220 // Start the desktop questionnaire prompter with the specified
223 // "http://anaplog.compbio.dundee.ac.uk/cgi-bin/questionnaire.pl";
225 String defurl = "http://www.jalview.org/cgi-bin/questionnaire.pl";
226 Cache.log.debug("Starting questionnaire with default url: "
228 desktop.checkForQuestionnaire(defurl);
233 desktop.checkForNews();
236 String file = null, protocol = null, format = null, data = null;
237 jalview.io.FileLoader fileLoader = new jalview.io.FileLoader();
238 Vector getFeatures = null; // vector of das source nicknames to fetch
241 String groovyscript = null; // script to execute after all loading is
242 // completed one way or another
243 // extract groovy argument and execute if necessary
244 groovyscript = aparser.getValue("groovy", true);
245 file = aparser.getValue("open", true);
247 if (file == null && desktop == null)
249 System.out.println("No files to open!");
252 String vamsasImport = aparser.getValue("vdoc"), vamsasSession = aparser
254 if (vamsasImport != null || vamsasSession != null)
256 if (desktop == null || headless)
259 .println("Headless vamsas sessions not yet supported. Sorry.");
262 // if we have a file, start a new session and import it.
263 boolean inSession = false;
264 if (vamsasImport != null)
268 String viprotocol = jalview.io.AppletFormatAdapter
269 .checkProtocol(vamsasImport);
270 if (viprotocol == jalview.io.FormatAdapter.FILE)
272 inSession = desktop.vamsasImport(new File(vamsasImport));
274 else if (viprotocol == jalview.io.FormatAdapter.URL)
276 inSession = desktop.vamsasImport(new URL(vamsasImport));
279 } catch (Exception e)
281 System.err.println("Exeption when importing " + vamsasImport
282 + " as a vamsas document.");
287 System.err.println("Failed to import " + vamsasImport
288 + " as a vamsas document.");
292 System.out.println("Imported Successfully into new session "
293 + desktop.getVamsasApplication().getCurrentSession());
296 if (vamsasSession != null)
298 if (vamsasImport != null)
300 // close the newly imported session and import the Jalview specific
301 // remnants into the new session later on.
302 desktop.vamsasStop_actionPerformed(null);
304 // now join the new session
307 if (desktop.joinVamsasSession(vamsasSession))
309 System.out.println("Successfully joined vamsas session "
314 System.err.println("WARNING: Failed to join vamsas session "
317 } catch (Exception e)
319 System.err.println("ERROR: Failed to join vamsas session "
323 if (vamsasImport != null)
325 // the Jalview specific remnants can now be imported into the new
326 // session at the user's leisure.
328 .info("Skipping Push for import of data into existing vamsas session."); // TODO:
333 // desktop.getVamsasApplication().push_update();
338 // Finally, deal with the remaining input data.
343 desktop.setProgressBar("Processing commandline arguments...",
344 progress = System.currentTimeMillis());
346 System.out.println("Opening file: " + file);
348 if (!file.startsWith("http://"))
350 if (!(new java.io.File(file)).exists())
352 System.out.println("Can't find " + file);
360 protocol = jalview.io.AppletFormatAdapter.checkProtocol(file);
362 format = new jalview.io.IdentifyFile().Identify(file, protocol);
364 AlignFrame af = fileLoader.LoadFileWaitTillLoaded(file, protocol,
368 System.out.println("error");
373 data = aparser.getValue("colour", true);
376 data.replaceAll("%20", " ");
378 jalview.schemes.ColourSchemeI cs = jalview.schemes.ColourSchemeProperty
379 .getColour(af.getViewport().getAlignment(), data);
383 jalview.schemes.UserColourScheme ucs = new jalview.schemes.UserColourScheme(
385 ucs.parseAppletParameter(data);
389 System.out.println("colour is " + data);
393 // Must maintain ability to use the groups flag
394 data = aparser.getValue("groups", true);
397 af.parseFeaturesFile(data,
398 jalview.io.AppletFormatAdapter.checkProtocol(data));
399 System.out.println("Added " + data);
401 data = aparser.getValue("features", true);
404 af.parseFeaturesFile(data,
405 jalview.io.AppletFormatAdapter.checkProtocol(data));
406 System.out.println("Added " + data);
409 data = aparser.getValue("annotations", true);
412 af.loadJalviewDataFile(data, null, null, null);
413 System.out.println("Added " + data);
415 // set or clear the sortbytree flag.
416 if (aparser.contains("sortbytree"))
418 af.getViewport().setSortByTree(true);
420 if (aparser.contains("nosortbytree"))
422 af.getViewport().setSortByTree(false);
424 data = aparser.getValue("tree", true);
427 jalview.io.NewickFile fin = null;
430 fin = new jalview.io.NewickFile(data,
431 jalview.io.AppletFormatAdapter.checkProtocol(data));
434 af.getViewport().setCurrentTree(
435 af.ShowNewickTree(fin, data).getTree());
436 System.out.println("Added tree " + data);
438 } catch (IOException ex)
440 System.err.println("Couldn't add tree " + data);
441 ex.printStackTrace(System.err);
444 // TODO - load PDB structure(s) to alignment JAL-629
445 // (associate with identical sequence in alignment, or a specified
448 getFeatures = checkDasArguments(aparser);
449 if (af != null && getFeatures != null)
451 FeatureFetcher ff = startFeatureFetching(getFeatures);
453 while (!ff.allFinished() || af.operationInProgress())
455 // wait around until fetching is finished.
459 } catch (Exception e)
464 getFeatures = null; // have retrieved features - forget them now.
466 if (groovyscript != null)
468 // Execute the groovy script after we've done all the rendering stuff
469 // and before any images or figures are generated.
470 if (jalview.bin.Cache.groovyJarsPresent())
472 System.out.println("Executing script " + groovyscript);
473 executeGroovyScript(groovyscript, new Object[]
479 .println("Sorry. Groovy Support is not available, so ignoring the provided groovy script "
484 String imageName = "unnamed.png";
485 while (aparser.getSize() > 1)
487 format = aparser.nextValue();
488 file = aparser.nextValue();
490 if (format.equalsIgnoreCase("png"))
492 af.createPNG(new java.io.File(file));
493 imageName = (new java.io.File(file)).getName();
494 System.out.println("Creating PNG image: " + file);
497 else if (format.equalsIgnoreCase("imgMap"))
499 af.createImageMap(new java.io.File(file), imageName);
500 System.out.println("Creating image map: " + file);
503 else if (format.equalsIgnoreCase("eps"))
505 System.out.println("Creating EPS file: " + file);
506 af.createEPS(new java.io.File(file));
510 if (af.saveAlignment(file, format))
512 System.out.println("Written alignment in " + format
513 + " format to " + file);
517 System.out.println("Error writing file " + file + " in "
518 + format + " format!!");
523 while (aparser.getSize() > 0)
525 System.out.println("Unknown arg: " + aparser.nextValue());
529 AlignFrame startUpAlframe = null;
530 // We'll only open the default file if the desktop is visible.
532 // ////////////////////
534 if (!headless && file == null && vamsasImport == null
535 && jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true)
538 file = jalview.bin.Cache.getDefault(
540 jalview.bin.Cache.getDefault("www.jalview.org",
541 "http://www.jalview.org")
542 + "/examples/exampleFile_2_7.jar");
543 if (file.equals("http://www.jalview.org/examples/exampleFile_2_3.jar"))
545 // hardwire upgrade of the startup file
546 file.replace("_2_3.jar", "_2_7.jar");
547 // and remove the stale setting
548 jalview.bin.Cache.removeProperty("STARTUP_FILE");
553 if (file.indexOf("http:") > -1)
558 if (file.endsWith(".jar"))
564 format = new jalview.io.IdentifyFile().Identify(file, protocol);
567 startUpAlframe = fileLoader.LoadFileWaitTillLoaded(file, protocol,
569 getFeatures = checkDasArguments(aparser);
570 // extract groovy arguments before anything else.
572 // If the user has specified features to be retrieved,
573 // or a groovy script to be executed, do them if they
574 // haven't been done already
575 // fetch features for the default alignment
576 if (getFeatures != null)
578 if (startUpAlframe != null)
580 startFeatureFetching(getFeatures);
583 // Once all other stuff is done, execute any groovy scripts (in order)
584 if (groovyscript != null)
586 if (jalview.bin.Cache.groovyJarsPresent())
588 System.out.println("Executing script " + groovyscript);
589 executeGroovyScript(groovyscript, new Object[]
590 { desktop, startUpAlframe });
595 .println("Sorry. Groovy Support is not available, so ignoring the provided groovy script "
599 // and finally, turn off batch mode indicator - if the desktop still exists
604 desktop.setProgressBar(null, progress);
606 desktop.setInBatchMode(false);
610 private static void startUsageStats(final Desktop desktop)
613 * start a User Config prompt asking if we can log usage statistics.
615 jalview.gui.PromptUserConfig prompter = new jalview.gui.PromptUserConfig(
618 "Jalview Usage Statistics",
619 "Do you want to help make Jalview better by enabling "
620 + "the collection of usage statistics with Google Analytics ?"
621 + "\n\n(you can enable or disable usage tracking in the preferences)",
627 .info("Initialising googletracker for usage stats.");
628 Cache.initGoogleTracker();
629 Cache.log.debug("Tracking enabled.");
635 Cache.log.info("Not enabling Google Tracking.");
638 desktop.addDialogThread(prompter);
642 * Locate the given string as a file and pass it to the groovy interpreter.
644 * @param groovyscript
645 * the script to execute
646 * @param jalviewContext
647 * the Jalview Desktop object passed in to the groovy binding as the
650 private static void executeGroovyScript(String groovyscript,
651 Object[] jalviewContext)
653 if (jalviewContext == null)
656 .println("Sorry. Groovy support is currently only available when running with the Jalview GUI enabled.");
659 * for scripts contained in files
666 if (groovyscript.trim().equals("STDIN"))
668 // read from stdin into a tempfile and execute it
671 tfile = File.createTempFile("jalview", "groovy");
672 PrintWriter outfile = new PrintWriter(new OutputStreamWriter(
673 new FileOutputStream(tfile)));
674 BufferedReader br = new BufferedReader(
675 new java.io.InputStreamReader(System.in));
677 while ((line = br.readLine()) != null)
679 outfile.write(line + "\n");
685 } catch (Exception ex)
687 System.err.println("Failed to read from STDIN into tempfile "
688 + ((tfile == null) ? "(tempfile wasn't created)" : tfile
690 ex.printStackTrace();
695 sfile = tfile.toURI().toURL();
696 } catch (Exception x)
699 .println("Unexpected Malformed URL Exception for temporary file created from STDIN: "
709 sfile = new URI(groovyscript).toURL();
710 } catch (Exception x)
712 tfile = new File(groovyscript);
715 System.err.println("File '" + groovyscript + "' does not exist.");
718 if (!tfile.canRead())
720 System.err.println("File '" + groovyscript + "' cannot be read.");
723 if (tfile.length() < 1)
725 System.err.println("File '" + groovyscript + "' is empty.");
730 sfile = tfile.getAbsoluteFile().toURI().toURL();
731 } catch (Exception ex)
733 System.err.println("Failed to create a file URL for "
734 + tfile.getAbsoluteFile());
739 boolean success = false;
743 * The following code performs the GroovyScriptEngine invocation using
744 * reflection, and is equivalent to this fragment from the embedding
745 * groovy documentation on the groovy site: <code> import
746 * groovy.lang.Binding; import groovy.util.GroovyScriptEngine;
748 * String[] roots = new String[] { "/my/groovy/script/path" };
749 * GroovyScriptEngine gse = new GroovyScriptEngine(roots); Binding binding
750 * = new Binding(); binding.setVariable("input", "world");
751 * gse.run("hello.groovy", binding); </code>
755 int blen = ((jalviewContext[0] == null) ? 0 : 1)
756 + ((jalviewContext[1] == null) ? 0 : 1);
757 String cnames[] = new String[]
758 { "Jalview", "currentAlFrame" };
759 bspec = new Class[blen * 2];
760 binding = new Object[blen * 2];
762 ClassLoader cl = null;
763 Map vbinding = new Hashtable();
764 for (int jc = 0; jc < jalviewContext.length; jc++)
766 if (jalviewContext[jc] != null)
770 cl = jalviewContext[jc].getClass().getClassLoader();
772 bspec[blen * 2] = String.class;
773 bspec[blen * 2 + 1] = Object.class;
774 binding[blen * 2] = cnames[jc];
775 binding[blen * 2 + 1] = jalviewContext[jc];
776 vbinding.put(cnames[jc], jalviewContext[jc]);
780 Class gbindingc = cl.loadClass("groovy.lang.Binding");
785 gbcons = gbindingc.getConstructor(Map.class);
786 gbinding = gbcons.newInstance(vbinding);
787 } catch (NoSuchMethodException x)
789 // old style binding config - using series of string/object values to
791 gbcons = gbindingc.getConstructor(null);
792 gbinding = gbcons.newInstance(null);
793 java.lang.reflect.Method setvar = gbindingc.getMethod(
794 "setVariable", bspec);
795 setvar.invoke(gbinding, binding);
798 Class gsec = cl.loadClass("groovy.util.GroovyScriptEngine");
799 Constructor gseccons = gsec.getConstructor(new Class[]
800 { URL[].class }); // String[].class });
801 Object gse = gseccons.newInstance(new Object[]
803 { sfile } }); // .toString() } });
804 java.lang.reflect.Method run = gsec.getMethod("run", new Class[]
805 { String.class, gbindingc });
806 run.invoke(gse, new Object[]
807 { sfile.toString(), gbinding });
809 } catch (Exception e)
811 System.err.println("Exception Whilst trying to execute file " + sfile
812 + " as a groovy script.");
813 e.printStackTrace(System.err);
816 if (success && groovyscript.equals("STDIN"))
818 // delete temp file that we made - but only if it was successfully
825 * Check commandline for any das server definitions or any fetchfrom switches
827 * @return vector of DAS source nicknames to retrieve from
829 private static Vector checkDasArguments(ArgsParser aparser)
831 Vector source = null;
833 String locsources = Cache.getProperty(Cache.DAS_LOCAL_SOURCE);
834 while ((data = aparser.getValue("dasserver", true)) != null)
836 String nickname = null;
838 boolean seq = false, feat = true;
839 int pos = data.indexOf('=');
840 // determine capabilities
843 nickname = data.substring(0, pos);
845 url = data.substring(pos + 1);
847 && (url.startsWith("http:") || url
848 .startsWith("sequence:http:")))
850 if (nickname == null)
854 if (locsources == null)
862 locsources = locsources + nickname + "|" + url;
864 .println("NOTE! dasserver parameter not yet really supported (got args of "
865 + nickname + "|" + url);
868 source = new Vector();
870 source.addElement(nickname);
872 } // loop until no more server entries are found.
873 if (locsources != null && locsources.indexOf('|') > -1)
875 Cache.log.debug("Setting local source list in properties file to:\n"
877 Cache.setProperty(Cache.DAS_LOCAL_SOURCE, locsources);
879 while ((data = aparser.getValue("fetchfrom", true)) != null)
881 System.out.println("adding source '" + data + "'");
884 source = new Vector();
886 source.addElement(data);
892 * start a feature fetcher for every alignment frame
896 private static FeatureFetcher startFeatureFetching(final Vector dasSources)
898 FeatureFetcher ff = new FeatureFetcher();
899 AlignFrame afs[] = Desktop.getAlignframes();
900 if (afs == null || afs.length == 0)
904 for (int i = 0; i < afs.length; i++)
906 ff.addFetcher(afs[i], dasSources);
913 * Notes: this argParser does not distinguish between parameter switches,
914 * parameter values and argument text. If an argument happens to be identical to
915 * a parameter, it will be taken as such (even though it didn't have a '-'
918 * @author Andrew Waterhouse and JBP documented.
922 class rnabuttonlistener implements ActionListener
924 public void actionPerformed(ActionEvent arg0)
926 System.out.println("Good idea ! ");
931 class pbuttonlistener implements ActionListener
933 public void actionPerformed(ActionEvent arg0)
943 public ArgsParser(String[] args)
945 vargs = new Vector();
946 for (int i = 0; i < args.length; i++)
948 String arg = args[i].trim();
949 if (arg.charAt(0) == '-')
951 arg = arg.substring(1);
953 vargs.addElement(arg);
958 * check for and remove first occurence of arg+parameter in arglist.
961 * @return return the argument following the given arg if arg was in list.
963 public String getValue(String arg)
965 return getValue(arg, false);
968 public String getValue(String arg, boolean utf8decode)
970 int index = vargs.indexOf(arg);
971 String dc = null, ret = null;
974 ret = vargs.elementAt(index + 1).toString();
975 vargs.removeElementAt(index);
976 vargs.removeElementAt(index);
977 if (utf8decode && ret != null)
981 dc = URLDecoder.decode(ret, "UTF-8");
983 } catch (Exception e)
985 // TODO: log failure to decode
993 * check for and remove first occurence of arg in arglist.
996 * @return true if arg was present in argslist.
998 public boolean contains(String arg)
1000 if (vargs.contains(arg))
1002 vargs.removeElement(arg);
1011 public String nextValue()
1013 return vargs.remove(0).toString();
1016 public int getSize()
1018 return vargs.size();
1024 * keep track of feature fetching tasks.
1029 class FeatureFetcher
1032 * TODO: generalise to track all jalview events to orchestrate batch
1033 * processing events.
1036 private int queued = 0;
1038 private int running = 0;
1040 public FeatureFetcher()
1045 public void addFetcher(final AlignFrame af, final Vector dasSources)
1047 final long id = System.currentTimeMillis();
1049 final FeatureFetcher us = this;
1050 new Thread(new Runnable()
1061 af.setProgressBar("DAS features being retrieved...", id);
1062 af.featureSettings_actionPerformed(null);
1063 af.featureSettings.fetchDasFeatures(dasSources, true);
1064 af.setProgressBar(null, id);
1073 public synchronized boolean allFinished()
1075 return queued == 0 && running == 0;