return registry;\r
}\r
\r
- public DasSourceBrowser()\r
+ public DasSourceBrowser(FeatureSettings featureSettings)\r
{\r
+ fs = featureSettings;\r
String registry = getDasRegistryURL();\r
\r
registryURL.setText(registry);\r
init();\r
}\r
}\r
+ FeatureSettings fs = null;\r
+ public DasSourceBrowser()\r
+ {\r
+ this(null);\r
+ }\r
\r
public void paintComponent(java.awt.Graphics g)\r
{\r
refresh.setVisible(false);\r
progressBar.setVisible(true);\r
progressBar.setIndeterminate(true);\r
+ setParentGuiEnabled(false);\r
// Refresh the source list.\r
dasSources = null;\r
getDASSource();\r
\r
init();\r
\r
+ setParentGuiEnabled(true);\r
loadingDasSources = false;\r
\r
}\r
\r
+ private void setParentGuiEnabled(boolean b)\r
+ {\r
+ if (fs!=null)\r
+ {\r
+ fs.fetchDAS.setEnabled(b);\r
+ fs.saveDAS.setEnabled(b);\r
+ }\r
+ }\r
+\r
public Vector getSelectedSources()\r
{\r
// wait around if we're still loading.\r
}\r
return resolved;\r
}\r
+\r
+ /**\r
+ * disable or enable the buttons on the source browser\r
+ * @param b\r
+ */\r
+ public void setGuiEnabled(boolean b)\r
+ {\r
+ refresh.setEnabled(b);\r
+ addLocal.setEnabled(b);\r
+ }\r
}\r
scrollPane.setViewportView(table);
- dassourceBrowser = new DasSourceBrowser();
+ dassourceBrowser = new DasSourceBrowser(this);
dasSettingsPane.add(dassourceBrowser, BorderLayout.CENTER);
if (af.getViewport().featuresDisplayed == null
javax.swing.event.InternalFrameEvent evt)
{
fr.removePropertyChangeListener(change);
+ dassourceBrowser.fs = null;
};
});
frame.setLayer(JLayeredPane.PALETTE_LAYER);
{
fetchDAS.setEnabled(false);
cancelDAS.setEnabled(true);
+ dassourceBrowser.setGuiEnabled(false);
Vector selectedSources = dassourceBrowser.getSelectedSources();
doDasFeatureFetch(selectedSources, true, true);
}
{
fetchDAS.setEnabled(true);
cancelDAS.setEnabled(false);
+ dassourceBrowser.setGuiEnabled(true);
+
}
public void cancelDAS_actionPerformed(ActionEvent e)
{
dasFeatureFetcher.cancel();
}
- fetchDAS.setEnabled(true);
- cancelDAS.setEnabled(false);
+ complete();
}
public void noDasSourceActive()