Package ucar.unidata.idv
Interface DisplayControl
- All Superinterfaces:
Sharable
- All Known Implementing Classes:
ADTControl,AerologicalSoundingControl,AnimationTextControl,AudioControl,BaseImageControl,CappiControl,ChatLogControl,ColorCrossSectionControl,ColorPlanViewControl,ColorRadarVolumeControl,ColorRhiControl,ContourCrossSectionControl,ContourCrossSectionControl.MyContourCrossSectionControl,ContourPlanViewControl,CrossSectionControl,DataTransectControl,DisplayControlImpl,DrawingControl,FlowCrossSectionControl,FlowCrossSectionControl.MyFlowCrossSectionControl,FlowPlanViewControl,FlowTimeHeightControl,FrontDrawingControl,Grid2DReadoutProbe,GriddedSkewTControl,GriddedSoundingControl,GridDisplayControl,GridTableControl,GridTrajectoryControl,GridTrajectoryControl.MyTrackControl,GridTrajectoryControlNew,GridTrajectoryControlNew.MyTrajectoryControl,HovmollerControl,HydraControl,ImageControl,ImageMovieControl,ImagePlanViewControl,ImageSequenceControl,JythonControl,Level2ColorCrossSectionControl,Level2TimeHeightControl,LineProbeControl,LocationIndicatorControl,MapDisplayControl,MovieDisplayControl,MultiDisplayHolder,NoteControl,ObsDisplayControl,ObsListControl,OmniControl,PlanViewControl,PointCloudControl,ProbeControl,ProfileControl,ProfilerControl,ProfilerMultiStationControl,ProfilerTimeHeightControl,RadarCrossSectionControl,RadarEditor,RadarEditor.MyRadarSweepControl,RadarGridControl,RadarRhiControl,RadarSweepControl,RadarVWPControl,RangeAndBearingControl,RaobSkewTControl,RaobSoundingControl,RGBCompositeControl,ScatterDisplay,ShapefileControl,SkewTControl,StationLocationControl,StationModelControl,TemplateControl,TextDisplayControl,TextProductControl,ThreeDSurfaceControl,TimeHeightControl,TimeHeightControl.MyTimeHeightControl,TimeSeriesControl,TopographyControl,TrackControl,TrackSkewTControl,TrackSoundingControl,TrajectoryFeatureTypeSoundingControl,TransectDrawingControl,ValuePlanViewControl,VerticalProfileControl,VolumeRenderControl,VolumeVectorControl,WindTimeHeightControl,WMSControl,WorldWindControl,YahooLocationControl
A class to support controling the aspects of a display.
- Author:
- IDV Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intBottom type legendstatic final StringDefault format for probe formatstatic final StringPreference prefix for preferences of this class.static final StringPreference for probe formatstatic final StringPreference for whether the control should be removed when the window is closedstatic final StringPreference for sampling modestatic final StringShould we remove stand alone display controls when their window is closedstatic final StringShould we ask the user if they want to remove stand alone display controlsstatic final StringThe property name of the String path or url of the icon this display control should show in its legend.static final intShow all flagstatic final intShow no raster flagstatic final intShow raster flagstatic final intSide type legend -
Method Summary
Modifier and TypeMethodDescriptionvoidApply preferences to this control.booleanCan this be dockeddoMakeVisibilityControl(String label) Make a visibility control as a JCheckbox.voiddoRemove()Called when the DisplayControl is removed from the displayvoidMethod to call when the first frame has been rendered.booleanIs this control active or has it been removedbooleanSee if this DisplayControl can remove all controls.Get the list ofDataCategorysbooleanGet the collapsed state of the legend.getControlMenus(JComponent comp) Get the menus for this control.getCursorReadout(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) Get the cursor readoutGet theDataChoiceassociated with this control.Get the list ofDataChoices associated with this control.Get the data for the display listGet theMapProjectionassociated with the data in this DisplayControl.Get the default view manager for this controlGet the display category for this DisplayControl.Get the display id for this control.Get the displayable for the display list for the particular viewbooleanGet the display's visibility.booleanIs this control expanded when it is shown in the main tabsbooleanis this display the one that drives time selection for other displaysgetLabel()Get a label describing controlgetLegendButtons(int legendType) Get the legend component for the type of legendgetLegendComponent(int legendType) Get the legend component for the type of legendgetLegendLabel(int legendType) Get the legend lable for the type of legendbooleanGet whether the visibility of this display control is locked (could be on or off)Get the text that should show up in a menu listing this control.booleanShould this display be shown in the display listbooleanShould the display control be shown in a legendbooleanShould we show this control in the main tabsget the time set of the datagetTmpProperty(Object key) Get the tmp property.Find a property on the display control.Get the view manager for this controlintHow long should this display be shown when in visibility animation modeGet the control window for this DisplayControl.voidinit(String displayId, List dataCategories, List choices, ControlContext viewer, String properties, DataSelection dataSelection) Initialize the DisplayControl.voidinit(String displayId, List dataCategories, List choices, ControlContext viewer, Hashtable properties, DataSelection dataSelection) Initialize the DisplayControl.voidinitAfterUnPersistence(ControlContext vc, Hashtable properties) Method to call after unpersisting from XML.voidinitAfterUnPersistence(ControlContext vc, Hashtable properties, List dataChoices) Initialize after unpersistancevoidIntialize the display control when it is created from a templatevoidDo basic initialization.booleanAre we fully initializedMake a label like the one in the legendvoidmoveTo(ViewManager viewManager) Move this control to a differentViewManager.voidMethod called when a map projection changes.voidputTmpProperty(Object key, Object value) put the tmp property.voidputTransientProperty(Object key, Object value) Put a property on the display control.removeTmpProperty(Object key) remove the tmp propertyvoidSave an image of this control to a file.voidsetCollapseLegend(boolean collapse) Set the collapsed state of the legend.voidsetDisplayCategory(String category) Set the display categoryvoidsetDisplayVisibility(boolean b) Set the display's visibility.voidsetExpandedInTabs(boolean value) Set whether this control expanded when it is shown in the main tabsvoidSet the background color on the legend componentvoidSet the foreground color on the legend componentvoidsetLockVisibilityToggle(boolean value) Set whether the visibility of this display control is locked (could be on or off)voidsetShowInTabs(boolean value) Set whether to show this control in the main tabsbooleanShould this be docked?voidshow()Show this control's componentvoidshowHelp()Show helpvoidtoFront()Bring this control's component to the frontvoidtoggleVisibilityForVectorGraphicsRendering(int rasterMode) Toggle the visibility for vector graphics rendering based on modevoidHide or show the main windowvoidMethod called when a transect changes.voidviewManagerChanged(String property) Method called when a view manager changes.voidviewManagerDestroyed(ViewManager viewManager) Called when a ViewManager which holds the display is destoryedvoidwriteTestArchive(String archivePath) This is called when we are generating a test archive of images from all componentsMethods inherited from interface ucar.unidata.collab.Sharable
getReceiveShareTime, getShareGroup, getSharing, getUniqueId, receiveShareData, setReceiveShareTime
-
Field Details
-
PREF_PREFIX
Preference prefix for preferences of this class.- See Also:
-
PROP_LEGENDICON
The property name of the String path or url of the icon this display control should show in its legend.- See Also:
-
PREF_SAMPLING_MODE
Preference for sampling mode- See Also:
-
PREF_PROBEFORMAT
Preference for probe format- See Also:
-
DEFAULT_PROBEFORMAT
Default format for probe format- See Also:
-
PREF_REMOVEONWINDOWCLOSE
Preference for whether the control should be removed when the window is closed- See Also:
-
PREF_STANDALONE_REMOVEONCLOSE
Should we remove stand alone display controls when their window is closed- See Also:
-
PREF_STANDALONE_REMOVEONCLOSE_ASK
Should we ask the user if they want to remove stand alone display controls- See Also:
-
BOTTOM_LEGEND
static final int BOTTOM_LEGENDBottom type legend- See Also:
-
SIDE_LEGEND
static final int SIDE_LEGENDSide type legend- See Also:
-
RASTERMODE_SHOWRASTER
static final int RASTERMODE_SHOWRASTERShow raster flag- See Also:
-
RASTERMODE_SHOWNONRASTER
static final int RASTERMODE_SHOWNONRASTERShow no raster flag- See Also:
-
RASTERMODE_SHOWALL
static final int RASTERMODE_SHOWALLShow all flag- See Also:
-
-
Method Details
-
init
void init(String displayId, List dataCategories, List choices, ControlContext viewer, String properties, DataSelection dataSelection) throws VisADException, RemoteException Initialize the DisplayControl.- Parameters:
displayId- the display iddataCategories- the DisplayControl's data categorieschoices- a list ofDataChoicesviewer- the control context in which this is viewedproperties- propertiesdataSelection- specific data selection properties deprecated Use init that that takes a properties Hashtable- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
init
void init(String displayId, List dataCategories, List choices, ControlContext viewer, Hashtable properties, DataSelection dataSelection) throws VisADException, RemoteException Initialize the DisplayControl.- Parameters:
displayId- the display iddataCategories- the DisplayControl's data categorieschoices- a list ofDataChoicesviewer- the control context in which this is viewedproperties- extra propertiesdataSelection- specific data selection properties- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
isInitDone
boolean isInitDone()Are we fully initialized- Returns:
- is init done
-
getWindow
JFrame getWindow()Get the control window for this DisplayControl.- Returns:
- The window that this display control is shown in
-
getLockVisibilityToggle
boolean getLockVisibilityToggle()Get whether the visibility of this display control is locked (could be on or off)- Returns:
- true if locked.
-
getShowInDisplayList
boolean getShowInDisplayList()Should this display be shown in the display list- Returns:
- Show in the display list
-
getDisplayListDisplayable
Get the displayable for the display list for the particular view- Parameters:
view- The view manager- Returns:
- Displayable to show
-
getDataForDisplayList
Data getDataForDisplayList()Get the data for the display list- Returns:
- the data
-
setLockVisibilityToggle
void setLockVisibilityToggle(boolean value) Set whether the visibility of this display control is locked (could be on or off)- Parameters:
value- true to lock to current state
-
getLegendComponent
Get the legend component for the type of legend- Parameters:
legendType- type of legend (BOTTOM, SIDE)- Returns:
- component for that legend
-
getLegendButtons
Get the legend component for the type of legend- Parameters:
legendType- type of legend (BOTTOM, SIDE)- Returns:
- component for that legend
-
setCollapseLegend
void setCollapseLegend(boolean collapse) Set the collapsed state of the legend.- Parameters:
collapse- true to collapse the legend.
-
getCollapseLegend
boolean getCollapseLegend()Get the collapsed state of the legend.- Returns:
- true if legend collapsed
-
getLegendLabel
Get the legend lable for the type of legend- Parameters:
legendType- type of legend (BOTTOM, SIDE)- Returns:
- the legend label
-
doRemove
Called when the DisplayControl is removed from the display- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
viewManagerDestroyed
Called when a ViewManager which holds the display is destoryed- Parameters:
viewManager- The view manager that has been destroyed- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
getCanDoRemoveAll
boolean getCanDoRemoveAll()See if this DisplayControl can remove all controls.- Returns:
- true if it can remove all
-
getActive
boolean getActive()Is this control active or has it been removed- Returns:
- is active
-
getDataChoice
DataChoice getDataChoice()Get theDataChoiceassociated with this control.- Returns:
- the DataChoice (can be null)
-
getDataChoices
List getDataChoices()Get the list ofDataChoices associated with this control.- Returns:
- the list of DataChoice-s
-
getDisplayId
String getDisplayId()Get the display id for this control.- Returns:
- the display id
-
getMenuLabel
String getMenuLabel()Get the text that should show up in a menu listing this control.- Returns:
- text for menu
-
getControlMenus
Get the menus for this control.- Parameters:
comp- component for placement of window (can be null)- Returns:
- list of menus
-
getLabel
String getLabel()Get a label describing control- Returns:
- a descriptive label
-
moveTo
Move this control to a differentViewManager.- Parameters:
viewManager- ViewManager to move to.
-
getViewManager
ViewManager getViewManager()Get the view manager for this control- Returns:
- the ViewManager
-
getDefaultViewManager
ViewManager getDefaultViewManager()Get the default view manager for this control- Returns:
- the default view manager for this control
-
saveImage
Save an image of this control to a file.- Parameters:
filename- filename to save to
-
toFront
void toFront()Bring this control's component to the front -
makeLegendLabel
JLabel makeLegendLabel()Make a label like the one in the legend- Returns:
- label
-
show
void show()Show this control's component -
toggleWindow
void toggleWindow()Hide or show the main window -
setDisplayVisibility
void setDisplayVisibility(boolean b) Set the display's visibility.- Parameters:
b- true to set it visible
-
getDisplayVisibility
boolean getDisplayVisibility()Get the display's visibility.- Returns:
- true if visible
-
toggleVisibilityForVectorGraphicsRendering
Toggle the visibility for vector graphics rendering based on mode- Parameters:
rasterMode- mode to use- Throws:
Exception- problem toggling
-
doMakeVisibilityControl
Make a visibility control as a JCheckbox.- Parameters:
label- label for the visibility checkbox- Returns:
- checkbox for toggling visibility
-
setLegendForeground
Set the foreground color on the legend component- Parameters:
fg- foreground color
-
setLegendBackground
Set the background color on the legend component- Parameters:
bg- background color
-
initAfterUnPersistence
Method to call after unpersisting from XML.- Parameters:
vc- control context for this DisplayControl.properties- A place to put properties
-
initAfterUnPersistence
Initialize after unpersistance- Parameters:
vc- the control contextproperties- the propertiesdataChoices- the list of data choices
-
initAsTemplate
void initAsTemplate()Intialize the display control when it is created from a template -
initBasic
Do basic initialization. This is for display controls that server as prototype objects- Parameters:
displayId- idcategories- display categoriesproperties- properties
-
firstFrameDone
void firstFrameDone()Method to call when the first frame has been rendered. -
writeTestArchive
This is called when we are generating a test archive of images from all components- Parameters:
archivePath- Where to write the images
-
getDataProjection
MapProjection getDataProjection()Get theMapProjectionassociated with the data in this DisplayControl.- Returns:
- data projection
-
projectionChanged
void projectionChanged()Method called when a map projection changes. -
transectChanged
void transectChanged()Method called when a transect changes. -
viewManagerChanged
Method called when a view manager changes.- Parameters:
property- the property that changed
-
getDisplayCategory
String getDisplayCategory()Get the display category for this DisplayControl.- Returns:
- category for this control.
-
setDisplayCategory
Set the display category- Parameters:
category- the display category
-
getCategories
List getCategories()Get the list ofDataCategorys- Returns:
- List of data categories
-
getTransientProperty
Find a property on the display control. These properties are not saved.- Parameters:
key- The key- Returns:
- The value
-
putTransientProperty
Put a property on the display control. These properties are not saved.- Parameters:
key- The keyvalue- The value
-
applyPreferences
void applyPreferences()Apply preferences to this control. -
getShowInLegend
boolean getShowInLegend()Should the display control be shown in a legend- Returns:
- Should this display control be shown in a legend
-
showHelp
void showHelp()Show help -
getExpandedInTabs
boolean getExpandedInTabs()Is this control expanded when it is shown in the main tabs- Returns:
- expanded in tabs
-
setExpandedInTabs
void setExpandedInTabs(boolean value) Set whether this control expanded when it is shown in the main tabs- Parameters:
value- value
-
getShowInTabs
boolean getShowInTabs()Should we show this control in the main tabs- Returns:
- show in main tabs
-
shouldBeDocked
boolean shouldBeDocked()Should this be docked?- Returns:
- true if docked
-
canBeDocked
boolean canBeDocked()Can this be docked- Returns:
- true if can be docked
-
setShowInTabs
void setShowInTabs(boolean value) Set whether to show this control in the main tabs- Parameters:
value- value
-
getTimeSet
get the time set of the data- Returns:
- date times
- Throws:
RemoteException- on badnessVisADException- on badness
-
getCursorReadout
List getCursorReadout(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) throws Exception Get the cursor readout- Parameters:
el- positionanimationValue- animation valueanimationStep- animation indexsamples- the list of samples to add to- Returns:
- List of values
- Throws:
Exception- problem getting the cursor readout
-
getTmpProperty
Get the tmp property.- Parameters:
key- key- Returns:
- property
-
putTmpProperty
put the tmp property. These are not persisted off- Parameters:
key- keyvalue- value
-
removeTmpProperty
remove the tmp property- Parameters:
key- key- Returns:
- the value or null if not found
-
getVisbilityAnimationPause
int getVisbilityAnimationPause()How long should this display be shown when in visibility animation mode- Returns:
- -1 if it is undefined. 0 if this one should not be used. else treat the value as seconds
-
getIsTimeDriver
boolean getIsTimeDriver()is this display the one that drives time selection for other displays- Returns:
- true if this is the time driver
-