|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.idv.ui.DataSourceHolder
ucar.unidata.idv.ui.DataSelector
public class DataSelector
This class provides facilities for managing
a collection of DataSource,
DataCategory and
DataChoice
in a selection GUI.
It holds a list of DataSources. For each DataSource
there is a DataTree that shows the
DataChoices of the DataSource. There is a list of
ControlDescriptor-s
that are shown in the DataControlDialog
| Nested Class Summary | |
|---|---|
static class |
DataSelector.DataSourceWrapper
Class DataSourceWrapper Holds the selector gui for a data source |
| Field Summary | |
|---|---|
static Color |
COLOR_BADSEARCH
Color for failed search |
| Fields inherited from class ucar.unidata.idv.ui.DataSourceHolder |
|---|
formulaDataSource, frame, idv, treatFormulaDataSourceSpecial |
| Constructor Summary | |
|---|---|
DataSelector(IntegratedDataViewer idv,
boolean horizontalOrientation,
DataSource formulaDataSource)
Create a DataSelector with the given idv and lsit of formulas |
|
DataSelector(IntegratedDataViewer idv,
DataSource formulaDataSource)
Create a DataSelector with the given idv and lsit of formulas |
|
DataSelector(IntegratedDataViewer idv,
Dimension defaultSize,
boolean singletonDataSource)
Create a DataSelector with the given idv and list of formulas |
|
| Method Summary | |
|---|---|
void |
addDataSource(DataSource dataSource)
Add the DataSource and its
DataChoice-s into the gui |
void |
dataSourceChanged(DataSource dataSource)
The given data source has changed. |
void |
dataSourceTimeChanged(DataSource dataSource)
Change the gui when the given data source has changed. |
void |
displayTemplatesChanged()
Be notified of a change to the display templates |
void |
dispose()
Remove all references to anything we may have. |
JComponent |
getButtons()
Return the JComponent that holds the Create and Close buttons. |
JComponent |
getContents()
Return the GUI contents |
static String |
getNameForDataSource(DataSource ds)
A helper method to find the label to use for the given DataSource. |
static String |
getNameForDataSource(DataSource ds,
int length,
boolean alwaysDoIt)
A helper method to find the label to use for the given DataSource. |
protected boolean |
removeDataSourceInner(DataSource dataSource)
Remove the specified data source only if it is not the formulaDataSource. |
void |
setDataSource(DataSource dataSource)
Set the data source shown by this selector |
| Methods inherited from class ucar.unidata.idv.ui.DataSourceHolder |
|---|
addDisplayControl, addDisplayControl, doClose, doMakeFrame, getDataSources, getDerivedIcon, getFrame, getIdv, getLocationOnScreen, getName, removeAllDataSources, removeDataSource, removeDisplayControl, setDefaultSize, setFrame, show |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Color COLOR_BADSEARCH
| Constructor Detail |
|---|
public DataSelector(IntegratedDataViewer idv,
DataSource formulaDataSource)
idv - The IDVformulaDataSource - Contains the end-user formulas
public DataSelector(IntegratedDataViewer idv,
boolean horizontalOrientation,
DataSource formulaDataSource)
idv - The IDVhorizontalOrientation - Should this be configured with normal dimensionsformulaDataSource - Contains the end-user formulas
public DataSelector(IntegratedDataViewer idv,
Dimension defaultSize,
boolean singletonDataSource)
idv - The IDVdefaultSize - Size of the windowsingletonDataSource - Does this dialog just show one data source| Method Detail |
|---|
public void setDataSource(DataSource dataSource)
dataSource - The data sourcepublic JComponent getContents()
getContents in class DataSourceHolderpublic JComponent getButtons()
getButtons in class DataSourceHolderpublic void dispose()
dispose in class DataSourceHolderprotected boolean removeDataSourceInner(DataSource dataSource)
removeDataSourceInner in class DataSourceHolderdataSource - The data source to remove
public void displayTemplatesChanged()
displayTemplatesChanged in class DataSourceHolderpublic void dataSourceTimeChanged(DataSource dataSource)
IntegratedDataViewer
When one of the DataControlDialog-s changes the
times on the data source.
dataSourceTimeChanged in class DataSourceHolderdataSource - The data source that changedpublic void dataSourceChanged(DataSource dataSource)
dataSourceChanged in class DataSourceHolderdataSource - The data source that changedpublic void addDataSource(DataSource dataSource)
DataSource and its
DataChoice-s into the gui
addDataSource in class DataSourceHolderdataSource - The data source to addpublic static String getNameForDataSource(DataSource ds)
DataSource. If the length of
the toString of the data source is less than 30 just use that.
Else be a bit smart about truncating it.
ds - The data soruce to get a label for
public static String getNameForDataSource(DataSource ds,
int length,
boolean alwaysDoIt)
DataSource. If the length of
the toString of the data source is less than 30 just use that.
Else be a bit smart about truncating it.
ds - The data soruce to get a label forlength - String length to clip toalwaysDoIt - If false then we only lip if this is a file or url
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||