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 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 import java.awt.FlowLayout;
22 import java.awt.Frame;
23 import java.awt.event.ActionEvent;
24 import java.awt.event.ActionListener;
25 import java.io.BufferedReader;
27 import java.io.FileOutputStream;
28 import java.io.IOException;
29 import java.io.OutputStreamWriter;
30 import java.io.PrintWriter;
31 import java.lang.reflect.Constructor;
34 import java.net.URLDecoder;
35 import java.security.AllPermission;
36 import java.security.CodeSource;
37 import java.security.PermissionCollection;
38 import java.security.Permissions;
39 import java.security.Policy;
45 import jalview.util.Platform;
48 * Main class for Jalview Application <br>
50 * start with java -Djava.ext.dirs=$PATH_TO_LIB$ jalview.bin.Jalview
59 // grab all the rights we can the JVM
60 Policy.setPolicy(new Policy()
62 public PermissionCollection getPermissions(CodeSource codesource)
64 Permissions perms = new Permissions();
65 perms.add(new AllPermission());
75 * Put protein=true for get a protein example
77 private static boolean protein=false;
81 * main class for Jalview application
84 * open <em>filename</em>
86 public static void main(String[] args)
88 System.out.println("Java version: "
89 + System.getProperty("java.version"));
90 System.out.println(System.getProperty("os.arch") + " "
91 + System.getProperty("os.name") + " "
92 + System.getProperty("os.version"));
93 if (new Platform().isAMac())
95 System.setProperty("com.apple.mrj.application.apple.menu.about.name",
97 System.setProperty("apple.laf.useScreenMenuBar", "true");
100 ArgsParser aparser = new ArgsParser(args);
101 boolean headless = false;
103 if (aparser.contains("help") || aparser.contains("h"))
106 .println("Usage: jalview -open [FILE] [OUTPUT_FORMAT] [OUTPUT_FILE]\n\n"
107 + "-nodisplay\tRun Jalview without User Interface.\n"
108 + "-props FILE\tUse the given Jalview properties file instead of users default.\n"
109 + "-colour COLOURSCHEME\tThe colourscheme to be applied to the alignment\n"
110 + "-annotations FILE\tAdd precalculated annotations to the alignment.\n"
111 + "-tree FILE\tLoad the given newick format tree file onto the alignment\n"
112 + "-features FILE\tUse the given file to mark features on the alignment.\n"
113 + "-fasta FILE\tCreate alignment file FILE in Fasta format.\n"
114 + "-clustal FILE\tCreate alignment file FILE in Clustal format.\n"
115 + "-pfam FILE\tCreate alignment file FILE in PFAM format.\n"
116 + "-msf FILE\tCreate alignment file FILE in MSF format.\n"
117 + "-pileup FILE\tCreate alignment file FILE in Pileup format\n"
118 + "-pir FILE\tCreate alignment file FILE in PIR format.\n"
119 + "-blc FILE\tCreate alignment file FILE in BLC format.\n"
120 + "-jalview FILE\tCreate alignment file FILE in Jalview format.\n"
121 + "-png FILE\tCreate PNG image FILE from alignment.\n"
122 + "-imgMap FILE\tCreate HTML file FILE with image map of PNG image.\n"
123 + "-eps FILE\tCreate EPS file FILE from alignment.\n"
124 + "-questionnaire URL\tQueries the given URL for information about any Jalview user questionnaires.\n"
125 + "-noquestionnaire\tTurn off questionnaire check.\n"
126 + "-nousagestats\tTurn off google analytics tracking for this session.\n"
127 + "-sortbytree OR -nosortbytree\tEnable or disable sorting of the given alignment by the given tree\n"
129 // "-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)"
130 + "-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"
131 + "\t\t\tSources that also support the sequence command may be specified by prepending the URL with sequence:\n"
132 + "\t\t\t e.g. sequence:http://localdas.somewhere.org/das/source)\n"
133 + "-fetchfrom nickname\tQuery nickname for features for the alignments and display them.\n"
135 // "-vdoc vamsas-document\tImport vamsas document into new session or join existing session with same URN\n"
136 // + "-vses vamsas-session\tJoin session with given URN\n"
137 + "-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"
138 + "\n~Read documentation in Application or visit http://www.jalview.org for description of Features and Annotations file~\n\n");
141 if (aparser.contains("nodisplay") || aparser.contains("nogui") || aparser.contains("headless"))
143 System.setProperty("java.awt.headless", "true");
146 Cache.loadProperties(aparser.getValue("props")); // must do this before
148 String defs = aparser.getValue("setprop");
151 int p = defs.indexOf('=');
154 System.err.println("Ignoring invalid setprop argument : " + defs);
158 System.out.println("Executing setprop argument: " + defs);
159 // DISABLED FOR SECURITY REASONS
160 // TODO: add a property to allow properties to be overriden by cli args
161 // Cache.setProperty(defs.substring(0,p), defs.substring(p+1));
163 defs = aparser.getValue("setprop");
165 if (System.getProperty("java.awt.headless") != null
166 && System.getProperty("java.awt.headless").equals("true"))
170 System.setProperty("http.agent", "Jalview Desktop/"+Cache.getDefault("VERSION", "Unknown"));
174 } catch (java.lang.NoClassDefFoundError error)
176 error.printStackTrace();
178 .println("\nEssential logging libraries not found."
179 + "\nUse: java -Djava.ext.dirs=$PATH_TO_LIB$ jalview.bin.Jalview");
183 Desktop desktop = null;
187 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
188 } catch (Exception ex)
194 desktop = new Desktop();
195 desktop.setInBatchMode(true); // indicate we are starting up
196 desktop.setVisible(true);
197 desktop.startServiceDiscovery();
198 if (!aparser.contains("nousagestats"))
200 startUsageStats(desktop);
202 if (!aparser.contains("noquestionnaire"))
204 String url = aparser.getValue("questionnaire");
207 // Start the desktop questionnaire prompter with the specified
209 Cache.log.debug("Starting questionnaire url at " + url);
210 desktop.checkForQuestionnaire(url);
214 if (Cache.getProperty("NOQUESTIONNAIRES") == null)
216 // Start the desktop questionnaire prompter with the specified
219 // "http://anaplog.compbio.dundee.ac.uk/cgi-bin/questionnaire.pl";
221 String defurl = "http://www.jalview.org/cgi-bin/questionnaire.pl";
222 Cache.log.debug("Starting questionnaire with default url: "
224 desktop.checkForQuestionnaire(defurl);
229 desktop.checkForNews();
232 String file = null, protocol = null, format = null, data = null;
233 jalview.io.FileLoader fileLoader = new jalview.io.FileLoader();
234 Vector getFeatures = null; // vector of das source nicknames to fetch
237 String groovyscript = null; // script to execute after all loading is
238 // completed one way or another
239 // extract groovy argument and execute if necessary
240 groovyscript = aparser.getValue("groovy", true);
241 file = aparser.getValue("open", true);
243 if (file == null && desktop == null)
245 System.out.println("No files to open!");
248 String vamsasImport = aparser.getValue("vdoc"), vamsasSession = aparser
250 if (vamsasImport != null || vamsasSession != null)
252 if (desktop == null || headless)
255 .println("Headless vamsas sessions not yet supported. Sorry.");
258 // if we have a file, start a new session and import it.
259 boolean inSession = false;
260 if (vamsasImport != null)
264 String viprotocol = jalview.io.AppletFormatAdapter
265 .checkProtocol(vamsasImport);
266 if (viprotocol == jalview.io.FormatAdapter.FILE)
268 inSession = desktop.vamsasImport(new File(vamsasImport));
270 else if (viprotocol == jalview.io.FormatAdapter.URL)
272 inSession = desktop.vamsasImport(new URL(vamsasImport));
275 } catch (Exception e)
277 System.err.println("Exeption when importing " + vamsasImport
278 + " as a vamsas document.");
283 System.err.println("Failed to import " + vamsasImport
284 + " as a vamsas document.");
288 System.out.println("Imported Successfully into new session "
289 + desktop.getVamsasApplication().getCurrentSession());
292 if (vamsasSession != null)
294 if (vamsasImport != null)
296 // close the newly imported session and import the Jalview specific
297 // remnants into the new session later on.
298 desktop.vamsasStop_actionPerformed(null);
300 // now join the new session
303 if (desktop.joinVamsasSession(vamsasSession))
305 System.out.println("Successfully joined vamsas session "
310 System.err.println("WARNING: Failed to join vamsas session "
313 } catch (Exception e)
315 System.err.println("ERROR: Failed to join vamsas session "
319 if (vamsasImport != null)
321 // the Jalview specific remnants can now be imported into the new
322 // session at the user's leisure.
324 .info("Skipping Push for import of data into existing vamsas session."); // TODO:
329 // desktop.getVamsasApplication().push_update();
334 // Finally, deal with the remaining input data.
339 desktop.setProgressBar("Processing commandline arguments...",
340 progress = System.currentTimeMillis());
342 System.out.println("Opening file: " + file);
344 if (!file.startsWith("http://"))
346 if (!(new java.io.File(file)).exists())
348 System.out.println("Can't find " + file);
356 protocol = jalview.io.AppletFormatAdapter.checkProtocol(file);
358 format = new jalview.io.IdentifyFile().Identify(file, protocol);
360 AlignFrame af = fileLoader.LoadFileWaitTillLoaded(file, protocol,
364 System.out.println("error");
369 data = aparser.getValue("colour", true);
372 data.replaceAll("%20", " ");
374 jalview.schemes.ColourSchemeI cs = jalview.schemes.ColourSchemeProperty
375 .getColour(af.getViewport().getAlignment(), data);
379 jalview.schemes.UserColourScheme ucs = new jalview.schemes.UserColourScheme(
381 ucs.parseAppletParameter(data);
385 System.out.println("colour is " + data);
389 // Must maintain ability to use the groups flag
390 data = aparser.getValue("groups", true);
393 af.parseFeaturesFile(data,
394 jalview.io.AppletFormatAdapter.checkProtocol(data));
395 System.out.println("Added " + data);
397 data = aparser.getValue("features", true);
400 af.parseFeaturesFile(data,
401 jalview.io.AppletFormatAdapter.checkProtocol(data));
402 System.out.println("Added " + data);
405 data = aparser.getValue("annotations", true);
408 af.loadJalviewDataFile(data, null, null, null);
409 System.out.println("Added " + data);
411 // set or clear the sortbytree flag.
412 if (aparser.contains("sortbytree"))
414 af.getViewport().setSortByTree(true);
416 if (aparser.contains("nosortbytree"))
418 af.getViewport().setSortByTree(false);
420 data = aparser.getValue("tree", true);
423 jalview.io.NewickFile fin = null;
426 fin = new jalview.io.NewickFile(data,
427 jalview.io.AppletFormatAdapter.checkProtocol(data));
430 af.getViewport().setCurrentTree(
431 af.ShowNewickTree(fin, data).getTree());
432 System.out.println("Added tree " + data);
434 } catch (IOException ex)
436 System.err.println("Couldn't add tree " + data);
437 ex.printStackTrace(System.err);
440 // TODO - load PDB structure(s) to alignment JAL-629
441 // (associate with identical sequence in alignment, or a specified
444 getFeatures = checkDasArguments(aparser);
445 if (af != null && getFeatures != null)
447 FeatureFetcher ff = startFeatureFetching(getFeatures);
449 while (!ff.allFinished() || af.operationInProgress())
451 // wait around until fetching is finished.
455 } catch (Exception e)
460 getFeatures = null; // have retrieved features - forget them now.
462 if (groovyscript != null)
464 // Execute the groovy script after we've done all the rendering stuff
465 // and before any images or figures are generated.
466 if (jalview.bin.Cache.groovyJarsPresent())
468 System.out.println("Executing script " + groovyscript);
469 executeGroovyScript(groovyscript, new Object[]
475 .println("Sorry. Groovy Support is not available, so ignoring the provided groovy script "
480 String imageName = "unnamed.png";
481 while (aparser.getSize() > 1)
483 format = aparser.nextValue();
484 file = aparser.nextValue();
486 if (format.equalsIgnoreCase("png"))
488 af.createPNG(new java.io.File(file));
489 imageName = (new java.io.File(file)).getName();
490 System.out.println("Creating PNG image: " + file);
493 else if (format.equalsIgnoreCase("imgMap"))
495 af.createImageMap(new java.io.File(file), imageName);
496 System.out.println("Creating image map: " + file);
499 else if (format.equalsIgnoreCase("eps"))
501 System.out.println("Creating EPS file: " + file);
502 af.createEPS(new java.io.File(file));
506 if (af.saveAlignment(file, format))
508 System.out.println("Written alignment in " + format
509 + " format to " + file);
513 System.out.println("Error writing file " + file + " in "
514 + format + " format!!");
519 while (aparser.getSize() > 0)
521 System.out.println("Unknown arg: " + aparser.nextValue());
525 AlignFrame startUpAlframe = null;
526 // We'll only open the default file if the desktop is visible.
528 // ////////////////////
536 if (!headless && file == null && vamsasImport == null
537 && jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true) && protein == true)
539 file = jalview.bin.Cache.getDefault(
541 jalview.bin.Cache.getDefault("www.jalview.org",
542 "http://www.jalview.org")
543 + "/examples/exampleFile_2_7.jar");
544 if (file.equals("http://www.jalview.org/examples/exampleFile_2_3.jar"))
546 // hardwire upgrade of the startup file
547 file.replace("_2_3.jar", "_2_7.jar");
548 // and remove the stale setting
549 jalview.bin.Cache.removeProperty("STARTUP_FILE");
554 if (file.indexOf("http:") > -1)
559 if (file.endsWith(".jar"))
565 format = new jalview.io.IdentifyFile().Identify(file, protocol);
568 startUpAlframe = fileLoader.LoadFileWaitTillLoaded(file, protocol,
570 getFeatures = checkDasArguments(aparser);
571 // extract groovy arguments before anything else.
573 // If the user has specified features to be retrieved,
574 // or a groovy script to be executed, do them if they
575 // haven't been done already
576 // fetch features for the default alignment
577 if (getFeatures != null)
579 if (startUpAlframe != null)
581 startFeatureFetching(getFeatures);
584 // Once all other stuff is done, execute any groovy scripts (in order)
585 if (groovyscript != null)
587 if (jalview.bin.Cache.groovyJarsPresent())
589 System.out.println("Executing script " + groovyscript);
590 executeGroovyScript(groovyscript, new Object[]
591 { desktop, startUpAlframe });
596 .println("Sorry. Groovy Support is not available, so ignoring the provided groovy script "
600 // and finally, turn off batch mode indicator - if the desktop still exists
605 desktop.setProgressBar(null, progress);
607 desktop.setInBatchMode(false);
612 private static void startUsageStats(final Desktop desktop)
615 * start a User Config prompt asking if we can log usage statistics.
617 jalview.gui.PromptUserConfig prompter = new jalview.gui.PromptUserConfig(
620 "Jalview Usage Statistics",
621 "Do you want to help make Jalview better by enabling "
622 + "the collection of usage statistics with Google Analytics ?"
623 + "\n\n(you can enable or disable usage tracking in the preferences)",
629 .info("Initialising googletracker for usage stats.");
630 Cache.initGoogleTracker();
631 Cache.log.debug("Tracking enabled.");
637 Cache.log.info("Not enabling Google Tracking.");
640 desktop.addDialogThread(prompter);
644 * Locate the given string as a file and pass it to the groovy interpreter.
646 * @param groovyscript
647 * the script to execute
648 * @param jalviewContext
649 * the Jalview Desktop object passed in to the groovy binding as the
652 private static void executeGroovyScript(String groovyscript,
653 Object[] jalviewContext)
655 if (jalviewContext == null)
658 .println("Sorry. Groovy support is currently only available when running with the Jalview GUI enabled.");
661 * for scripts contained in files
668 if (groovyscript.trim().equals("STDIN"))
670 // read from stdin into a tempfile and execute it
673 tfile = File.createTempFile("jalview", "groovy");
674 PrintWriter outfile = new PrintWriter(new OutputStreamWriter(
675 new FileOutputStream(tfile)));
676 BufferedReader br = new BufferedReader(
677 new java.io.InputStreamReader(System.in));
679 while ((line = br.readLine()) != null)
681 outfile.write(line + "\n");
687 } catch (Exception ex)
689 System.err.println("Failed to read from STDIN into tempfile "
690 + ((tfile == null) ? "(tempfile wasn't created)" : tfile
692 ex.printStackTrace();
697 sfile = tfile.toURI().toURL();
698 } catch (Exception x)
701 .println("Unexpected Malformed URL Exception for temporary file created from STDIN: "
711 sfile = new URI(groovyscript).toURL();
712 } catch (Exception x)
714 tfile = new File(groovyscript);
717 System.err.println("File '" + groovyscript + "' does not exist.");
720 if (!tfile.canRead())
722 System.err.println("File '" + groovyscript + "' cannot be read.");
725 if (tfile.length() < 1)
727 System.err.println("File '" + groovyscript + "' is empty.");
732 sfile = tfile.getAbsoluteFile().toURI().toURL();
733 } catch (Exception ex)
735 System.err.println("Failed to create a file URL for "
736 + tfile.getAbsoluteFile());
741 boolean success = false;
745 * The following code performs the GroovyScriptEngine invocation using
746 * reflection, and is equivalent to this fragment from the embedding
747 * groovy documentation on the groovy site: <code> import
748 * groovy.lang.Binding; import groovy.util.GroovyScriptEngine;
750 * String[] roots = new String[] { "/my/groovy/script/path" };
751 * GroovyScriptEngine gse = new GroovyScriptEngine(roots); Binding binding
752 * = new Binding(); binding.setVariable("input", "world");
753 * gse.run("hello.groovy", binding); </code>
757 int blen = ((jalviewContext[0] == null) ? 0 : 1)
758 + ((jalviewContext[1] == null) ? 0 : 1);
759 String cnames[] = new String[]
760 { "Jalview", "currentAlFrame" };
761 bspec = new Class[blen * 2];
762 binding = new Object[blen * 2];
764 ClassLoader cl = null;
765 Map vbinding = new Hashtable();
766 for (int jc = 0; jc < jalviewContext.length; jc++)
768 if (jalviewContext[jc] != null)
772 cl = jalviewContext[jc].getClass().getClassLoader();
774 bspec[blen * 2] = String.class;
775 bspec[blen * 2 + 1] = Object.class;
776 binding[blen * 2] = cnames[jc];
777 binding[blen * 2 + 1] = jalviewContext[jc];
778 vbinding.put(cnames[jc], jalviewContext[jc]);
782 Class gbindingc = cl.loadClass("groovy.lang.Binding");
787 gbcons = gbindingc.getConstructor(Map.class);
788 gbinding = gbcons.newInstance(vbinding);
789 } catch (NoSuchMethodException x)
791 // old style binding config - using series of string/object values to
793 gbcons = gbindingc.getConstructor(null);
794 gbinding = gbcons.newInstance(null);
795 java.lang.reflect.Method setvar = gbindingc.getMethod(
796 "setVariable", bspec);
797 setvar.invoke(gbinding, binding);
800 Class gsec = cl.loadClass("groovy.util.GroovyScriptEngine");
801 Constructor gseccons = gsec.getConstructor(new Class[]
802 { URL[].class }); // String[].class });
803 Object gse = gseccons.newInstance(new Object[]
805 { sfile } }); // .toString() } });
806 java.lang.reflect.Method run = gsec.getMethod("run", new Class[]
807 { String.class, gbindingc });
808 run.invoke(gse, new Object[]
809 { sfile.toString(), gbinding });
811 } catch (Exception e)
813 System.err.println("Exception Whilst trying to execute file " + sfile
814 + " as a groovy script.");
815 e.printStackTrace(System.err);
818 if (success && groovyscript.equals("STDIN"))
820 // delete temp file that we made - but only if it was successfully
827 * Check commandline for any das server definitions or any fetchfrom switches
829 * @return vector of DAS source nicknames to retrieve from
831 private static Vector checkDasArguments(ArgsParser aparser)
833 Vector source = null;
835 String locsources = Cache.getProperty(Cache.DAS_LOCAL_SOURCE);
836 while ((data = aparser.getValue("dasserver", true)) != null)
838 String nickname = null;
840 boolean seq = false, feat = true;
841 int pos = data.indexOf('=');
842 // determine capabilities
845 nickname = data.substring(0, pos);
847 url = data.substring(pos + 1);
849 && (url.startsWith("http:") || url
850 .startsWith("sequence:http:")))
852 if (nickname == null)
856 if (locsources == null)
864 locsources = locsources + nickname + "|" + url;
866 .println("NOTE! dasserver parameter not yet really supported (got args of "
867 + nickname + "|" + url);
870 source = new Vector();
872 source.addElement(nickname);
874 } // loop until no more server entries are found.
875 if (locsources != null && locsources.indexOf('|') > -1)
877 Cache.log.debug("Setting local source list in properties file to:\n"
879 Cache.setProperty(Cache.DAS_LOCAL_SOURCE, locsources);
881 while ((data = aparser.getValue("fetchfrom", true)) != null)
883 System.out.println("adding source '" + data + "'");
886 source = new Vector();
888 source.addElement(data);
894 * start a feature fetcher for every alignment frame
898 private static FeatureFetcher startFeatureFetching(final Vector dasSources)
900 FeatureFetcher ff = new FeatureFetcher();
901 AlignFrame afs[] = Desktop.getAlignframes();
902 if (afs == null || afs.length == 0)
906 for (int i = 0; i < afs.length; i++)
908 ff.addFetcher(afs[i], dasSources);
915 * Notes: this argParser does not distinguish between parameter switches,
916 * parameter values and argument text. If an argument happens to be identical to
917 * a parameter, it will be taken as such (even though it didn't have a '-'
920 * @author Andrew Waterhouse and JBP documented.
924 class rnabuttonlistener implements ActionListener{
925 public void actionPerformed(ActionEvent arg0) {
926 System.out.println("Good idea ! ");
931 class pbuttonlistener implements ActionListener{
932 public void actionPerformed(ActionEvent arg0) {
942 public ArgsParser(String[] args)
944 vargs = new Vector();
945 for (int i = 0; i < args.length; i++)
947 String arg = args[i].trim();
948 if (arg.charAt(0) == '-')
950 arg = arg.substring(1);
952 vargs.addElement(arg);
957 * check for and remove first occurence of arg+parameter in arglist.
960 * @return return the argument following the given arg if arg was in list.
962 public String getValue(String arg)
964 return getValue(arg, false);
967 public String getValue(String arg, boolean utf8decode)
969 int index = vargs.indexOf(arg);
970 String dc = null, ret = null;
973 ret = vargs.elementAt(index + 1).toString();
974 vargs.removeElementAt(index);
975 vargs.removeElementAt(index);
976 if (utf8decode && ret != null)
980 dc = URLDecoder.decode(ret, "UTF-8");
982 } catch (Exception e)
984 // TODO: log failure to decode
992 * check for and remove first occurence of arg in arglist.
995 * @return true if arg was present in argslist.
997 public boolean contains(String arg)
999 if (vargs.contains(arg))
1001 vargs.removeElement(arg);
1010 public String nextValue()
1012 return vargs.remove(0).toString();
1015 public int getSize()
1017 return vargs.size();
1023 * keep track of feature fetching tasks.
1028 class FeatureFetcher
1031 * TODO: generalise to track all jalview events to orchestrate batch
1032 * processing events.
1035 private int queued = 0;
1037 private int running = 0;
1039 public FeatureFetcher()
1044 public void addFetcher(final AlignFrame af, final Vector dasSources)
1046 final long id = System.currentTimeMillis();
1048 final FeatureFetcher us = this;
1049 new Thread(new Runnable()
1060 af.setProgressBar("DAS features being retrieved...", id);
1061 af.featureSettings_actionPerformed(null);
1062 af.featureSettings.fetchDasFeatures(dasSources, true);
1063 af.setProgressBar(null, id);
1072 public synchronized boolean allFinished()
1074 return queued == 0 && running == 0;