Package ucar.unidata.idv.control
Class DrawingControl
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.idv.control.DisplayControlBase
ucar.unidata.idv.control.DisplayControlImpl
ucar.unidata.idv.control.DrawingControl
- All Implemented Interfaces:
ActionListener,ItemListener,PropertyChangeListener,EventListener,HyperlinkListener,Sharable,DataChangeListener,DisplayControl,Prototypable,ControlListener,DisplayListener
- Direct Known Subclasses:
FrontDrawingControl,GridTrajectoryControl,GridTrajectoryControlNew,PointCloudControl,RadarEditor,TransectDrawingControl
A MetApps Display Control for drawing lines on a navigated
display.
- Author:
- MetApps development team
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassClass GlyphTableclassClass GlyphTableModel shows locationsNested classes/interfaces inherited from class ucar.unidata.idv.control.DisplayControlImpl
DisplayControlImpl.SideLegendLabel -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXml attribute for the editable propertystatic final Stringxgrf attributestatic final StringXml attribute for the title propertystatic final Stringxgrf xml attributestatic final DrawingCommandcommandstatic final DrawingCommandSelect commandstatic final DrawingCommandcommandprotected DrawingCommandCurrent commandprotected DataChoiceprotected HashMapThe label to show the readout in the side legendprotected JCheckBoxControls the disabled statestatic final PatternFileFilterFile filter used for the xgrf filesstatic final intFilled capable flag for the command objectstatic final intFull lat/lon capable flag for the command objectstatic final intflag for straightprotected ListList of all glyphsbooleanprotected JTextAreaKeep around for the legendprotected JComponentKeep around for the legendprotected ListList of selected glyphsstatic final Stringproperty for sharing linesprotected JCheckBoxFilled modestatic final StringFile suffix used for the xgrfg filesstatic final StringXml tag for the editor settings in the import/export formatFields 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 TypeMethodDescriptionprotected voidaddControlWidgets(List widgets) Add the widgets into the controls panelprotected voidaddFileMenuItems(List items, boolean forMenuBar) Add to the file menuprotected booleanaddGlyph(DrawingGlyph glyph) Add the glyph into the list of glyphsprotected voidaddLabelMacros(String template, List patterns, List values) Add any macro name/value pairs.voidApply the current color to all glyphsvoidapplyZPosition(List glyphs) Apply the current z position to all glyphsprotected booleanShould we handle display eventsprotected voidEnable/disable the z slidervoidclose()Clear the selection when we minisze the windowclosestGlyph(DisplayEvent event) Find the glyph that is closest to the x/y point of the given eventclosestGlyph(DisplayEvent event, boolean forMove) Find the glyph that is closest to the x/y point of the given eventprotected DrawingGlyphcreateGlyph(DisplayEvent event, boolean mousePress) Create a glyphprotected voiddoCut()Remove the glyphs in the selection setvoidDo the flythroughprotected ContainerMake the guiprotected JComponentMake the main tabbed panestatic JComboBoxdoMakeLineWidthBox(int lineWidth) Make a component to change the width of the lines.protected JComponentMake the shapes panelprotected JComponentMake the style panelprotected JComponentMake the jtable panelprotected voiddoneMovingGlyph(DrawingGlyph glyph) Done moving glyphvoiddoProperties(List glyphs) Show the properties dialog for the glyphs in the listvoiddoRemove()Remove this DisplayControl from the system.voidevaluateGlyphJython(DrawingGlyph glyph, String jython) Evalue the given jython for the glyphformatDistance(Real distance) UtilityDateTime[]Get an array of all the current times in the displayGet the animation setprotected longHow long do we sleep until we act on the control changed eventintGet the coord type (e.g., LATLON, XYZ)Get the current time in the animationprotected StringGet the default display list template for this control.Return the display unitGet the distance unitbooleanGet the Editable property.protected voidgetEditMenuItems(List items, boolean forMenuBar) Add the relevant edit menu items into the listGet the Editor Title property.booleanGet the Enabled property.protected 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 voidgetFileMenuItems(List items, boolean forMenuBar) Add to the file menu.booleanGet the Filled property.getFont()Get the font from the ui widgetbooleanGet the FrontDisplay property.doubleGet the FrontScale property.booleanGet the FullLatLon property.Get the GlyphJython property.protected StringgetGlyphNameDefault(DrawingGlyph glyph) Get the default name to useGet the Glyphs property.booleanGet the IgnoreTime property.protected ColorTableThe specific color table here is for the ProbSevere displayprotected RangeHook method to allow derived classes to return a different initialRangeprotected doubleGet default z position to useGet the text justification valueprotected voidgetLegendLabels(List labels, int legendType) Overwrite the legend labels method to use the editor title if there is one.intGet the line widthGet the color table to use for the image glyphsprotected ListGet the lsit of shape commands the user can draw with.booleanGet the ShowFronts property.booleanGet the ShowNoteInLegend property.booleanGet the Straight property.If we are not drawing in the current time then return null.booleanGet the UseTime property.Get the vert text justification valueprotected voidgetViewMenuItems(List items, boolean forMenuBar) Set the show html itemvoidglyphChanged(DrawingGlyph glyph) The given glyph has changed somehow.voidhandleDisplayChanged(DisplayEvent event) Listen for DisplayEventsprotected voidHandle the window closing.booleaninit(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) Called by theIntegratedDataViewerto initialize after this control has been unpersistedprotected voidInitialize the display unitbooleanisSelected(DrawingGlyph glyph) Is the given glyph selectedprotected JPanelmakeButtonPanel(List commands, ButtonGroup bg) Utility to make a panel holding the icon buttons.protected voidmakeModePanel(List widgets) Makes the model panel.protected voidprocessData(Data data) Process the visad data object.protected voidprocessProperties(DataChoice dataChoice) Process the visad data object.voidRespond to the projection changing eventvoidreceiveShareData(Sharable from, Object dataId, Object[] data) Method called by other classes that share the the state.voidRemove em all.voidremoveGlyph(DrawingGlyph glyph) Remove the glyph from the drawingprotected voidrespond to the reload data callprotected voidThe selection set changed.voidsetActive(boolean b) Enable/disable the drawing deprecatedprotected voidsetCoordType(int c) Get the coord type (e.g., LATLON, XYZ)protected voidsetCurrentCommand(DrawingCommand command) Set the current active commandvoidsetDisplayVisibility(boolean on) TUrn on the visibility of this displayvoidsetEditable(boolean value) Set the Editable property.voidsetEditorTitle(String value) Set the editorTitle property.voidsetEnabled(boolean value) Set the Enabled property.voidsetFilled(boolean value) Set the Filled property.voidsetFrontDisplay(boolean value) Set the FrontDisplay property.voidsetFrontScale(double value) Set the FrontScale property.voidsetFullLatLon(boolean value) Set the FullLatLon property.voidsetGlyphJython(String value) Set the GlyphJython property.voidSet the DrawingGlyphs property.voidsetIgnoreTime(boolean value) Set the IgnoreTime property.voidSet the line data.voidsetLineWidth(int width) Set the width of the lines.voidSet the value of the note text area.voidsetSelection(List newSelection, boolean addTo) Set the selection.voidsetSelection(DrawingGlyph glyph) Clear the selection and add the given glyph to the selectionvoidsetShowFronts(boolean value) Set the ShowFronts property.voidsetShowNoteInLegend(boolean value) Set the ShowNoteInLegend property.voidsetStraight(boolean value) Set the Straight property.voidsetUseTime(boolean value) Set the UseTime property.protected booleanSignal base class to add this as a control listenerprotected booleanSignal base class to add this as a display listenerbooleanShould this glyph be visibleprotected booleanShould we show the filled cbxprotected booleanShould we show the locatio widgetsprotected booleanShould we show the time widgetsprotected voidtimeChanged(Real time) Respond to a timeChange eventvoidtoggleVisibilityForVectorGraphicsRendering(int rasterMode) Toggle the visibility for vector graphics renderingprotected voidThis method is called to update the legend labels when some state has changed in this control that is reflected in the labels.voidRespond to control changed events from the view managervoidzSliderChanged(double value) Handle the z position slider changedMethods inherited from class ucar.unidata.idv.control.DisplayControlImpl
actionPerformed, activateDisplays, addAttributedDisplayable, addAttributedDisplayable, addAttributedDisplayable, addAttributeFlags, addCheckBoxSettings, addDataChoice, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayMaster, addDisplaySettings, addNewData, addNoteText, addPropertiesComponents, addPropertyChangeListener, addRemovable, addSharable, addTimeModeWidget, addToControlContext, addToRangeMenu, addToRangeMenu, addToRangeMenu, addViewManager, appendDataChoices, applyAttributesToDisplayables, applyColor, applyColorScaleInfo, applyColorTable, applyColorUnit, applyContourInfo, applyDisplaySetting, applyDisplayUnit, applyForecastHourMacro, applyLineWidth, applyPreferences, applyProperties, applyProperties, applyPropertyValues, applyRange, applySelectRange, applySkipFactor, applySmoothing, applyTextureQuality, applyTimeRange, applyZPosition, boundsClose, canBeDocked, canDoProgressiveResolution, canExportData, canSaveDataInCache, captureWindow, centerOnDisplay, changeColorUnit, changeDisplayUnit, checkBoundsChange, checkFlag, checkIfDataOk, checkImageSize, clearDataInstance, clearPrototype, clearViewManagers, colorUnitChanged, controlChanged, convertColorRange, convertRange, createDisplayListDisplayable, createIdvWindow, dataChanged, deactivateDisplays, debug, displayableToFront, displayChanged, displayControlFailed, displayUnitChanged, doApplyProperties, doExport, doInitialUpdateLegendAndList, doMakeBottomLegendComponent, doMakeChangeColorMenu, doMakeChangeColorMenu, doMakeChangeParameterMenuItem, doMakeColorControl, doMakeColorControl, doMakeColorScales, doMakeDataInstance, doMakeMenuBar, doMakeMenuBarMenus, doMakePointSizeWidget, doMakeRemoveControl, doMakeSideLegendComponent, doMakeSkipFactorSlider, doMakeSmoothingWidget, doMakeTextureSlider, doMakeVisibilityControl, doMakeWidgetComponent, doMakeWindow, doMakeZPositionSlider, exportDisplayedData, 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, getColorUnit, getColorUnitName, getColorWidgetLabel, getComponentHolder, getContents, getContourInfo, getControlContext, getControlMenus, getControlWidgets, getCursorReadout, getCursorReadoutInner, getCursorReadoutInner, getData, getDataChoice, getDataChoices, getDataForDisplayList, getDataInstance, getDataInstance, getDataProjection, getDataProjectionForMenu, getDataProjectionLabel, getDataSelection, getDataSources, getDataTimeRange, getDataTimeRange, getDataTimeSet, getDebugDetails, getDefaultColorScaleInfo, getDefaultDistanceUnit, getDefaultFastRendering, getDefaultSamplingMode, getDefaultSamplingModeValue, getDefaultView, getDefaultViewDescriptor, getDefaultViewManager, getDetailsContents, getDisplayAltitudeType, getDisplayCategory, getDisplayCenter, getDisplayConventions, getDisplayedData, getDisplayId, getDisplayInfos, getDisplayListColor, getDisplayListData, getDisplayListDisplayable, getDisplayListTemplate, getDisplayMaster, getDisplayName, getDisplayScale, getDisplayUnit, getDisplayUnitName, getDisplayVisibility, getDoCursorReadout, getEditMenuItems, getExpandedInTabs, getExtraLabelTemplate, getExtraMenus, getFileMenuItems, getGraphicsConfiguration, getGrid, getGrid, getHadDataChoices, getHaveInitialized, getHelpIds, getHelpMenuItems, getId, getIdv, getImage, getImage, getInitDataChoices, getInitialFastRendering, getInternalAnimation, getInternalAnimation, getIsProgressiveResolution, getIsRaster, getIsTimeDriver, getLabel, getLastFileMenuItems, getLatLonPoints, getLegendButtons, getLegendComponent, getLegendLabel, getLegendLabelTemplate, getLegendToolTip, 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, getRangeForColorTable, getRangeToApply, getRawDataUnit, 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, getVisbilityAnimationPause, getWasUnPersisted, getWindow, getWindowSize, getWindowVisible, getWindowX, getWindowY, getZPosition, getZPositionSliderLabel, guiExported, guiImported, hasForecastHourMacro, hasMapProjection, hasTimeMacro, haveDataTimes, haveParameterDefaults, hide, hyperlinkUpdate, inGlobeDisplay, init, init, init, initAfterUnPersistence, initAsPrototype, initAsTemplate, initBasic, initDone, initializeWithNewData, initWindow, isDisplay3D, isDisplayUnitAlsoColorUnit, isGuiShown, isInitDone, isInTransectView, isInViewManager, itemStateChanged, loadDataFromViewBounds, makeChangeColorMenuItems, makeLegendLabel, makeLockButton, makeRemoveButton, moveTo, notifyViewManagersOfChange, parseProperties, popup, popupDataDialog, popupDataDialog, popupDataDialog, processRequestProperties, propertyChange, putTransientProperty, reallySetAttributeFlags, 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, setData, setDataChoices, setDataInstance, setDataInstances, setDataSelection, setDataTimeRange, setDefaultSamplingMode, setDefaultView, setDisplayableVisibility, setDisplayableVisiblity, setDisplayActive, setDisplayAreaSubset, setDisplayCategory, setDisplayId, setDisplayInactive, setDisplayListColor, setDisplayListColor, setDisplayListProperties, setDisplayListTemplate, setDisplayListTimeZone, setDisplayName, setDisplayUnit, setDisplayUnitName, setDoCursorReadout, setExpandedInTabs, setExtraLabelTemplate, setHadDataChoices, setHelpUrl, setId, setInitDataChoices, setInitialSettings, setInitialViewManager, setIsProgressiveResolution, setIsRaster, setIsTimeDriver, setLabelAsPreference, setLegendBackground, setLegendForeground, setLegendLabel, setLegendLabelTemplate, setLockVisibilityToggle, setMainPanelDimensions, setMainPanelSize, setMakeWindow, setMatchDisplayRegion, setName, setNameFromUser, setNewColorUnit, setNewDisplayUnit, 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, toggleWindow, toString, transectChanged, updateAnimation, updateDataInstance, updateDataSelection, updateDisplayList, updateGridDataInstance, updateLegendAndList, updateLockButton, useSmoothingFactor, useZPosition, viewManagerChanged, viewManagerDestroyed, writeTestArchive, xxxsetDisplayActiveMethods 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
-
ATTR_USETIMESINANIMATION
xgrf xml attribute- See Also:
-
ATTR_FRONTDISPLAY
xgrf attribute- See Also:
-
TAG_EDITOR
Xml tag for the editor settings in the import/export format- See Also:
-
ATTR_EDITABLE
Xml attribute for the editable property- See Also:
-
ATTR_TITLE
Xml attribute for the title property- See Also:
-
FILTER_XGRF
File filter used for the xgrf files -
SUFFIX_XGRF
File suffix used for the xgrfg files- See Also:
-
SHARE_LINES
property for sharing lines- See Also:
-
FLAG_FILLED
public static final int FLAG_FILLEDFilled capable flag for the command object- See Also:
-
FLAG_FULLLATLON
public static final int FLAG_FULLLATLONFull lat/lon capable flag for the command object- See Also:
-
FLAG_STRAIGHT
public static final int FLAG_STRAIGHTflag for straight- See Also:
-
CMD_SELECT
Select command -
CMD_MOVE
command -
CMD_STRETCH
command -
enabledCbx
Controls the disabled state -
straightCbx
Filled mode -
glyphs
List of all glyphs -
selectedGlyphs
List of selected glyphs -
currentCmd
Current command -
datachoice
-
isProbsevere
public boolean isProbsevere -
dataChoiceProperties
The label to show the readout in the side legend -
legendNoteTextArea
Keep around for the legend -
legendNoteWrapper
Keep around for the legend
-
-
Constructor Details
-
DrawingControl
public DrawingControl()Create a new Drawing Control; set attributes.
-
-
Method Details
-
getControlChangeSleepTime
protected long getControlChangeSleepTime()How long do we sleep until we act on the control changed event- Overrides:
getControlChangeSleepTimein classDisplayControlImpl- Returns:
- sleep time
-
formatDistance
Utility- Parameters:
distance- The distance- Returns:
- Formatted string
- Throws:
RemoteException- On badnessVisADException- On badness
-
getDistanceUnit
Get the distance unit- Returns:
- the distance unit
-
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 everything is okay
- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
initDisplayUnit
protected void initDisplayUnit()Initialize the display unit -
shouldAddDisplayListener
protected boolean shouldAddDisplayListener()Signal base class to add this as a display listener- Overrides:
shouldAddDisplayListenerin classDisplayControlImpl- Returns:
- Add as display listener
-
handleWindowClosing
protected void handleWindowClosing()Handle the window closing.- Overrides:
handleWindowClosingin classDisplayControlImpl
-
close
public void close()Clear the selection when we minisze the window- Overrides:
closein classDisplayControlImpl
-
shouldAddControlListener
protected boolean shouldAddControlListener()Signal base class to add this as a control listener- Overrides:
shouldAddControlListenerin classDisplayControlImpl- Returns:
- Add as control listener
-
timeChanged
Respond to a timeChange event- Overrides:
timeChangedin classDisplayControlImpl- Parameters:
time- new time
-
processData
Process the visad data object. For now this is a text object that holds the glyph xml- Parameters:
data- The data object- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
processProperties
Process the visad data object. For now this is a text object that holds the glyph xml- Parameters:
dataChoice- The data object- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
resetData
respond to the reload data call- Overrides:
resetDatain classDisplayControlImpl- Throws:
RemoteException- On badnessVisADException- On badness
-
toggleVisibilityForVectorGraphicsRendering
Toggle the visibility for vector graphics rendering- Specified by:
toggleVisibilityForVectorGraphicsRenderingin interfaceDisplayControl- Overrides:
toggleVisibilityForVectorGraphicsRenderingin classDisplayControlImpl- Parameters:
rasterMode- the toggle mode- Throws:
Exception- problem toggling
-
shouldBeVisible
Should this glyph be visible- Parameters:
tg- glyph- Returns:
- should be visible
-
setDisplayVisibility
public void setDisplayVisibility(boolean on) TUrn on the visibility of this display- Specified by:
setDisplayVisibilityin interfaceDisplayControl- Overrides:
setDisplayVisibilityin classDisplayControlImpl- Parameters:
on- Visible?
-
addGlyph
Add the glyph into the list of glyphs- Parameters:
glyph- The glyph to add- Returns:
- Was this successful
-
glyphChanged
The given glyph has changed somehow. Update the JTable- Parameters:
glyph- The glyph that changed
-
doRemove
Remove this DisplayControl from the system. Nulls out any objects for garbage collection- Specified by:
doRemovein interfaceDisplayControl- Overrides:
doRemovein classDisplayControlImpl- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
getLegendLabels
Overwrite the legend labels method to use the editor title if there is one.- Overrides:
getLegendLabelsin classDisplayControlImpl- Parameters:
labels- List of labelslegendType- Side or bottom
-
createGlyph
protected DrawingGlyph createGlyph(DisplayEvent event, boolean mousePress) throws VisADException, RemoteException Create a glyph- Parameters:
event- The eventmousePress- Is mouse pressed or released- Returns:
- The glyph or null
- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
viewpointChanged
public void viewpointChanged()Respond to control changed events from the view manager- Overrides:
viewpointChangedin classDisplayControlImpl
-
projectionChanged
public void projectionChanged()Respond to the projection changing event- Specified by:
projectionChangedin interfaceDisplayControl- Overrides:
projectionChangedin classDisplayControlImpl
-
canHandleEvents
protected boolean canHandleEvents()Should we handle display events- Returns:
- Ok to handle events
-
doFlythrough
Do the flythrough- Throws:
RemoteException- Java RMI errorVisADException- VisAD problem
-
handleDisplayChanged
Listen for DisplayEvents- Overrides:
handleDisplayChangedin classDisplayControlImpl- Parameters:
event- The event
-
doneMovingGlyph
Done moving glyph- Parameters:
glyph- the glyph
-
closestGlyph
Find the glyph that is closest to the x/y point of the given event- Parameters:
event- The event- Returns:
- The closest glyph (or null if none close).
-
closestGlyph
Find the glyph that is closest to the x/y point of the given event- Parameters:
event- The eventforMove- Are we looking for a glyph to move- Returns:
- The closest glyph (or null if none close).
-
removeGlyph
Remove the glyph from the drawing- Parameters:
glyph- The glyph to remove
-
selectionChanged
protected void selectionChanged()The selection set changed. Update the JTable -
setSelection
Clear the selection and add the given glyph to the selection- Parameters:
glyph- Glyph to add to the selection set- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
setSelection
Set the selection. Clear the old selection set if addTo is false.- Parameters:
newSelection- New set of glyphsaddTo- If true then don't clear the selection- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
isSelected
Is the given glyph selected- Parameters:
glyph- The glyph- Returns:
- Is selected
-
doCut
Remove the glyphs in the selection set- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
doProperties
Show the properties dialog for the glyphs in the list- Parameters:
glyphs- Glyphs to set properties on- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
setCurrentCommand
Set the current active command- Parameters:
command- The command
-
makeButtonPanel
Utility to make a panel holding the icon buttons.- Parameters:
commands- Command to make buttons for.bg- Button group to add buttons to- Returns:
- The button panel
-
getShapeCommands
Get the lsit of shape commands the user can draw with. Derived classes can override this to control what can be drawn- Returns:
- Shape commands
-
doMakeShapesPanel
Make the shapes panel- Returns:
- the shapes panel
-
doMakeContents
Make the gui- Overrides:
doMakeContentsin classDisplayControlImpl- Returns:
- The gui
- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
zSliderChanged
public void zSliderChanged(double value) Handle the z position slider changed- Overrides:
zSliderChangedin classDisplayControlImpl- Parameters:
value- the new z slider value
-
doMakeControlsPanel
Make the main tabbed pane- Returns:
- Controls panel
-
addControlWidgets
Add the widgets into the controls panel- Parameters:
widgets- List to add to. Add in pairs (label, widget)
-
getInitialZPosition
protected double getInitialZPosition()Get default z position to use- Overrides:
getInitialZPositionin classDisplayControlImpl- Returns:
- Default z position
-
makeModePanel
Makes the model panel. Can be overwritten.- Parameters:
widgets- List ot add label/widget pairs
-
doMakeTablePanel
Make the jtable panel- Returns:
- jtable panel
-
doMakeStylePanel
Make the style panel- Returns:
- Style panel
-
checkZSliderEnabled
protected void checkZSliderEnabled()Enable/disable the z slider -
showFilledCbx
protected boolean showFilledCbx()Should we show the filled cbx- Returns:
- Show the filled cbx
-
showTimeWidgets
protected boolean showTimeWidgets()Should we show the time widgets- Returns:
- show the tiem widgets
-
showLocationWidgets
protected boolean showLocationWidgets()Should we show the locatio widgets- Returns:
- show the locatio widgets
-
getRGBColorTable
Get the color table to use for the image glyphs- Returns:
- The rgb color table
-
doMakeLineWidthBox
Make a component to change the width of the lines.- Parameters:
lineWidth- The selected width- Returns:
- the component.
-
getCoordType
public int getCoordType()Get the coord type (e.g., LATLON, XYZ)- Returns:
- The coord type
-
setCoordType
protected void setCoordType(int c) Get the coord type (e.g., LATLON, XYZ)- Parameters:
c- The coord type to use
-
getEditMenuItems
Add the relevant edit menu items into the list- Overrides:
getEditMenuItemsin 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
-
getFileMenuItems
Add to the file menu.- Overrides:
getFileMenuItemsin classDisplayControlImpl- Parameters:
items- Holds the menu itemsforMenuBar- Is it for the main window
-
addFileMenuItems
Add to the file menu- Parameters:
items- List to add toforMenuBar- for the menu bar
-
applyColorToAll
public void applyColorToAll()Apply the current color to all glyphs -
applyZPosition
Apply the current z position to all glyphs- Parameters:
glyphs- the list of glyphs- Throws:
RemoteException- On badnessVisADException- On badness
-
removeAllGlyphs
public void removeAllGlyphs()Remove em all. -
setLineWidth
public void setLineWidth(int width) Set the width of the lines.- Overrides:
setLineWidthin classDisplayControlImpl- Parameters:
width- width of lines.
-
getLineWidth
public int getLineWidth()Get the line width- Overrides:
getLineWidthin classDisplayControlImpl- Returns:
- The line width
-
getAllTimes
Get an array of all the current times in the display- Returns:
- All the animation times
- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
getCurrentTime
Get the current time in the animation- Returns:
- The current time
- Throws:
RemoteException- On BadnessVisADException- On Badness
-
getAnimationSet
Get the animation set- Returns:
- animation set
- Throws:
RemoteException- On badnessVisADException- On badness
-
getTimeForGlyph
If we are not drawing in the current time then return null. Else return the current time.- Returns:
- The time to use for a glyph
- Throws:
RemoteException- On BadnessVisADException- On Badness
-
getJustification
Get the text justification value- Returns:
- h justification
-
getVerticalJustification
Get the vert text justification value- Returns:
- The vert justification_
-
getFont
Get the font from the ui widget- Returns:
- The font to use for new text glyphs
-
setLines
Set the line data. deprecated- Parameters:
lines- set of lines to use
-
setActive
public void setActive(boolean b) Enable/disable the drawing deprecated- Parameters:
b- true to enable
-
setGlyphs
Set the DrawingGlyphs property.- Parameters:
value- The new value for DrawingGlyphs
-
getGlyphs
Get the Glyphs property.- Returns:
- The Glyphs
-
setIgnoreTime
public void setIgnoreTime(boolean value) Set the IgnoreTime property.- Parameters:
value- The new value for IgnoreTime
-
getIgnoreTime
public boolean getIgnoreTime()Get the IgnoreTime property.- Returns:
- The IgnoreTime
-
setUseTime
public void setUseTime(boolean value) Set the UseTime property.- Parameters:
value- The new value for UseTime
-
getUseTime
public boolean getUseTime()Get the UseTime property.- Returns:
- The UseTime
-
setEditable
public void setEditable(boolean value) Set the Editable property.- Parameters:
value- The new value for Editable
-
getEditable
public boolean getEditable()Get the Editable property.- Returns:
- The Editable
-
setEnabled
public void setEnabled(boolean value) Set the Enabled property.- Parameters:
value- The new value for Enabled
-
getEnabled
public boolean getEnabled()Get the Enabled property.- Returns:
- The Enabled
-
setEditorTitle
Set the editorTitle property.- Parameters:
value- The new value for editorTitle
-
getEditorTitle
Get the Editor Title property.- Returns:
- The Title
-
setFilled
public void setFilled(boolean value) Set the Filled property.- Parameters:
value- The new value for Filled
-
getFilled
public boolean getFilled()Get the Filled property.- Returns:
- The Filled
-
setStraight
public void setStraight(boolean value) Set the Straight property.- Parameters:
value- The new value for Straight
-
getStraight
public boolean getStraight()Get the Straight property.- Returns:
- The Straight
-
setFullLatLon
public void setFullLatLon(boolean value) Set the FullLatLon property.- Parameters:
value- The new value for FullLatLon
-
getFullLatLon
public boolean getFullLatLon()Get the FullLatLon property.- Returns:
- The FullLatLon
-
evaluateGlyphJython
Evalue the given jython for the glyph- Parameters:
glyph- The glyphjython- The jython
-
setGlyphJython
Set the GlyphJython property.- Parameters:
value- The new value for GlyphJython
-
getGlyphJython
Get the GlyphJython property.- Returns:
- The GlyphJython
-
getGlyphNameDefault
Get the default name to use- Parameters:
glyph- the glyph- Returns:
- The name
-
setShowFronts
public void setShowFronts(boolean value) Set the ShowFronts property.- Parameters:
value- The new value for ShowFronts
-
getShowFronts
public boolean getShowFronts()Get the ShowFronts property.- Returns:
- The ShowFronts
-
setFrontScale
public void setFrontScale(double value) Set the FrontScale property.- Parameters:
value- The new value for FrontScale
-
getFrontScale
public double getFrontScale()Get the FrontScale property.- Returns:
- The FrontScale
-
setFrontDisplay
public void setFrontDisplay(boolean value) Set the FrontDisplay property.- Parameters:
value- The new value for FrontDisplay
-
getFrontDisplay
public boolean getFrontDisplay()Get the FrontDisplay property.- Returns:
- The FrontDisplay
-
addLabelMacros
Add any macro name/value pairs.- Overrides:
addLabelMacrosin classDisplayControlImpl- Parameters:
template- The template to usepatterns- The macro namesvalues- The macro values
-
getDefaultDisplayListTemplate
Get the default display list template for this control. Subclasses can override- Overrides:
getDefaultDisplayListTemplatein classDisplayControlImpl- Returns:
- the default template
-
updateLegendLabel
protected void updateLegendLabel()This method is called to update the legend labels when some state has changed in this control that is reflected in the labels.- Overrides:
updateLegendLabelin classDisplayControlImpl
-
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
-
getViewMenuItems
Set the show html item- Overrides:
getViewMenuItemsin classDisplayControlImpl- Parameters:
items- The items of view menuforMenuBar- Is this for the menu in the window's menu bar or for a popup menu in the legend
-
setShowNoteInLegend
public void setShowNoteInLegend(boolean value) Set the ShowNoteInLegend property.- Parameters:
value- The new value for ShowTable
-
getShowNoteInLegend
public boolean getShowNoteInLegend()Get the ShowNoteInLegend property. -
setNoteText
Set the value of the note text area.- Overrides:
setNoteTextin classDisplayControlImpl- Parameters:
n- The note text
-
getInitialColorTable
The specific color table here is for the ProbSevere display- Overrides:
getInitialColorTablein classDisplayControlImpl- Returns:
- The color table to use
-
getInitialRange
Hook method to allow derived classes to return a different initialRange- Overrides:
getInitialRangein classDisplayControlImpl- Returns:
- The initial range to use
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
getDisplayUnit
Return the display unit- Overrides:
getDisplayUnitin classDisplayControlImpl- Returns:
- The display unit
-
initAfterUnPersistence
Description copied from class:DisplayControlImplCalled by theIntegratedDataViewerto initialize after this control has been unpersisted- Specified by:
initAfterUnPersistencein interfaceDisplayControl- Overrides:
initAfterUnPersistencein classDisplayControlImpl- Parameters:
vc- The context in which this control existsproperties- Properties that may hold things
-