|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.idv.ui.DataSourceHolder
public abstract class DataSourceHolder
A base class for those components that show a set of
DataSources. For now these are the
DataTree and
DataSelector. This class provides
basic facilities to manage the list of data sources, create the
window, etc.
| Field Summary | |
|---|---|
protected Dimension |
defaultDimension
The size of the window |
protected DataSource |
formulaDataSource
The formula data source, i.e., the one that holds the end-user formulas |
protected IdvWindow |
frame
The window this gui is in |
protected IntegratedDataViewer |
idv
The IDV |
protected boolean |
treatFormulaDataSourceSpecial
If true then we don't remove the formula data source |
| Constructor Summary | |
|---|---|
DataSourceHolder(IntegratedDataViewer idv,
DataSource formulaDataSource,
Dimension defaultDimension)
Create this object |
|
| Method Summary | |
|---|---|
void |
addDataSource(DataSource dataSource)
Add the given DataSource |
void |
addDisplayControl(DisplayControl control)
Adds the given DisplayControl |
void |
addDisplayControl(DisplayControl control,
DataChoice choice)
A no-op that can be overrode by a derived class |
void |
dataSourceChanged(DataSource source)
Be notified that the given DataSource has changed. |
void |
dataSourceTimeChanged(DataSource source)
Be notified that the tim selection on the given DataSource has changed. |
void |
displayTemplatesChanged()
A hook to notify that the list of favorites has changed |
void |
dispose()
Remove all references to anything we may have. |
void |
doClose()
Remove this holder from the IDV and dispose of the window |
IdvWindow |
doMakeFrame()
Make the IdvWindow. |
JComponent |
getButtons()
Hook for derived classes to provide their own dialog buttons |
abstract JComponent |
getContents()
Needs to be overrode by derived classes to return the GUI |
List |
getDataSources()
Return the list of DataSources |
static ImageIcon |
getDerivedIcon()
Utility method to create, if needed, and return the ImageIcon to be used to show DerivedDataChoices |
IdvWindow |
getFrame()
Get our window. |
IntegratedDataViewer |
getIdv()
Return the IDV member. |
Point |
getLocationOnScreen()
Utility to determine the location on the screen. |
protected String |
getName()
Get the name of this data source holder. |
void |
removeAllDataSources()
Remove all data sources |
void |
removeDataSource(DataSource dataSource)
Remove the given DataSource
only if it is not the formulaDataSource. |
protected boolean |
removeDataSourceInner(DataSource dataSource)
Remove the specified data source only if it is not the formulaDataSource. |
void |
removeDisplayControl(DisplayControl control)
Remove the given DisplayControl |
void |
setDefaultSize(Dimension d)
Set the default window size to be used by this component |
void |
setFrame(IdvWindow f)
Set our window |
void |
show()
Show the window if it is non-null |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IntegratedDataViewer idv
protected IdvWindow frame
protected DataSource formulaDataSource
protected boolean treatFormulaDataSourceSpecial
protected Dimension defaultDimension
| Constructor Detail |
|---|
public DataSourceHolder(IntegratedDataViewer idv,
DataSource formulaDataSource,
Dimension defaultDimension)
idv - The IDVformulaDataSource - The singleton formula data source. We treat this
special.defaultDimension - How big is the window.| Method Detail |
|---|
public IdvWindow doMakeFrame()
public IntegratedDataViewer getIdv()
protected String getName()
public void doClose()
public void show()
public void setFrame(IdvWindow f)
f - The windowpublic IdvWindow getFrame()
public abstract JComponent getContents()
public Point getLocationOnScreen()
public JComponent getButtons()
public List getDataSources()
DataSources
public static ImageIcon getDerivedIcon()
DerivedDataChoices
public void setDefaultSize(Dimension d)
d - The default size
public void addDisplayControl(DisplayControl control,
DataChoice choice)
control - The new display controlchoice - The data choicepublic void removeDisplayControl(DisplayControl control)
DisplayControl
control - The removed display controlpublic void addDisplayControl(DisplayControl control)
DisplayControl
control - The new display controlpublic void dispose()
public void removeAllDataSources()
public void addDataSource(DataSource dataSource)
DataSource
dataSource - The new data sourcepublic void removeDataSource(DataSource dataSource)
DataSource
only if it is not the formulaDataSource.
dataSource - The data source to be removedprotected boolean removeDataSourceInner(DataSource dataSource)
dataSource - The data source to be removed
public void dataSourceChanged(DataSource source)
DataSource has changed.
source - The data source that changedpublic void dataSourceTimeChanged(DataSource source)
DataSource has changed.
source - The data source whose time has changedpublic void displayTemplatesChanged()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||