Package ucar.unidata.idv.control
Class StationModelControl
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.idv.control.DisplayControlBase
ucar.unidata.idv.control.DisplayControlImpl
ucar.unidata.idv.control.ObsDisplayControl
ucar.unidata.idv.control.StationModelControl
- All Implemented Interfaces:
ActionListener,ItemListener,PropertyChangeListener,EventListener,HyperlinkListener,Sharable,DataChangeListener,DisplayControl,Prototypable,ControlListener,DisplayListener
- Direct Known Subclasses:
StationLocationControl
A DisplayControl for station models
- Version:
- $Revision: 1.228 $
- Author:
- MetApps Development Team
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.unidata.idv.control.ObsDisplayControl
ObsDisplayControl.RealWrapperNested classes/interfaces inherited from class ucar.unidata.idv.control.DisplayControlImpl
DisplayControlImpl.SideLegendLabel -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FieldImplThe currently displayed dataprotected ListList of components to disable when not delcutteringprotected Listfilters for showing dataprotected FieldImplKeep around the last set of decluttered dataprotected LayoutModelWidgetThe widget to show the layout model in the guiprotected static ImageIconThe icon used to show locked legend componentsprotected booleanDo we not declutter and just use the last set of decluttered stationsprotected ListList of components to disable when not delcutteringprotected static ImageIconThe icon used to show unlocked legend componentsprotected JPanelholds the z position sliderFields inherited from class ucar.unidata.idv.control.ObsDisplayControl
colNames, colString, FIELD_ALL, format, LABEL_ALT, LABEL_LAT, LABEL_LON, LABEL_TIMEFields 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, log_, 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 TypeMethodDescriptionvoidaddChartParam(String paramName) Add a chart parametereprotected JComponentaddDensityComp(JComponent comp) Add the given component into the list of density components that are to be enabled/disabled when the declutter checkbox is toggled.protected voidAdd properties to the display settings dialogprotected JComponentAdd the given component into the list of time declutter components that are to be enabled/disabled when the declutter checkbox is toggled.voidApply the vis filtersvoidHandle some sort of time change.protected LinearLatLonSetcalculateLatLonBounds(Rectangle2D screenBounds) Calculate the LatLonBounds based on the VisAD screen bound.protected booleanDoes this control support progressive resolution? Subclasses should override.voidHandle a chart changed eventprotected StationModelDisplayableCreate theStationModelDisplayableused by thisDisplayControl.voidsomehow the dateselection is not updated, in GLM drived by time driverprotected floatdecodeFilterString(String filter) Decode the selected filter string and return the corresponding filter.protected voidDo the initial update legend and listprotected ContainerMake Gui contentsprotected JComponentdoMakeFilterGui(boolean includeAll) Make the filter GUIprotected JComponentMake the side legend componentprotected JPanelMake the gui panel for vertical positionvoiddoRemove()Remove this DisplayControl from the system.voidPopup the station model editorvoidExport the table as csvvoidExport the data as KMZprotected voidHandle when the value in the column field has changed.protected FieldImplfilterData(FieldImpl obs) Apply the filters to the given dataprotected PointObfindClosestOb(EarthLocation el, FieldImpl theField) Find the closest ob in the field to the particular EarthLocationvoidHave we been unpersisted into a view manager that has not been displayed yet?booleanGet the AskedUserToDeclutterTime property.protected Rectangle2DGet the bounds for the visible portion of the screen.getChart()Get the chartGet the ChartParams property.Get theColorTableproperty.protected ColorTableGet the color table to use when applying to displayablesReturn the label that is to be used for the color widgetvoidgetControlWidgets(List controlWidgets) Get any control widgets special to this control and add them to the list.Get the MapProjection for this data; if have a single point data object make synthetic map projection for locationprotected StringWhat label should be used for the data projectionbooleanGet whether this DisplayControl should be decluttered or not.floatGet whether this DisplayControl should be decluttered or not.protected JPanelCreate the 'Low' slider 'High' jpanel for the density slider.floatGet the scale the user can enterprotected voidgetEditMenuItems(List items, boolean forMenuBar) Get edit menu itemsprotected JComponentgetExtraLegendComponent(int legendType) Assume that any display controls that have a color table widget will want the color table to show up in the legend.protected ListReturn the list of names that shows up in the filter gui names combob box.Get the Filters property.booleanGet the FiltersEnabled property.Get the image of "what".protected ColorTableOverwrite base class method so we don't have any color table.Create and return the lcok buttonbooleanGet the MatchAll property.booleanGet the OnlyShowFiltered property.Get the range for the color table.Overwrite base class method to return the color range to use when applying to displayables.protected voidgetSaveMenuItems(List items, boolean forMenuBar) Add the relevant file menu items into the listprotected floatgetScale()Get the scaling used for this object to control the size of the shapes.protected floatA utility to get the scale from the dislayableGet the SelectedObId property.Get the SelectedObLocation property.booleanGet the ShouldUseAltitude property.Get the current station model view.Gets the name of theStationModel.booleanGet the locking of the stations parameterGet the StationModel property.Get the TimeSeries property.protected TupleTypeProvide to the base class the type of the obsbooleanGet the use data times property.booleanGet the UseLastTime property.protected voidgetViewMenuItems(List items, boolean forMenuBar) Add a few things to the View Menu specific to this controlprotected voidhandleChangedStationModel(StationModel changedModel) The station model changedvoidListen for DisplayEventsprotected voidhandleMousePressed(EarthLocation el, DisplayEvent evt) Handle the mouse pressed event in the main displayvoidhandleOnlyShow(int index) call back from radio buttons in gui for filtersprotected booleanDo we have any filtersbooleaninit(DataChoice dataChoice) Call to help make this kind of Display Control; also calls code to made the Displayable (empty of data thus far).voidinitAfterUnPersistence(ControlContext vc, Hashtable properties) Initailize after we have been unpersisted.protected voidinitDisplayable(StationModelDisplayable myDisplay) Initialize the displayable with anothervoidinitDone()Init is donevoidInit the vis filtersprotected booleanIs the chart enabled?booleanAre we fully initializedprotected voidloadData()Load data into theDisplayable.protected voidThis checks to see if we have a pending loadData call (from a prior event).protected voidA utility method that sets the wait cursor and calls loadData in a separate thread .protected voidmakeStationModelEditMenuItems(List items, boolean forMenuBar) Get edit menu itemsvoidMethod to call if projection changes.voidProperty change method.voidremoveChartParam(PointParam pointParam) Remove a parameters from the chartprotected voidThis gets called when the control has received notification of a dataChange event.voidsetAskedUserToDeclutterTime(boolean value) Set the AskedUserToDeclutterTime property.voidsetChartParams(List value) Set the PlotVars property.voidrecieve the chart display settingsprotected booleansetData(DataChoice choice) Set the data for this instance from the choice supplied.voidsetDeclutter(boolean v) Set whether this DisplayControl should be decluttered or not.voidsetDeclutterFilter(float filter) Set whether the filtering for decluttering.voidsetDisplayableScale(float f) Set the scale the user can entervoidsetFilters(List value) Set the Filters property.voidsetFiltersEnabled(boolean value) Set the FiltersEnabled property.protected voidsetLayoutModel(String id, StationModel stationModel) Set layout modelvoidsetMatchAll(boolean value) Set the MatchAll property.voidsetOnlyShowFiltered(boolean value) Set the OnlyShowFiltered property.voidA utility to set the scale on the dislayableprotected voidsetScaleOnDisplayable(float f) A utility to set the scale on the dislayablevoidsetSelectedObId(String value) Set the SelectedObId property.voidsetSelectedObLocation(LatLonPoint value) Set the SelectedObLocation property.voidsetShouldUseAltitude(boolean value) Set the ShouldUseAltitude property.voidsetShouldUseAltitudeIndex(int index) Set the ShouldUseAltitude property.voidsetShowAllTimes(boolean value) Set the show all times property.voidsetShowThumbNail(boolean value) Set the ShowThumbNail property.voidSet the station modelvoidSets the name of theStationModel.voidsetStationsLocked(boolean v) Set the locking of the stations parametervoidsetTheStationModel(StationModel value) Set the StationModel property.voidsetTimeSeries(TimeSeriesChart value) Set the TimeSeries property.voidsetUseDataTimes(boolean value) Set the use data times times property.voidsetUseLastTime(boolean value) Set the UseLastTime property.protected booleanSignal base class to add this as a control listenerprotected booleanSignal base class to add this as a display listenervoidshowLineProperties(PointParam pointParam) Show the line properties for the PointParamvoidtest()test methodprotected voidtimeChanged(Real time) Respond to a timeChange eventprotected voidHandle when the time decluttering state has changedvoidtoFront(PointParam pointParam) Bring the chart parameter to the frontvoidMethod called when a transect changes.protected voidSet the icon and the tooltip on the lock buttonprotected voidupdateTable(PointOb ob) Extract the observation values from the given ob and update the table.voidRespond to changes in the control.Methods inherited from class ucar.unidata.idv.control.ObsDisplayControl
applyPreferences, doDeclutterTime, doMakeDataInstance, doMakeFieldSelector, doMakeShowRawSelector, exportAsNetcdf, getColString, getColValue, getColValue, getDisplayUnit, getDisplayUnitName, getFieldsToShow, getIndex, getIndicesToShow, getParamLabel, getShowDataRaw, getTimeDeclutterComps, getTimeDeclutterEnabled, getTimeDeclutterMinutes, isIdParam, setColString, setShowDataRaw, setTimeDeclutterEnabled, setTimeDeclutterMinutes, showFieldSelector, updateTimeDeclutterMinutesMethods inherited from class ucar.unidata.idv.control.DisplayControlImpl
actionPerformed, activateDisplays, addAttributedDisplayable, addAttributedDisplayable, addAttributedDisplayable, addAttributeFlags, addCheckBoxSettings, addDataChoice, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayMaster, addLabelMacros, addNewData, addNoteText, addPropertiesComponents, addPropertyChangeListener, addRemovable, addSharable, addTimeModeWidget, addToControlContext, addToRangeMenu, addToRangeMenu, addToRangeMenu, addViewManager, appendDataChoices, applyAttributesToDisplayables, applyColor, applyColorScaleInfo, applyColorTable, applyColorUnit, applyContourInfo, applyDisplaySetting, applyDisplayUnit, applyForecastHourMacro, applyLineWidth, applyProperties, applyProperties, applyPropertyValues, applyRange, applySelectRange, applySkipFactor, applySmoothing, applyTextureQuality, applyZPosition, boundsClose, canBeDocked, canExportData, canSaveDataInCache, captureWindow, centerOnDisplay, changeColorUnit, changeDisplayUnit, checkBoundsChange, checkFlag, checkIfDataOk, checkImageSize, clearDataInstance, clearPrototype, clearViewManagers, close, colorUnitChanged, controlChanged, convertColorRange, convertRange, createDisplayListDisplayable, createIdvWindow, deactivateDisplays, debug, displayableToFront, displayChanged, displayControlFailed, displayUnitChanged, doApplyProperties, doExport, doMakeBottomLegendComponent, doMakeChangeColorMenu, doMakeChangeColorMenu, doMakeChangeParameterMenuItem, doMakeColorControl, doMakeColorControl, doMakeColorScales, doMakeMenuBar, doMakeMenuBarMenus, doMakePointSizeWidget, doMakeRemoveControl, doMakeSkipFactorSlider, doMakeSmoothingWidget, doMakeTextureSlider, doMakeVisibilityControl, doMakeWidgetComponent, doMakeWindow, doMakeZPositionSlider, exportDisplayedData, findDisplayInfo, findDisplays, findDisplays, firePropertyChangeEvent, formatForCursorReadout, getActive, getAnimation, getAnimation, getAnimation, getAnimation, getAnimationInfo, getAnimationWidget, getAttributeFlags, getCachedData, getCanDoRemoveAll, getCategories, getChangeParameterLabel, getCollapseLegend, getColor, getColorDimness, getColorScaleInfo, getColorTableForDisplayable, getColorTableWidget, getColorUnit, getColorUnitName, getComponentHolder, getContents, getContourInfo, getControlChangeSleepTime, getControlContext, getControlMenus, getCursorReadout, getCursorReadoutInner, 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, getDisplayedData, getDisplayId, getDisplayInfos, getDisplayListColor, getDisplayListData, getDisplayListDisplayable, getDisplayListTemplate, getDisplayMaster, getDisplayName, getDisplayScale, getDisplayUnit, getDisplayUnit, getDisplayUnitName, getDisplayVisibility, getDoCursorReadout, getEditMenuItems, getExpandedInTabs, getExtraLabelTemplate, getExtraMenus, getFileMenuItems, getFileMenuItems, getGraphicsConfiguration, getGrid, getGrid, getHadDataChoices, getHaveInitialized, getHelpIds, getHelpMenuItems, getId, getIdv, getImage, getInitDataChoices, getInitialFastRendering, getInitialRange, getInitialZPosition, getInternalAnimation, getInternalAnimation, getIsProgressiveResolution, getIsRaster, getIsTimeDriver, getLabel, getLastFileMenuItems, getLatLonPoints, getLegendButtons, getLegendComponent, getLegendLabel, getLegendLabels, getLegendLabelTemplate, getLegendToolTip, getLineWidth, getLineWidthWidget, getLineWidthWidgetLabel, getLockVisibilityToggle, getLongParamName, getMacroNames, getMainPanel, getMainPanelSize, getMakeWindow, getMapDisplay, getMapViewManager, getMapViewProjection, getMatchDisplayRegion, getMenuLabel, getMyDataChoices, getNavigatedDisplay, getNoteText, getObjectStore, getOkToFireEvents, getOldColorTableOrInitialColorTable, getOriginalDataChoicesLabel, getOuterContents, getPointSize, getProperty, getProperty, getPropertyDisplayName, getRange, getRawDataUnit, getRequestProperties, getSamplingModeName, getSamplingModeValue, getSamplingModeValue, 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, getVisbilityAnimationPause, getWasUnPersisted, getWindow, getWindowSize, getWindowVisible, getWindowX, getWindowY, getZPosition, getZPositionSliderLabel, guiExported, guiImported, handleWindowClosing, hasForecastHourMacro, hasMapProjection, hasTimeMacro, haveDataTimes, haveParameterDefaults, hide, hyperlinkUpdate, inGlobeDisplay, init, init, init, initAfterUnPersistence, initAsPrototype, initAsTemplate, initBasic, initializeWithNewData, initWindow, isDisplay3D, isDisplayUnitAlsoColorUnit, isGuiShown, isInTransectView, isInViewManager, itemStateChanged, loadDataFromViewBounds, makeChangeColorMenuItems, makeLegendLabel, makeLockButton, makeRemoveButton, moveTo, notifyViewManagersOfChange, parseProperties, popup, popupDataDialog, popupDataDialog, popupDataDialog, processRequestProperties, putTransientProperty, reallySetAttributeFlags, receiveShareData, redoGuiLayout, reloadDataSource, reloadDataSourceInThread, relocateDisplay, relocateDisplay, removeDataChoice, removeDisplayable, removeDisplayables, removeDisplayables, removeOnWindowClose, removePropertyChangeListener, 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, setPointSize, 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, toFront, toggleNoteTextArea, toggleVisibilityForVectorGraphicsRendering, toggleWindow, toString, updateAnimation, updateDataInstance, updateDataSelection, updateDisplayList, updateGridDataInstance, updateLegendAndList, updateLegendLabel, updateLockButton, useSmoothingFactor, useZPosition, viewManagerChanged, viewManagerDestroyed, 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
-
lockIcon
The icon used to show locked legend components -
unlockIcon
The icon used to show unlocked legend components -
zPositionPanel
holds the z position slider -
layoutModelWidget
The widget to show the layout model in the gui -
stationsLocked
protected boolean stationsLockedDo we not declutter and just use the last set of decluttered stations -
filters
filters for showing data -
densityComps
List of components to disable when not delcuttering -
timeDeclutterComps
List of components to disable when not delcuttering -
lastDeclutteredData
Keep around the last set of decluttered data -
currentStationData
The currently displayed data
-
-
Constructor Details
-
StationModelControl
public StationModelControl()Default constructor.
-
-
Method Details
-
canDoProgressiveResolution
protected boolean canDoProgressiveResolution()Description copied from class:DisplayControlImplDoes this control support progressive resolution? Subclasses should override.- Overrides:
canDoProgressiveResolutionin classDisplayControlImpl- Returns:
- false
-
initAfterUnPersistence
Initailize after we have been unpersisted.- Specified by:
initAfterUnPersistencein interfaceDisplayControl- Overrides:
initAfterUnPersistencein classDisplayControlImpl- Parameters:
vc- The contextproperties- properties
-
init
Call to help make this kind of Display Control; also calls code to made the Displayable (empty of data thus far). 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:
VisADException- some problem creating a VisAD objectRemoteException- some problem creating a remote VisAD object
-
doInitialUpdateLegendAndList
protected void doInitialUpdateLegendAndList()Description copied from class:DisplayControlImplDo the initial update legend and list- Overrides:
doInitialUpdateLegendAndListin classDisplayControlImpl
-
initDisplayable
protected void initDisplayable(StationModelDisplayable myDisplay) throws VisADException, RemoteException Initialize the displayable with another- Parameters:
myDisplay- the display- Throws:
VisADException- some problem creating a VisAD objectRemoteException- some problem creating a remote VisAD object
-
initDone
public void initDone()Init is done- Overrides:
initDonein classDisplayControlImpl
-
isInitDone
public boolean isInitDone()Are we fully initialized- Specified by:
isInitDonein interfaceDisplayControl- Overrides:
isInitDonein classDisplayControlImpl- Returns:
- is init done
-
getImage
Get the image of "what".- Overrides:
getImagein classDisplayControlImpl- Parameters:
what- the thing to get- Returns:
- the image
- Throws:
Exception- On badness
-
shouldAddDisplayListener
protected boolean shouldAddDisplayListener()Signal base class to add this as a display listener- Overrides:
shouldAddDisplayListenerin classDisplayControlImpl- Returns:
- Add as display listener
-
shouldAddControlListener
protected boolean shouldAddControlListener()Signal base class to add this as a control listener- Overrides:
shouldAddControlListenerin classDisplayControlImpl- Returns:
- Add as control listener
-
doMakeSideLegendComponent
Make the side legend component- Overrides:
doMakeSideLegendComponentin classDisplayControlImpl- Returns:
- side legend component
-
timeChanged
Respond to a timeChange event- Overrides:
timeChangedin classDisplayControlImpl- Parameters:
time- new time
-
propertyChange
Property change method.- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classDisplayControlImpl- Parameters:
evt- event to act on
-
handleChangedStationModel
The station model changed- Parameters:
changedModel- The changed station model_
-
getDataProjectionLabel
What label should be used for the data projection- Overrides:
getDataProjectionLabelin classDisplayControlImpl- Returns:
- data projection label
-
getDataProjection
Get the MapProjection for this data; if have a single point data object make synthetic map projection for location- Specified by:
getDataProjectionin interfaceDisplayControl- Overrides:
getDataProjectionin classDisplayControlImpl- Returns:
- MapProjection for the data
-
handleDisplayChanged
Listen for DisplayEvents- Overrides:
handleDisplayChangedin classDisplayControlImpl- Parameters:
evt- The event
-
handleMousePressed
Handle the mouse pressed event in the main display- Parameters:
el- Where the mouse is clickedevt- The event
-
findClosestOb
protected PointOb findClosestOb(EarthLocation el, FieldImpl theField) throws VisADException, RemoteException Find the closest ob in the field to the particular EarthLocation- Parameters:
el- the EarthLocationtheField- the data to search- Returns:
- the closest ob (may be null);
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
updateTable
Extract the observation values from the given ob and update the table.- Parameters:
ob- The ob
-
addChartParam
Add a chart parametere- Parameters:
paramName- the name of the parameter
-
chartChanged
public void chartChanged()Handle a chart changed event -
removeChartParam
Remove a parameters from the chart- Parameters:
pointParam- the description of the parameter to remove
-
toFront
Bring the chart parameter to the front- Parameters:
pointParam- the parameter to frontten.
-
firstFrameDone
public void firstFrameDone()Have we been unpersisted into a view manager that has not been displayed yet?- Specified by:
firstFrameDonein interfaceDisplayControl- Overrides:
firstFrameDonein classDisplayControlImpl
-
createStationModelDisplayable
protected StationModelDisplayable createStationModelDisplayable() throws VisADException, RemoteExceptionCreate theStationModelDisplayableused by thisDisplayControl. This implementation also adds it to the display. Called during init.- Returns:
StationModelDisplayableused by this instance.- Throws:
VisADException- some problem creating a VisAD objectRemoteException- some problem creating a remote VisAD object
-
getRangeToApply
Overwrite base class method to return the color range to use when applying to displayables. This is the range from the station model for any symbol that is colored by- Overrides:
getRangeToApplyin classDisplayControlImpl- Returns:
- Range
- Throws:
RemoteException- On badnessVisADException- On badness
-
getInitialColorTable
Overwrite base class method so we don't have any color table. This gets called because we turn on the FLAG_COLORTABLE to enable the color scales but we use the color table from the station model- Overrides:
getInitialColorTablein classDisplayControlImpl- Returns:
- color table
-
getColorTableToApply
Get the color table to use when applying to displayables- Overrides:
getColorTableToApplyin classDisplayControlImpl- Returns:
- color table from the layout model. May be null.
-
getColorTable
Get theColorTableproperty.- Overrides:
getColorTablein classDisplayControlImpl- Returns:
- The ColorTable
-
getRangeForColorTable
Get the range for the color table.- Overrides:
getRangeForColorTablein classDisplayControlImpl- Returns:
- range being used
- Throws:
RemoteException- some RMI exception occuredVisADException- error getting the range in VisAD
-
setData
Set the data for this instance from the choice supplied.- Overrides:
setDatain classDisplayControlImpl- Parameters:
choice-DataChoicethat describes the data to be loaded.- Returns:
- true if load was successful.
- Throws:
VisADException- some problem creating a VisAD objectRemoteException- some problem creating a remote VisAD object- See Also:
-
applyTimeRange
public void applyTimeRange()Handle some sort of time change. Either the subsetting interval changes or there is a new timestep.- Overrides:
applyTimeRangein classDisplayControlImpl
-
loadDataInThread
protected void loadDataInThread()A utility method that sets the wait cursor and calls loadData in a separate thread . -
loadData
protected void loadData()Load data into theDisplayable. This is called fromsetData(DataChoice)and whenever the projection changes. Subclasses should override this to do whatever they need to. This implementation uses aPointDataInstanceto manage the data.- See Also:
-
getTupleType
Provide to the base class the type of the obs- Overrides:
getTupleTypein classObsDisplayControl- Returns:
- The tuple type
- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
getScaleFromDisplayable
protected float getScaleFromDisplayable()A utility to get the scale from the dislayable- Returns:
- The scale
-
setScaleOnDisplayable
A utility to set the scale on the dislayable- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
setScaleOnDisplayable
A utility to set the scale on the dislayable- Parameters:
f- The new scale value- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
resetData
This gets called when the control has received notification of a dataChange event.- Overrides:
resetDatain classDisplayControlImpl- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
projectionChanged
public void projectionChanged()Method to call if projection changes. This will reset the viewScape, bounds and llBounds held by this object and then load data- Specified by:
projectionChangedin interfaceDisplayControl- Overrides:
projectionChangedin classDisplayControlImpl
-
transectChanged
public void transectChanged()Method called when a transect changes.- Specified by:
transectChangedin interfaceDisplayControl- Overrides:
transectChangedin classDisplayControlImpl
-
fieldSelectorChanged
protected void fieldSelectorChanged()Handle when the value in the column field has changed.- Overrides:
fieldSelectorChangedin classObsDisplayControl
-
getViewMenuItems
Add a few things to the View Menu specific to this control- Overrides:
getViewMenuItemsin classDisplayControlImpl- Parameters:
items- the list of items for the menuforMenuBar- true if for the menubar
-
filterData
Apply the filters to the given data- Parameters:
obs- The data- Returns:
- The filtered data.
- Throws:
Exception- When bad things happen.
-
setTheStationModel
Set the StationModel property.- Parameters:
value- The new value for StationModel
-
getTheStationModel
Get the StationModel property.- Returns:
- The StationModel
-
getStationModel
Get the current station model view.- Returns:
- station model layout
-
setStationModelFromWidget
Set the station model- Parameters:
sm- station model
-
setLayoutModel
Set layout model- Parameters:
id- idstationModel- station model
-
getExtraLegendComponent
Assume that any display controls that have a color table widget will want the color table to show up in the legend.- Overrides:
getExtraLegendComponentin classDisplayControlImpl- Parameters:
legendType- type of legend- Returns:
- The extra JComponent to use in legend
-
getStationModelName
Gets the name of theStationModel. Used by XML encoding.- Returns:
- name of the
StationModel
-
setStationModelName
Sets the name of theStationModel.- Parameters:
n- name of theStationModel
-
getLockButton
Create and return the lcok button- Returns:
- The lock button
-
getControlWidgets
Get any control widgets special to this control and add them to the list.- Overrides:
getControlWidgetsin classDisplayControlImpl- Parameters:
controlWidgets- default list based on any attributes set for this DisplayControl.- Throws:
VisADException- some problem creating a VisAD objectRemoteException- some problem creating a remote VisAD object
-
test
public void test()test method -
editStationTable
public void editStationTable()Popup the station model editor -
doMakeVerticalPositionPanel
Make the gui panel for vertical position- Returns:
- gui
-
doMakeContents
Make Gui contents- Overrides:
doMakeContentsin classDisplayControlImpl- Returns:
- User interface contents
- Throws:
RemoteExceptionVisADException
-
showLineProperties
Show the line properties for the PointParam- Parameters:
pointParam- the point parameter description
-
timeDeclutterChanged
protected void timeDeclutterChanged()Handle when the time decluttering state has changed- Overrides:
timeDeclutterChangedin classObsDisplayControl
-
addDensityComp
Add the given component into the list of density components that are to be enabled/disabled when the declutter checkbox is toggled.- Parameters:
comp- The component to add into the lsit- Returns:
- The same component. We return it as a convenience.
-
addTimeDeclutterComp
Add the given component into the list of time declutter components that are to be enabled/disabled when the declutter checkbox is toggled.- Parameters:
comp- The component to add into the lsit- Returns:
- The same component. We return it as a convenience.
-
getDensityControl
Create the 'Low' slider 'High' jpanel for the density slider.- Returns:
- The panel that holds the density slider.
-
getEditMenuItems
Get edit menu items- Overrides:
getEditMenuItemsin classDisplayControlImpl- Parameters:
items- list of menu itemsforMenuBar- true if for the menu bar
-
makeStationModelEditMenuItems
Get edit menu items- Parameters:
items- list of menu itemsforMenuBar- true if for the menu bar
-
addDisplaySettings
Add properties to the display settings dialog- Overrides:
addDisplaySettingsin classObsDisplayControl- Parameters:
dsd- display settings dialog
-
setChartSettings
recieve the chart display settings- Parameters:
tfo- Holds the chart to apply
-
isChartEnabled
protected boolean isChartEnabled()Is the chart enabled?- Returns:
- true if it is enabled
-
getSaveMenuItems
Add the relevant file menu items into the list- Overrides:
getSaveMenuItemsin classDisplayControlImpl- Parameters:
items- List of menu itemsforMenuBar- Is this for the menu in the window's menu bar or for a popup menu in the legend
-
exportAsKmz
public void exportAsKmz()Export the data as KMZ -
exportAsCsv
public void exportAsCsv()Export the table as csv -
haveFilters
protected boolean haveFilters()Do we have any filters- Returns:
- have filters
-
initFilters
public void initFilters()Init the vis filters -
applyFilters
public void applyFilters()Apply the vis filters -
doMakeFilterGui
Make the filter GUI- Parameters:
includeAll- Include the radio buttons- Returns:
- The filter gui
-
handleOnlyShow
public void handleOnlyShow(int index) call back from radio buttons in gui for filters- Parameters:
index- Which radio button
-
getFilterNames
Return the list of names that shows up in the filter gui names combob box.- Returns:
- List of filter names
-
updateLockButton
protected void updateLockButton()Set the icon and the tooltip on the lock button -
doRemove
Remove this DisplayControl from the system. Nulls out any objects for garbage collection, removes any ProjectionControlListeners.- Specified by:
doRemovein interfaceDisplayControl- Overrides:
doRemovein classObsDisplayControl- Throws:
RemoteException- Java RMI errorVisADException- VisAD Error
-
setDeclutter
public void setDeclutter(boolean v) Set whether this DisplayControl should be decluttered or not. Used by XML persistence.- Parameters:
v- true to declutter
-
getDeclutter
public boolean getDeclutter()Get whether this DisplayControl should be decluttered or not.- Returns:
- true if set to declutter
-
setStationsLocked
public void setStationsLocked(boolean v) Set the locking of the stations parameter- Parameters:
v- true to stationsLocked
-
getStationsLocked
public boolean getStationsLocked()Get the locking of the stations parameter- Returns:
- true if set to stationsLocked
-
setDeclutterFilter
public void setDeclutterFilter(float filter) Set whether the filtering for decluttering. Used by XML persistence.- Parameters:
filter- value of 1 (default) for no overlap (default). 0 < filter < 1 allows some data overlap. filter > 1 causes data to be more widely spaced.
-
getDeclutterFilter
public float getDeclutterFilter()Get whether this DisplayControl should be decluttered or not.- Returns:
- weighting for decluttering.
-
getScale
protected float getScale()Get the scaling used for this object to control the size of the shapes.- Returns:
- scaling used for sizing/decluttering shapes.
-
getBounds
Get the bounds for the visible portion of the screen.- Returns:
- bounds in VisAD screen coordinates.
-
calculateLatLonBounds
Calculate the LatLonBounds based on the VisAD screen bound. This uses the projection for the navigated display and the screen bounds- Parameters:
screenBounds- VisAD screen bounds.- Returns:
- LinearLatLonSet of screen bounds in lat/lon coordinates.
-
decodeFilterString
Decode the selected filter string and return the corresponding filter. This method allows someone to type in YES and NO for values of 1 and 0 respectively, as in GEMPAK.- Parameters:
filter- filter as a string- Returns:
- scaling factor for filtering.
-
getColorWidgetLabel
Return the label that is to be used for the color widget- Overrides:
getColorWidgetLabelin classDisplayControlImpl- Returns:
- Label used for the color widget
-
setFilters
Set the Filters property.- Parameters:
value- The new value for Filters
-
getFilters
Get the Filters property.- Returns:
- The Filters
-
setMatchAll
public void setMatchAll(boolean value) Set the MatchAll property.- Parameters:
value- The new value for MatchAll
-
getMatchAll
public boolean getMatchAll()Get the MatchAll property.- Returns:
- The MatchAll
-
setFiltersEnabled
public void setFiltersEnabled(boolean value) Set the FiltersEnabled property.- Parameters:
value- The new value for FiltersEnabled
-
getFiltersEnabled
public boolean getFiltersEnabled()Get the FiltersEnabled property.- Returns:
- The FiltersEnabled
-
setShowAllTimes
public void setShowAllTimes(boolean value) Set the show all times property.- Parameters:
value- The new value for showAllTimes
-
setUseDataTimes
public void setUseDataTimes(boolean value) Set the use data times times property.- Parameters:
value- The new value for use data times
-
getUseDataTimes
public boolean getUseDataTimes()Get the use data times property.- Returns:
- The use data times property
-
getDisplayableScale
public float getDisplayableScale()Get the scale the user can enter- Returns:
- The scale
-
setDisplayableScale
public void setDisplayableScale(float f) Set the scale the user can enter- Parameters:
f- The scale
-
setUseLastTime
public void setUseLastTime(boolean value) Set the UseLastTime property.- Parameters:
value- The new value for UseLastTime
-
getUseLastTime
public boolean getUseLastTime()Get the UseLastTime property.- Returns:
- The UseLastTime
-
viewpointChanged
public void viewpointChanged()Respond to changes in the control.- Overrides:
viewpointChangedin classDisplayControlImpl
-
loadDataInAWhile
protected void loadDataInAWhile()This checks to see if we have a pending loadData call (from a prior event). If so then - return. Else, create a runnable that will (in SLEEPTIME_MS time) check if there has been no calls to this method since it started. If so then it loads data. Else it sleeps and keeps checking.Note: This method does not need to be synchronized because it is called from within a synchronized block above.
-
setOnlyShowFiltered
public void setOnlyShowFiltered(boolean value) Set the OnlyShowFiltered property.- Parameters:
value- The new value for OnlyShowFiltered
-
getOnlyShowFiltered
public boolean getOnlyShowFiltered()Get the OnlyShowFiltered property.- Returns:
- The OnlyShowFiltered
-
setShouldUseAltitude
public void setShouldUseAltitude(boolean value) Set the ShouldUseAltitude property.- Parameters:
value- The new value for ShouldUseAltitude
-
getShouldUseAltitude
public boolean getShouldUseAltitude()Get the ShouldUseAltitude property.- Returns:
- The ShouldUseAltitude property
-
setShouldUseAltitudeIndex
public void setShouldUseAltitudeIndex(int index) Set the ShouldUseAltitude property.- Parameters:
index- The index
-
setAskedUserToDeclutterTime
public void setAskedUserToDeclutterTime(boolean value) Set the AskedUserToDeclutterTime property.- Parameters:
value- The new value for AskedUserToDeclutterTime
-
getAskedUserToDeclutterTime
public boolean getAskedUserToDeclutterTime()Get the AskedUserToDeclutterTime property.- Returns:
- The AskedUserToDeclutterTime
-
setChartParams
Set the PlotVars property.- Parameters:
value- The new value for PlotVars
-
getChartParams
Get the ChartParams property.- Returns:
- The ChartParams
-
setSelectedObId
Set the SelectedObId property.- Parameters:
value- The new value for SelectedObId
-
getSelectedObId
Get the SelectedObId property.- Returns:
- The SelectedObId
-
setTimeSeries
Set the TimeSeries property.- Parameters:
value- The new value for TimeSeries
-
getTimeSeries
Get the TimeSeries property.- Returns:
- The TimeSeries
-
getChart
Get the chart- Returns:
- the chart
-
setShowThumbNail
public void setShowThumbNail(boolean value) Set the ShowThumbNail property.- Parameters:
value- The new value for ShowThumbNail
-
setSelectedObLocation
Set the SelectedObLocation property.- Parameters:
value- The new value for SelectedObLocation
-
getSelectedObLocation
Get the SelectedObLocation property.- Returns:
- The SelectedObLocation
-
dataChanged
public void dataChanged()somehow the dateselection is not updated, in GLM drived by time driver- Specified by:
dataChangedin interfaceDataChangeListener- Overrides:
dataChangedin classDisplayControlImpl
-