Package ucar.unidata.idv.control
Class PlanViewControl
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.idv.control.DisplayControlBase
ucar.unidata.idv.control.DisplayControlImpl
ucar.unidata.idv.control.GridDisplayControl
ucar.unidata.idv.control.PlanViewControl
- All Implemented Interfaces:
ActionListener
,ItemListener
,PropertyChangeListener
,EventListener
,HyperlinkListener
,Sharable
,DataChangeListener
,DisplayControl
,Prototypable
,ControlListener
,DisplayListener
- Direct Known Subclasses:
ColorPlanViewControl
,ContourPlanViewControl
,FlowPlanViewControl
,ImagePlanViewControl
,TopographyControl
,ValuePlanViewControl
Class to handle all kinds of PlanViews. A plan view is a
horizontal slice at a level.
- Version:
- $Revision: 1.185 $
- Author:
- Unidata Development Team
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
A widget for the control window for setting the vertical range propertiesNested classes/interfaces inherited from class ucar.unidata.idv.control.DisplayControlImpl
DisplayControlImpl.SideLegendLabel
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object
current levelprotected Object[]
list of current levelsprotected FieldImpl
current sliceprotected DataChoice
data choice for the dataprotected boolean
flag for ensemblesprotected JLabel
level readout labelstatic final String
Macro for the level for the labelstatic final String
property for sharing levelsFields inherited from class ucar.unidata.idv.control.GridDisplayControl
CMD_CONTOURDIALOG, CMD_SETLEVELS, gridDataInstance, INITIAL_PROBE_EARTHLOCATION, log_, settingLevel
Fields inherited from class ucar.unidata.idv.control.DisplayControlImpl
categories, colorScaleInfo, colorScales, contourInfo, contourInfoParams, contourWidget, controlContext, ctw, dataSelection, defaultView, defaultViewManager, DISPLAY_LIST_NAME, displayListTable, displayListUsesColor, displayMasters, displayUnit, helpUrl, initNoteText, instantiatedWithNoData, isProgressiveResolution, matchDisplayRegion, noteTextArea, noteWrapper, paramName, reloadFromBounds, requestProperties, resolutionReadout, selectRangeWidget, settingVisibility, sharables, showNoteText, skipSlider, version, viewManagers, ZFUDGE
Fields inherited from class ucar.unidata.idv.control.DisplayControlBase
APPEARANCE_DARK, APPEARANCE_IDV, APPEARANCE_LIGHT, CMD_BARBSIZE, CMD_COLORS, CMD_COLORTABLE, CMD_INTERVAL, CMD_LEVEL, CMD_LINEWIDTH, CMD_POPUP, CMD_REMOVE, DEFAULT_POINT_SIZE, DEFAULT_SAMPLING_MODE, FIND_ALL, FIND_CATEGORY, FIND_CLASS, FIND_SPECIAL, FIND_THIS, FIND_WITHDATA, FIND_WITHTHISDATA, FIND_WITHTHISFIELD, FIND_WITHTHISVIEW, FLAG_COLOR, FLAG_COLORTABLE, FLAG_COLORUNIT, FLAG_CONTOUR, FLAG_DATACONTROL, FLAG_DISPLAYUNIT, FLAG_GRIDTRAJECTORY, FLAG_LINEWIDTH, FLAG_NONE, FLAG_SELECTRANGE, FLAG_SKIPFACTOR, FLAG_SMOOTHING, FLAG_TEXTUREQUALITY, FLAG_TIMERANGE, FLAG_ZPOSITION, GRID_INSETS, ICON_LOCK, ICON_REMOVE, ICON_UNLOCK, LABEL_NONE, MACRO_DATASOURCENAME, MACRO_DISPLAYNAME, MACRO_DISPLAYUNIT, MACRO_FHOUR, MACRO_FHOUR2, MACRO_LONGNAME, MACRO_POSITION, MACRO_RESOLUTION, MACRO_SHORTNAME, MACRO_STATION, MACRO_TIMESTAMP, MACRO_VALUE, NEAREST_NEIGHBOR, PREF_DISPLAYLIST_TEMPLATE, PREF_EXTRALABEL_TEMPLATE, PREF_LEGENDLABEL_TEMPLATE, PROP_REMOVED, SETTINGS_GROUP_DISPLAY, SETTINGS_GROUP_FLAGS, SHARE_CHOICES, SHARE_COLOR, SHARE_COLORSCALE, SHARE_COLORTABLE, SHARE_DISPLAYUNIT, SHARE_POSITION, SHARE_SELECTRANGE, SHARE_SKIPVALUE, SHARE_TRANSECT, SHARE_VISIBILITY, WEIGHTED_AVERAGE
Fields inherited from interface ucar.unidata.idv.DisplayControl
BOTTOM_LEGEND, DEFAULT_PROBEFORMAT, PREF_PREFIX, PREF_PROBEFORMAT, PREF_REMOVEONWINDOWCLOSE, PREF_SAMPLING_MODE, PREF_STANDALONE_REMOVEONCLOSE, PREF_STANDALONE_REMOVEONCLOSE_ASK, PROP_LEGENDICON, RASTERMODE_SHOWALL, RASTERMODE_SHOWNONRASTER, RASTERMODE_SHOWRASTER, SIDE_LEGEND
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Add DisplaySettings appropriate for this displayprotected void
addLabelMacros
(String template, List patterns, List values) Add any macro name/value pairs.protected void
Add a topography map for the parameterprotected void
Wrapper aroundGridDisplayControl.addTopographyMap(int)
to allow subclasses to set their own index.void
addToRangeMenu
(RangeWidget rw, List items) Add an entry into the range menuprotected void
Use the value of the skip factor to subset the data.protected void
Use the value of the smoothing type and weight to subset the data.boolean
Can this display control write out data.protected boolean
checkFlag
(int f) Test if the given flag is set in the attrbiuteFlagsprotected abstract DisplayableData
Method for creating theDisplayableData
object that is the main depiction for the data controlled by thisPlanViewControl
; implemented by each subclass.protected void
displayUnitChanged
(Unit oldUnit, Unit newUnit) A hook that is called when the display unit is changed.Make some Plan view controls for the UI.void
doRemove()
Remove this controlprotected String
formatLevel
(Object level) Format the level for labelling.protected int
Returns the index to use in the GridDataInstance array of ranges for color ranges.void
getControlWidgets
(List<ControlWidget> controlWidgets) Add in any special control widgets to the current list of widgets.protected FieldImpl
Get the current sliceprotected Data
Get the cursor readout dataprotected List
getCursorReadoutInner
(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) Get the cursor dataprotected String
Get the Data projection labelprotected Data
Get the DisplayedDataprotected void
getEditMenuItems
(List items, boolean forMenuBar) Overwrite the base class method to add a Levels menu to the edit menufloat
Needed for bundles/persistence - pressure levels dwell rate slider and text boxReturn theDisplayable
of the Plan View as aGridDisplayable
.boolean
get the Ignore Vertical Dimension propertyboolean
getIs2D()
Get the property.void
getLegendLabels
(List labels, int legendType) Append any label information to the list of labels.getLevel()
Return active level value.protected Range
Get the range for the current slice.Get the label for the levels box.protected void
getMacroNames
(List names, List labels) Add any macro name/label pairsboolean
Get the multiple is topography property.boolean
Get the parameter is topography property.Return the displayable of the Plan View as a DisplayableData.int
Return the type of depiction for this displayprotected JComboBox
Create a jcombobox for setting the polygon mode.protected FieldImpl
getSliceForDisplay
(FieldImpl slice) Get the slice for the displayGet the vertical rangeboolean
Determine whether the data in thisPlanViewControl
has levels or not.protected boolean
Return whether the Data held by this display control contains multiple fields (e.g., for the isosurface colored by another parameterboolean
init
(DataChoice dataChoice) Called to make this kind of Display Control; also calls code to made the Displayable.void
initDone()
What to do when you are done.void
loadDataAtLevel
(Object level) Load data at the level specified.void
Method to call if projection changes.void
Handle property changevoid
receiveShareData
(Sharable from, Object dataId, Object[] data) Method called by other classes that share the selector.void
relocateDisplay
(ucar.unidata.geoloc.LatLonRect originalBounds, ucar.unidata.geoloc.LatLonRect newBounds, boolean useDataProjection) When we relocate a bundle this gets called to relocate the display This method gets overwritten by the probe and cross section displays so they can move their selection points to a new locationprotected void
setCurrentSlice
(FieldImpl slice) Set the current sliceprotected boolean
setData
(DataChoice dataChoice) Called to initialize this control from the given dataChoice; sets levels controls to match data; make data slice at first level; set display's color table and display units.void
setDataSelectionLevel
(Object level) Set the level in the data selectionvoid
setForwardValue
(float forwardValue) Needed for bundles/persistence - pressure levels dwell rate slider and text boxvoid
setIgnoreVerticalDimension
(boolean v) Set the ignore Vertical Dimension propertyvoid
setIs2D
(boolean v) Set the property.void
Set the active level.protected void
Set the level from the uservoid
setLevelReadoutLabel
(String text) Set the text for the level readout in the control window.void
If there are, or are not, some levels in the data, set the controls accordingly.void
setMultipleIsTopography
(boolean v) Set the other is topography property.void
setParameterIsTopography
(boolean v) Set the parameter is topography property.void
setPointSize
(float value) Set the point sizevoid
setPolygonMode
(int v) Set the type of depiction (solid, line, mesh) for this displayvoid
setSettingsLevel
(Object level) Set the active level.void
setVerticalRange
(Range vertRange) Set the range on the parameter topography ScalarMapprotected boolean
This allows for derived classes to turn this off.protected boolean
This allows for derived classes to turn this off.protected boolean
Determine if the display and gui should have a z position.Methods inherited from class ucar.unidata.idv.control.GridDisplayControl
actionPerformed, addTopographyMap, addTopographyMap, applyForecastHourMacro, canDoProgressiveResolution, convertColorRange, doExport, doMakeContourLevelControl, doMakeDataInstance, doMakeLevelControl, doMakeLevelControl, exportDisplayedData, getColorParamName, getColorRangeFromData, getColorUnit, getContourInfo, getDataProjection, getDataRangeInColorUnits, getDefaultContourInfo, getDisplayUnit, getGridDataInstance, getInitialColorTable, getInitialRange, getRawDataUnit, initializeDefaultContourInfo, isDisplayUnitAlsoColorUnit, normalizeRectangle, setLevel, shouldAddControlListener, shouldAddDisplayListener
Methods inherited from class ucar.unidata.idv.control.DisplayControlImpl
activateDisplays, addAttributedDisplayable, addAttributedDisplayable, addAttributedDisplayable, addAttributeFlags, addCheckBoxSettings, addDataChoice, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayMaster, addNewData, addNoteText, addPropertiesComponents, addPropertyChangeListener, addRemovable, addSharable, addTimeModeWidget, addToControlContext, addToRangeMenu, addToRangeMenu, addViewManager, appendDataChoices, applyAttributesToDisplayables, applyColor, applyColorScaleInfo, applyColorTable, applyColorUnit, applyContourInfo, applyDisplaySetting, applyDisplayUnit, applyLineWidth, applyPreferences, applyProperties, applyProperties, applyPropertyValues, applyRange, applySelectRange, applyTextureQuality, applyTimeRange, applyZPosition, boundsClose, canBeDocked, canSaveDataInCache, captureWindow, centerOnDisplay, changeColorUnit, changeDisplayUnit, checkBoundsChange, checkIfDataOk, checkImageSize, clearDataInstance, clearPrototype, clearViewManagers, close, colorUnitChanged, controlChanged, convertColorRange, convertRange, createDisplayListDisplayable, createIdvWindow, dataChanged, deactivateDisplays, debug, displayableToFront, displayChanged, displayControlFailed, doApplyProperties, doInitialUpdateLegendAndList, doMakeBottomLegendComponent, doMakeChangeColorMenu, doMakeChangeColorMenu, doMakeChangeParameterMenuItem, doMakeColorControl, doMakeColorControl, doMakeColorScales, doMakeMenuBar, doMakeMenuBarMenus, doMakePointSizeWidget, doMakeRemoveControl, doMakeSideLegendComponent, doMakeSkipFactorSlider, doMakeSmoothingWidget, doMakeTextureSlider, doMakeVisibilityControl, doMakeWidgetComponent, doMakeWindow, doMakeZPositionSlider, findDisplayInfo, findDisplays, findDisplays, firePropertyChangeEvent, firstFrameDone, formatForCursorReadout, getActive, getAnimation, getAnimation, getAnimation, getAnimation, getAnimationInfo, getAnimationWidget, getAttributeFlags, getCachedData, getCanDoRemoveAll, getCategories, getChangeParameterLabel, getCollapseLegend, getColor, getColorDimness, getColorScaleInfo, getColorTable, getColorTableForDisplayable, getColorTableToApply, getColorTableWidget, getColorUnitName, getColorWidgetLabel, getComponentHolder, getContents, getControlChangeSleepTime, getControlContext, getControlMenus, getCursorReadout, getCursorReadoutInner, getData, getDataChoice, getDataChoices, getDataForDisplayList, getDataInstance, getDataInstance, getDataProjectionForMenu, getDataSelection, getDataSources, getDataTimeRange, getDataTimeRange, getDataTimeSet, getDebugDetails, getDefaultColorScaleInfo, getDefaultDisplayListTemplate, getDefaultDistanceUnit, getDefaultFastRendering, getDefaultSamplingMode, getDefaultSamplingModeValue, getDefaultView, getDefaultViewDescriptor, getDefaultViewManager, getDetailsContents, getDisplayAltitudeType, getDisplayCategory, getDisplayCenter, getDisplayConventions, getDisplayId, getDisplayInfos, getDisplayListColor, getDisplayListData, getDisplayListDisplayable, getDisplayListTemplate, getDisplayMaster, getDisplayName, getDisplayScale, getDisplayUnit, getDisplayUnitName, getDisplayVisibility, getDoCursorReadout, getEditMenuItems, getExpandedInTabs, getExtraLabelTemplate, getExtraLegendComponent, getExtraMenus, getFileMenuItems, getFileMenuItems, getGraphicsConfiguration, getGrid, getGrid, getHadDataChoices, getHaveInitialized, getHelpIds, getHelpMenuItems, getId, getIdv, getImage, getImage, getInitDataChoices, getInitialFastRendering, getInitialZPosition, getInternalAnimation, getInternalAnimation, getIsProgressiveResolution, getIsRaster, getIsTimeDriver, getLabel, getLastFileMenuItems, getLatLonPoints, getLegendButtons, getLegendComponent, getLegendLabel, getLegendLabelTemplate, getLegendToolTip, getLineWidth, getLineWidthWidget, getLineWidthWidgetLabel, getLockVisibilityToggle, getLongParamName, getMainPanel, getMainPanelSize, getMakeWindow, getMapDisplay, getMapViewManager, getMapViewProjection, getMatchDisplayRegion, getMenuLabel, getMyDataChoices, getNavigatedDisplay, getNoteText, getObjectStore, getOkToFireEvents, getOldColorTableOrInitialColorTable, getOriginalDataChoicesLabel, getOuterContents, getPointSize, getProperty, getProperty, getPropertyDisplayName, getRange, getRangeForColorTable, getRangeToApply, getRequestProperties, getSamplingModeName, getSamplingModeValue, getSamplingModeValue, getSaveMenuItems, getSelectRange, getSelectRangeEnabled, getSelectRangeWidget, getSettingsPanel, getShortParamName, getShoulDoProgressiveResolution, getShowInDisplayList, getShowInLegend, getShowInTabs, getShowNoteText, getSkipValue, getSkipWidgetLabel, getSmoothingFactor, getSmoothingType, getSomeAnimation, getStore, getTemplateName, getTextureQuality, getTextureQualityLabel, getTimeSet, getTitle, getTransientProperty, getUnitForColor, getUseFastRendering, getUsesTimeDriver, getUseTimesInAnimation, getVersion, getVerticalValue, getViewAnimation, getViewContext, getViewer, getViewManager, getViewManager, getViewManager, getViewManagerClassNames, getViewManagerForCapture, getViewManagers, getViewMenuItems, getViewMenuItems, getVisbilityAnimationPause, getWasUnPersisted, getWindow, getWindowSize, getWindowVisible, getWindowX, getWindowY, getZPosition, getZPositionSliderLabel, guiExported, guiImported, handleDisplayChanged, handleWindowClosing, hasForecastHourMacro, hasMapProjection, hasTimeMacro, haveDataTimes, haveParameterDefaults, hide, hyperlinkUpdate, inGlobeDisplay, init, init, init, initAfterUnPersistence, initAfterUnPersistence, initAsPrototype, initAsTemplate, initBasic, initializeWithNewData, initWindow, isDisplay3D, isGuiShown, isInitDone, isInTransectView, isInViewManager, itemStateChanged, loadDataFromViewBounds, makeChangeColorMenuItems, makeLegendLabel, makeLockButton, makeRemoveButton, moveTo, notifyViewManagersOfChange, parseProperties, popup, popupDataDialog, popupDataDialog, popupDataDialog, processRequestProperties, putTransientProperty, reallySetAttributeFlags, redoGuiLayout, reloadDataSource, reloadDataSourceInThread, relocateDisplay, removeDataChoice, removeDisplayable, removeDisplayables, removeDisplayables, removeOnWindowClose, removePropertyChangeListener, resetData, resetDimness, resetViewManager, revertToDefaultColorTable, revertToDefaultColorTable, revertToDefaultRange, revertToDefaultRange, saveAsFavorite, saveAsParameterDefaults, saveAsPrototype, saveAsTemplate, saveDataChoiceInCache, saveImage, saveProjection, selectDataChoices, setAnimationInfo, setAnimationSet, setAttributeFlags, setCachedData, setCanDoRemoveAll, setCategories, setCollapseLegend, setColor, setColorBrighter, setColorDimmer, setColorDimness, setColorScaleInfo, setColorScaleVisible, setColorTable, setColorTable, setColorTableName, setColorUnit, setColorUnitName, setComponentHolder, setContents, setContourInfo, setContourInfoParams, setData, setDataChoices, setDataInstance, setDataInstances, setDataSelection, setDataTimeRange, setDefaultSamplingMode, setDefaultView, setDisplayableVisibility, setDisplayableVisiblity, setDisplayActive, setDisplayAreaSubset, setDisplayCategory, setDisplayId, setDisplayInactive, setDisplayListColor, setDisplayListColor, setDisplayListProperties, setDisplayListTemplate, setDisplayListTimeZone, setDisplayName, setDisplayUnit, setDisplayUnitName, setDisplayVisibility, setDoCursorReadout, setExpandedInTabs, setExtraLabelTemplate, setHadDataChoices, setHelpUrl, setId, setInitDataChoices, setInitialSettings, setInitialViewManager, setIsProgressiveResolution, setIsRaster, setIsTimeDriver, setLabelAsPreference, setLegendBackground, setLegendForeground, setLegendLabel, setLegendLabelTemplate, setLineWidth, setLockVisibilityToggle, setMainPanelDimensions, setMainPanelSize, setMakeWindow, setMatchDisplayRegion, setName, setNameFromUser, setNewColorUnit, setNewDisplayUnit, setNoteText, setOkToFireEvents, setOriginalDataChoicesLabel, setParamName, setPersistedVisadData, setProjectionInView, setProjectionInView, setProjectionInView, setProperty, setRange, setRange, setSelectRange, setSelectRangeEnabled, setSettingsDisplayUnit, setSharedColorScaleInfo, setShowInDisplayList, setShowInLegend, setShowInTabs, setShowNoteText, setSkipValue, setSmoothingFactor, setSmoothingType, setTemplateName, setTextureQuality, setTitle, setUnitForColor, setUseFastRendering, setUsesTimeDriver, setUseTimesInAnimation, setVersion, setViewer, setViewManagerClassNames, setVisbilityAnimationPause, setWindowSize, setWindowVisible, setWindowX, setWindowY, setZPosition, setZPosition, shouldAddAnimationListener, shouldApplyFastRendering, shouldBeDocked, shouldWindowBeVisible, show, showColorControlWidget, showColorDialog, showColorDialog, showColorScaleDialog, showColorScales, showColorSwatches, showContourPropertiesDialog, showDetails, showDisplaySettingsDialog, showHelp, showLegendMenu, showNormalCursor, showProperties, showTimeRangeDialog, showWaitCursor, timeChanged, toFront, toggleNoteTextArea, toggleVisibilityForVectorGraphicsRendering, toggleWindow, toString, transectChanged, updateAnimation, updateDataInstance, updateDataSelection, updateDisplayList, updateGridDataInstance, updateLegendAndList, updateLegendLabel, updateLockButton, useSmoothingFactor, useZPosition, viewManagerChanged, viewManagerDestroyed, viewpointChanged, writeTestArchive, xxxsetDisplayActive, zSliderChanged
Methods inherited from class ucar.unidata.idv.control.DisplayControlBase
boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToScreen, calculateRectangle, createStationTfo, earthToBox, earthToBox, earthToBoxTuple, earthToScreen, formatLevels, getLabeledReal, getLevelReal, getScreenCenter, getSelectedStation, getTmpProperty, isLeftButtonDown, logException, logException, makeEarthLocation, putTmpProperty, removeTmpProperty, screenToBox, screenToBox, screenToEarth, setStations, setStations, toBox, toEarth, userErrorMessage, userMessage
Methods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ucar.unidata.idv.DisplayControl
getTmpProperty, putTmpProperty, removeTmpProperty
Methods inherited from interface ucar.unidata.collab.Sharable
getReceiveShareTime, getShareGroup, getSharing, getUniqueId, setReceiveShareTime
-
Field Details
-
MACRO_LEVEL
Macro for the level for the label- See Also:
-
SHARE_LEVEL
property for sharing levels- See Also:
-
currentLevels
list of current levels -
levelReadout
level readout label -
currentSlice
current slice -
currentLevel
current level -
datachoice
data choice for the data -
haveEnsemble
protected boolean haveEnsembleflag for ensembles
-
-
Constructor Details
-
PlanViewControl
public PlanViewControl()Cstr; does nothing. See init() for creation actions.
-
-
Method Details
-
getCursorReadoutData
Get the cursor readout data- Overrides:
getCursorReadoutData
in classGridDisplayControl
- Returns:
- the data
- Throws:
Exception
- problem getting data
-
setCurrentSlice
Set the current slice- Parameters:
slice
- the slice- Throws:
Exception
- problem setting the slice
-
getCurrentSlice
Get the current slice- Returns:
- the current data for the plan view
- Throws:
Exception
- problem getting the data
-
getForwardValue
public float getForwardValue()Needed for bundles/persistence - pressure levels dwell rate slider and text box- Returns:
-
setForwardValue
public void setForwardValue(float forwardValue) Needed for bundles/persistence - pressure levels dwell rate slider and text box- Parameters:
forwardValue
-
-
getCursorReadoutInner
protected List getCursorReadoutInner(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) throws Exception Get the cursor data- Overrides:
getCursorReadoutInner
in classGridDisplayControl
- Parameters:
el
- earth locationanimationValue
- the animation valueanimationStep
- the animation stepsamples
- the list of samples- Returns:
- the list of readout data
- Throws:
Exception
- problem getting the data
-
getDataProjectionLabel
Get the Data projection label- Overrides:
getDataProjectionLabel
in classDisplayControlImpl
- Returns:
- the label
-
addDisplaySettings
Add DisplaySettings appropriate for this display- Overrides:
addDisplaySettings
in classDisplayControlImpl
- Parameters:
dsd
- the dialog to add to
-
addToRangeMenu
Add an entry into the range menu- Overrides:
addToRangeMenu
in classDisplayControlImpl
- Parameters:
rw
- The widget that manages the range dialogitems
- List of menu items
-
getLevelColorRange
Get the range for the current slice.- Returns:
- range or null
-
init
Called to make this kind of Display Control; also calls code to made the Displayable. This method is called from inside DisplayControlImpl init(several args).- Overrides:
init
in classDisplayControlImpl
- Parameters:
dataChoice
- the DataChoice of the moment.- Returns:
- true if successful
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
initDone
public void initDone()What to do when you are done.- Overrides:
initDone
in classDisplayControlImpl
-
getPolyModeComboBox
Create a jcombobox for setting the polygon mode.- Returns:
- polygon mode combo box
-
propertyChange
Handle property change- Specified by:
propertyChange
in interfacePropertyChangeListener
- Overrides:
propertyChange
in classDisplayControlImpl
- Parameters:
evt
- The event
-
doRemove
Remove this control- Specified by:
doRemove
in interfaceDisplayControl
- Overrides:
doRemove
in classDisplayControlImpl
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD data problem
-
haveMultipleFields
protected boolean haveMultipleFields()Return whether the Data held by this display control contains multiple fields (e.g., for the isosurface colored by another parameter- Overrides:
haveMultipleFields
in classGridDisplayControl
- Returns:
- true if there are multiple fields
-
getColorRangeIndex
protected int getColorRangeIndex()Returns the index to use in the GridDataInstance array of ranges for color ranges. If we are being draped over topography then return 0. Else return the default value from the parent class.- Overrides:
getColorRangeIndex
in classGridDisplayControl
- Returns:
- The index to be used for the color range.
-
setData
Called to initialize this control from the given dataChoice; sets levels controls to match data; make data slice at first level; set display's color table and display units.- Overrides:
setData
in classDisplayControlImpl
- Parameters:
dataChoice
- choice that describes the data to be loaded.- Returns:
- true if successful
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
addTopographyMap
Wrapper aroundGridDisplayControl.addTopographyMap(int)
to allow subclasses to set their own index.- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD error
-
addParameterTopographyMap
Add a topography map for the parameter- Throws:
RemoteException
- Java RMI problemVisADException
- Unable to set the ScalarMap
-
setVerticalRange
Set the range on the parameter topography ScalarMap- Parameters:
vertRange
- the vertical range
-
getVerticalRange
Get the vertical range- Returns:
- the vertical range
-
haveLevels
public boolean haveLevels()Determine whether the data in thisPlanViewControl
has levels or not.- Returns:
- true if multi level data
-
setLevels
If there are, or are not, some levels in the data, set the controls accordingly. If no levels exist, you do not enable the menu to set levels for example.- Parameters:
levels
- array of levels
-
getEditMenuItems
Overwrite the base class method to add a Levels menu to the edit menu- Overrides:
getEditMenuItems
in classDisplayControlImpl
- Parameters:
items
- Menu items to add toforMenuBar
- Is this edit menu for the main menu bar
-
getPlanDisplay
Return the displayable of the Plan View as a DisplayableData.- Returns:
DisplayableData
that is being used for the main depiction of thisPlanDisplay
-
getGridDisplayable
Return theDisplayable
of the Plan View as aGridDisplayable
.- Returns:
Displayable
cast to aGridDisplay
-
setPointSize
public void setPointSize(float value) Set the point size- Overrides:
setPointSize
in classDisplayControlImpl
- Parameters:
value
- the size
-
createPlanDisplay
Method for creating theDisplayableData
object that is the main depiction for the data controlled by thisPlanViewControl
; implemented by each subclass.- Returns:
DisplayableData
for the data depiction.- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
projectionChanged
public void projectionChanged()Method to call if projection changes. Handle topography changes.- Specified by:
projectionChanged
in interfaceDisplayControl
- Overrides:
projectionChanged
in classDisplayControlImpl
-
getLevel
Return active level value.- Returns:
- active level
-
setLevel
Set the active level.- Overrides:
setLevel
in classGridDisplayControl
- Parameters:
pl
- present level.
-
setSettingsLevel
Set the active level.- Parameters:
level
- present level.
-
setDataSelectionLevel
Set the level in the data selection- Parameters:
level
- The level
-
setLevelFromUser
Set the level from the user- Overrides:
setLevelFromUser
in classGridDisplayControl
- Parameters:
pl
- level- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
relocateDisplay
public void relocateDisplay(ucar.unidata.geoloc.LatLonRect originalBounds, ucar.unidata.geoloc.LatLonRect newBounds, boolean useDataProjection) When we relocate a bundle this gets called to relocate the display This method gets overwritten by the probe and cross section displays so they can move their selection points to a new location- Overrides:
relocateDisplay
in classDisplayControlImpl
- Parameters:
originalBounds
- The original bounds of the datasourcenewBounds
- The relocated bounds of the datasource
-
loadDataAtLevel
Load data at the level specified. Uses the working grid.- Parameters:
level
- level to load at- Throws:
VisADException
- illegal level or other VisAD errorRemoteException
- RMI error
-
getSliceForDisplay
Get the slice for the display- Parameters:
slice
- slice to use- Returns:
- slice with skip value applied
- Throws:
VisADException
- problem subsetting the slice
-
applySmoothing
Use the value of the smoothing type and weight to subset the data.- Overrides:
applySmoothing
in classDisplayControlImpl
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
checkFlag
protected boolean checkFlag(int f) Test if the given flag is set in the attrbiuteFlags- Overrides:
checkFlag
in classDisplayControlImpl
- Parameters:
f
- The flag to check- Returns:
- Is the given flag set
-
getMacroNames
Add any macro name/label pairs- Overrides:
getMacroNames
in classDisplayControlImpl
- Parameters:
names
- List of macro nameslabels
- List of macro labels
-
addLabelMacros
Add any macro name/value pairs.- Overrides:
addLabelMacros
in classDisplayControlImpl
- Parameters:
template
- templatepatterns
- The macro namesvalues
- The macro values
-
getLegendLabels
Append any label information to the list of labels.- Overrides:
getLegendLabels
in classDisplayControlImpl
- Parameters:
labels
- in/out list of labelslegendType
- The type of legend, BOTTOM_LEGEND or SIDE_LEGEND
-
formatLevel
Format the level for labelling. If subclasses want to have different formatting, they can override this method. Check for 'currentLevel' to have a non-numeric: SFC, MSL, or TRO and if so, return just that String...- Parameters:
level
- level to format- Returns:
- formatted string for level
-
doMakeContents
Make some Plan view controls for the UI.- Overrides:
doMakeContents
in classDisplayControlImpl
- Returns:
- create the contents for the UI.
-
getControlWidgets
public void getControlWidgets(List<ControlWidget> controlWidgets) throws VisADException, RemoteException Add in any special control widgets to the current list of widgets.- Overrides:
getControlWidgets
in classDisplayControlImpl
- Parameters:
controlWidgets
- list of control widgets- Throws:
VisADException
- VisAD errorRemoteException
- RMI error
-
displayUnitChanged
A hook that is called when the display unit is changed. Allows derived classes to act accordingly.- Overrides:
displayUnitChanged
in classDisplayControlImpl
- Parameters:
oldUnit
- The old color unitnewUnit
- The new color unit
-
shouldShowLevelWidget
protected boolean shouldShowLevelWidget()This allows for derived classes to turn this off. Subclasses should override if not true- Returns:
- true
-
shouldShowZSelector
protected boolean shouldShowZSelector()This allows for derived classes to turn this off. Subclasses should override if not true- Returns:
- true
-
shouldUseZPosition
protected boolean shouldUseZPosition()Determine if the display and gui should have a z position. This is only used when we are also not showing the level widget- Returns:
- Should use z position
-
setIs2D
public void setIs2D(boolean v) Set the property.- Parameters:
v
- true if it is 2D
-
getIs2D
public boolean getIs2D()Get the property.- Returns:
- true if this is 2D data
-
setLevelReadoutLabel
Set the text for the level readout in the control window.- Parameters:
text
- text for the level readout
-
setMultipleIsTopography
public void setMultipleIsTopography(boolean v) Set the other is topography property.- Parameters:
v
- true if second parameter is topography
-
getMultipleIsTopography
public boolean getMultipleIsTopography()Get the multiple is topography property.- Returns:
- true if multiple grid is topography
-
setParameterIsTopography
public void setParameterIsTopography(boolean v) Set the parameter is topography property.- Parameters:
v
- true if second parameter is topography
-
getParameterIsTopography
public boolean getParameterIsTopography()Get the parameter is topography property.- Returns:
- true if multiple grid is topography
-
setIgnoreVerticalDimension
public void setIgnoreVerticalDimension(boolean v) Set the ignore Vertical Dimension property- Parameters:
v
- true if vertical dimension should be ignored
-
getIgnoreVerticalDimension
public boolean getIgnoreVerticalDimension()get the Ignore Vertical Dimension property- Returns:
- true if vertical dimension should be ignored
-
getLevelsLabel
Get the label for the levels box.- Returns:
- the label
-
canExportData
public boolean canExportData()Can this display control write out data.- Overrides:
canExportData
in classDisplayControlImpl
- Returns:
- true if it can
-
getDisplayedData
Get the DisplayedData- Overrides:
getDisplayedData
in classDisplayControlImpl
- Returns:
- the data or null
- Throws:
RemoteException
- problem reading remote dataVisADException
- problem gettting data
-
applySkipFactor
protected void applySkipFactor()Use the value of the skip factor to subset the data.- Overrides:
applySkipFactor
in classDisplayControlImpl
-
setPolygonMode
public void setPolygonMode(int v) Set the type of depiction (solid, line, mesh) for this display- Parameters:
v
- polygon mode. Used by XML persistence.
-
getPolygonMode
public int getPolygonMode()Return the type of depiction for this display- Returns:
- true if shading is smoothed.
-