Package ucar.unidata.data
Interface DataContext
- All Superinterfaces:
IdvContext
- All Known Subinterfaces:
ControlContext
,ViewContext
- All Known Implementing Classes:
DefaultIdv
,IdvServer.MyIdv
,IntegratedDataViewer
,MultiPaneIdv
This interface defines the context in which
the collection of data classes (e.g.,
DataChoice
,
DirectDataChoice
, DerivedDataDescriptor
,
DataSource
etc.) exist. For now the DataContext is
the IntegratedDataViewer
(IDV). It is mostly used by the DerivedDataChoice
to have the user select the DataChoice
operands needed
when evaluating the DerivedDataChoice.- Version:
- $Revision: 1.29 $Date: 2006/12/01 20:41:21 $
- Author:
- IDV development team
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dataSourceChanged
(DataSource source) This method gets called when something changed in the data source.Return the list ofDataSource
objects currently held, including the formula data sourceReturn the list ofDataSource
objects currently heldgetIdv()
Get the reference to the idvReturn theJythonManager
.Return theXmlObjectStore
that is used to get and store persistent user state.getPreference
(String pref) Get the given user preferenceReturn theIdvResourceManager
.boolean
loadDataSource
(DataSource dataSource) Add the givenDataSource
.selectDataChoices
(List labels) Select a set ofDataChoice
-s, one for each label (String) contained within the labels List.selectDataType
(Object definingObject) Ask the user what data type to useselectDataType
(Object definingObject, String label) Ask the user what data type to useselectUserChoices
(String msg, List userChoices) Select a set of Strings, one for each label (String) contained within the userChoices List.Methods inherited from interface ucar.unidata.idv.IdvContext
getColorProperty, getProperty, getProperty
-
Method Details
-
getIdv
IntegratedDataViewer getIdv()Get the reference to the idv- Returns:
- The idv
-
getDataSources
List getDataSources()Return the list ofDataSource
objects currently held- Returns:
- List of DataSources
-
getAllDataSources
List getAllDataSources()Return the list ofDataSource
objects currently held, including the formula data source- Returns:
- List of DataSources
-
selectDataChoices
Select a set ofDataChoice
-s, one for each label (String) contained within the labels List. This may return null to denote a user cancellation.- Parameters:
labels
- labels to associate with choices- Returns:
- List of DataChoices
-
getPreference
Get the given user preference- Parameters:
pref
- The name of the preference- Returns:
- The value
-
selectUserChoices
Select a set of Strings, one for each label (String) contained within the userChoices List. This may return null to denote a user cancellation. Typically a user interface is generated based on the userChoices that is made of a set of JTextFields in which the user enters the required values.- Parameters:
msg
- message promptuserChoices
- list of user choices- Returns:
- List of user choices (may be null)
-
dataSourceChanged
This method gets called when something changed in the data source.- Parameters:
source
- The data source that changed
-
loadDataSource
Add the givenDataSource
. For the IDV this entails displaying the DataSource in the jtrees and menus, etc.- Parameters:
dataSource
- the DataSource to load- Returns:
- true if the DataSource was loaded
-
getJythonManager
JythonManager getJythonManager()Return theJythonManager
. This is the class that manages the set of jython interpreters, etc.,- Returns:
- The JythonManager
-
getResourceManager
IdvResourceManager getResourceManager()Return theIdvResourceManager
. This is the class that manages the set of idv resources etc.,- Returns:
- The IdvResourcemanager
-
getObjectStore
XmlObjectStore getObjectStore()Return theXmlObjectStore
that is used to get and store persistent user state.- Returns:
- The object store
-
selectDataType
Ask the user what data type to use- Parameters:
definingObject
- defines the data source to be created- Returns:
- The data type or null
-
selectDataType
Ask the user what data type to use- Parameters:
definingObject
- defines the data source to be createdlabel
- the label- Returns:
- The data type or null
-