* features from the named sources (rather than any turned on by default)
*
* @param sources
+ * @param block if true then runs in same thread, otherwise passes to the Swing executor
*/
- public void fetchDasFeatures(Vector sources)
+ public void fetchDasFeatures(Vector sources, boolean block)
{
initDasSources();
Vector resolved = resolveSourceNicknames(sources);
if (resolved.size() > 0)
{
final Vector dassources = resolved;
- SwingUtilities.invokeLater(new Runnable()
+ fetchDAS.setEnabled(false);
+ // cancelDAS.setEnabled(true); doDasFetch does this.
+ Runnable fetcher=new Runnable()
{
public void run()
{
- fetchDAS.setEnabled(false);
- cancelDAS.setEnabled(true);
doDasFeatureFetch(dassources, true, false);
}
- });
+ };
+ if (block)
+ { fetcher.run();
+ } else {
+ SwingUtilities.invokeLater(fetcher);
+ }
}
}