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
DisplayControls 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 TypeMethodDescriptionvoidaddDisplayControl(DisplayControl control) a Add the givenDisplayControlcreateDisplay(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 theColorTableManagerGet theDisplayConventionsgetIdv()Get the IDVReturn the list ofNamedStationTablesReturn theXmlObjectStorethat is used to get and store persistent user state.Get the persistence managerGet theIdvPreferenceManagerGet theIdvResourceManagerGet theStationModelManagergetViewManager(ViewDescriptor viewDescriptor) Create, if needed, and return theViewManageridentified by the givenViewDescriptorgetViewManager(ViewDescriptor viewDescriptor, boolean newWindow, String properties) Create, if needed, and return theViewManageridentified by the givenViewDescriptorbooleanhandleAction(String action, Hashtable properties) Handle the given action.voidremoveDisplayControl(DisplayControl control) Remove the givenDisplayControlvoidShow the normal cursor.voidShow the wait cursor.voidshowWindow(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, selectUserChoicesMethods 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 theViewManageridentified 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 theViewManageridentified 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 theXmlObjectStorethat is used to get and store persistent user state.- Specified by:
getObjectStorein 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 ofNamedStationTables- 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:
getIdvin 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:
getResourceManagerin 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
-