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 TypeClassDescriptionclassA 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 Objectcurrent levelprotected Object[]list of current levelsprotected FieldImplcurrent sliceprotected DataChoicedata choice for the dataprotected booleanflag for ensemblesprotected JLabellevel readout labelstatic final StringMacro for the level for the labelstatic final Stringproperty for sharing levelsFields inherited from class ucar.unidata.idv.control.GridDisplayControl
CMD_CONTOURDIALOG, CMD_SETLEVELS, gridDataInstance, INITIAL_PROBE_EARTHLOCATION, log_, settingLevelFields 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, ZFUDGEFields 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_AVERAGEFields 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 voidAdd DisplaySettings appropriate for this displayprotected voidaddLabelMacros(String template, List patterns, List values) Add any macro name/value pairs.protected voidAdd a topography map for the parameterprotected voidWrapper aroundGridDisplayControl.addTopographyMap(int)to allow subclasses to set their own index.voidaddToRangeMenu(RangeWidget rw, List items) Add an entry into the range menuprotected voidUse the value of the skip factor to subset the data.protected voidUse the value of the smoothing type and weight to subset the data.booleanCan this display control write out data.protected booleancheckFlag(int f) Test if the given flag is set in the attrbiuteFlagsprotected abstract DisplayableDataMethod for creating theDisplayableDataobject that is the main depiction for the data controlled by thisPlanViewControl; implemented by each subclass.protected voiddisplayUnitChanged(Unit oldUnit, Unit newUnit) A hook that is called when the display unit is changed.Make some Plan view controls for the UI.voiddoRemove()Remove this controlprotected StringformatLevel(Object level) Format the level for labelling.protected intReturns the index to use in the GridDataInstance array of ranges for color ranges.voidgetControlWidgets(List<ControlWidget> controlWidgets) Add in any special control widgets to the current list of widgets.protected FieldImplGet the current sliceprotected DataGet the cursor readout dataprotected ListgetCursorReadoutInner(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) Get the cursor dataprotected StringGet the Data projection labelprotected DataGet the DisplayedDataprotected voidgetEditMenuItems(List items, boolean forMenuBar) Overwrite the base class method to add a Levels menu to the edit menufloatNeeded for bundles/persistence - pressure levels dwell rate slider and text boxReturn theDisplayableof the Plan View as aGridDisplayable.booleanget the Ignore Vertical Dimension propertybooleangetIs2D()Get the property.voidgetLegendLabels(List labels, int legendType) Append any label information to the list of labels.getLevel()Return active level value.protected RangeGet the range for the current slice.Get the label for the levels box.protected voidgetMacroNames(List names, List labels) Add any macro name/label pairsbooleanGet the multiple is topography property.booleanGet the parameter is topography property.Return the displayable of the Plan View as a DisplayableData.intReturn the type of depiction for this displayprotected JComboBoxCreate a jcombobox for setting the polygon mode.protected FieldImplgetSliceForDisplay(FieldImpl slice) Get the slice for the displayGet the vertical rangebooleanDetermine whether the data in thisPlanViewControlhas levels or not.protected booleanReturn whether the Data held by this display control contains multiple fields (e.g., for the isosurface colored by another parameterbooleaninit(DataChoice dataChoice) Called to make this kind of Display Control; also calls code to made the Displayable.voidinitDone()What to do when you are done.voidloadDataAtLevel(Object level) Load data at the level specified.voidMethod to call if projection changes.voidHandle property changevoidreceiveShareData(Sharable from, Object dataId, Object[] data) Method called by other classes that share the selector.voidrelocateDisplay(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 voidsetCurrentSlice(FieldImpl slice) Set the current sliceprotected booleansetData(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.voidsetDataSelectionLevel(Object level) Set the level in the data selectionvoidsetForwardValue(float forwardValue) Needed for bundles/persistence - pressure levels dwell rate slider and text boxvoidsetIgnoreVerticalDimension(boolean v) Set the ignore Vertical Dimension propertyvoidsetIs2D(boolean v) Set the property.voidSet the active level.protected voidSet the level from the uservoidsetLevelReadoutLabel(String text) Set the text for the level readout in the control window.voidIf there are, or are not, some levels in the data, set the controls accordingly.voidsetMultipleIsTopography(boolean v) Set the other is topography property.voidsetParameterIsTopography(boolean v) Set the parameter is topography property.voidsetPointSize(float value) Set the point sizevoidsetPolygonMode(int v) Set the type of depiction (solid, line, mesh) for this displayvoidsetSettingsLevel(Object level) Set the active level.voidsetVerticalRange(Range vertRange) Set the range on the parameter topography ScalarMapprotected booleanThis allows for derived classes to turn this off.protected booleanThis allows for derived classes to turn this off.protected booleanDetermine 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, shouldAddDisplayListenerMethods 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, zSliderChangedMethods 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, userMessageMethods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialogMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ucar.unidata.idv.DisplayControl
getTmpProperty, putTmpProperty, removeTmpPropertyMethods 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:
getCursorReadoutDatain 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:
getCursorReadoutInnerin 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:
getDataProjectionLabelin classDisplayControlImpl- Returns:
- the label
-
addDisplaySettings
Add DisplaySettings appropriate for this display- Overrides:
addDisplaySettingsin classDisplayControlImpl- Parameters:
dsd- the dialog to add to
-
addToRangeMenu
Add an entry into the range menu- Overrides:
addToRangeMenuin 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:
initin 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:
initDonein classDisplayControlImpl
-
getPolyModeComboBox
Create a jcombobox for setting the polygon mode.- Returns:
- polygon mode combo box
-
propertyChange
Handle property change- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classDisplayControlImpl- Parameters:
evt- The event
-
doRemove
Remove this control- Specified by:
doRemovein interfaceDisplayControl- Overrides:
doRemovein 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:
haveMultipleFieldsin 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:
getColorRangeIndexin 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:
setDatain 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 thisPlanViewControlhas 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:
getEditMenuItemsin 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:
DisplayableDatathat is being used for the main depiction of thisPlanDisplay
-
getGridDisplayable
Return theDisplayableof the Plan View as aGridDisplayable.- Returns:
Displayablecast to aGridDisplay
-
setPointSize
public void setPointSize(float value) Set the point size- Overrides:
setPointSizein classDisplayControlImpl- Parameters:
value- the size
-
createPlanDisplay
Method for creating theDisplayableDataobject that is the main depiction for the data controlled by thisPlanViewControl; implemented by each subclass.- Returns:
DisplayableDatafor 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:
projectionChangedin interfaceDisplayControl- Overrides:
projectionChangedin classDisplayControlImpl
-
getLevel
Return active level value.- Returns:
- active level
-
setLevel
Set the active level.- Overrides:
setLevelin 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:
setLevelFromUserin 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:
relocateDisplayin 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:
applySmoothingin 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:
checkFlagin classDisplayControlImpl- Parameters:
f- The flag to check- Returns:
- Is the given flag set
-
getMacroNames
Add any macro name/label pairs- Overrides:
getMacroNamesin classDisplayControlImpl- Parameters:
names- List of macro nameslabels- List of macro labels
-
addLabelMacros
Add any macro name/value pairs.- Overrides:
addLabelMacrosin classDisplayControlImpl- Parameters:
template- templatepatterns- The macro namesvalues- The macro values
-
getLegendLabels
Append any label information to the list of labels.- Overrides:
getLegendLabelsin 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:
doMakeContentsin 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:
getControlWidgetsin 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:
displayUnitChangedin 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:
canExportDatain classDisplayControlImpl- Returns:
- true if it can
-
getDisplayedData
Get the DisplayedData- Overrides:
getDisplayedDatain 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:
applySkipFactorin 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.
-