Package ucar.unidata.idv
Interface ControlContext
- All Superinterfaces:
DataContext
,IdvContext
- All Known Subinterfaces:
ViewContext
- All Known Implementing Classes:
DefaultIdv
,IdvServer.MyIdv
,IntegratedDataViewer
,MultiPaneIdv
This interface is how
DisplayControl
s view the
IntegratedDataViewer
. We use an interface so that,
instead of just passing the IDV as itself to the display controls,
we can keep tabs on what IDV methods are used by the display controls.
It is a way of keeping us somewhat honest.- Author:
- IDV development team
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDisplayControl
(DisplayControl control) a Add the givenDisplayControl
createDisplay
(String dataSourceName, String paramName, String displayName, String properties, boolean initDisplayInThread) Create a new DisplayControldoMakeDataChoiceMenu
(DataChoice dataChoice) Create a menu of commands for the given DataChoiceGet theColorTableManager
Get theDisplayConventions
getIdv()
Get the IDVReturn the list ofNamedStationTable
sReturn theXmlObjectStore
that is used to get and store persistent user state.Get the persistence managerGet theIdvPreferenceManager
Get theIdvResourceManager
Get theStationModelManager
getViewManager
(ViewDescriptor viewDescriptor) Create, if needed, and return theViewManager
identified by the givenViewDescriptor
getViewManager
(ViewDescriptor viewDescriptor, boolean newWindow, String properties) Create, if needed, and return theViewManager
identified by the givenViewDescriptor
boolean
handleAction
(String action, Hashtable properties) Handle the given action.void
removeDisplayControl
(DisplayControl control) Remove the givenDisplayControl
void
Show the normal cursor.void
Show the wait cursor.void
showWindow
(DisplayControl control, IdvWindow window) Popup the given window.Methods inherited from interface ucar.unidata.data.DataContext
dataSourceChanged, getAllDataSources, getDataSources, getJythonManager, getPreference, loadDataSource, selectDataChoices, selectDataType, selectDataType, selectUserChoices
Methods inherited from interface ucar.unidata.idv.IdvContext
getColorProperty, getProperty, getProperty
-
Method Details
-
addDisplayControl
a Add the givenDisplayControl
- Parameters:
control
- The new display control
-
removeDisplayControl
Remove the givenDisplayControl
- Parameters:
control
- The removed display control
-
getViewManager
Create, if needed, and return theViewManager
identified by the givenViewDescriptor
- Parameters:
viewDescriptor
- The view descriptor that defines the view manager being looked for- Returns:
- The view manager
-
getViewManager
Create, if needed, and return theViewManager
identified by the givenViewDescriptor
- Parameters:
viewDescriptor
- The view descriptor that defines the view manager being looked fornewWindow
- If true it will create a new window and place the ViewManager in it if the ViewManager was newly created (as opposed to one that already exists).properties
- Semicolon separated list of properties to configure the ViewManager- Returns:
- The view manager
-
handleAction
Handle the given action. This may be a url, snippet of jython, etc.- Parameters:
action
- The actionproperties
- Any extra properties (e.g., properties to pass to the DataManager when creating a new data source)- Returns:
- Was this action handled successfully
-
getObjectStore
XmlObjectStore getObjectStore()Return theXmlObjectStore
that is used to get and store persistent user state.- Specified by:
getObjectStore
in interfaceDataContext
- Returns:
- The object store
-
doMakeDataChoiceMenu
Create a menu of commands for the given DataChoice- Parameters:
dataChoice
- The data choice to create a menu for- Returns:
- The menu
-
getLocationList
List getLocationList()Return the list ofNamedStationTable
s- Returns:
- The station tables
-
showWindow
Popup the given window. We have this so the IDV can control when windows are shown.- Parameters:
control
- The control whose window is to be popped upwindow
- The window to be popped up
-
showWaitCursor
void showWaitCursor()Show the wait cursor. -
showNormalCursor
void showNormalCursor()Show the normal cursor. -
getIdv
IntegratedDataViewer getIdv()Get the IDV- Specified by:
getIdv
in interfaceDataContext
- Returns:
- The reference to the IDV
-
getPersistenceManager
IdvPersistenceManager getPersistenceManager()Get the persistence manager- Returns:
- Reference to the persistence manager
-
getColorTableManager
ColorTableManager getColorTableManager()Get theColorTableManager
- Returns:
- The color table manager
-
getPreferenceManager
IdvPreferenceManager getPreferenceManager()Get theIdvPreferenceManager
- Returns:
- The preference manager
-
getStationModelManager
StationModelManager getStationModelManager()Get theStationModelManager
- Returns:
- Get the station model manager
-
getDisplayConventions
DisplayConventions getDisplayConventions()Get theDisplayConventions
- Returns:
- The display conventions
-
getResourceManager
IdvResourceManager getResourceManager()Get theIdvResourceManager
- Specified by:
getResourceManager
in interfaceDataContext
- Returns:
- The resource manager
-
createDisplay
DisplayControl createDisplay(String dataSourceName, String paramName, String displayName, String properties, boolean initDisplayInThread) Create a new DisplayControl- Parameters:
dataSourceName
- The identifying object for the data source (e.g., test.nc)paramName
- The name of the parameterdisplayName
- The display type (from controls.xml)properties
- A set of semi-colon delimited name=value propertiesinitDisplayInThread
- If true then intialize the new display control in its own thread- Returns:
- The new DisplayControl
-