ucar.unidata.idv.control
Class TransectDrawingControl

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.idv.control.DisplayControlBase
          extended by ucar.unidata.idv.control.DisplayControlImpl
              extended by ucar.unidata.idv.control.DrawingControl
                  extended by ucar.unidata.idv.control.TransectDrawingControl
All Implemented Interfaces:
ActionListener, ItemListener, PropertyChangeListener, EventListener, HyperlinkListener, Sharable, DataChangeListener, DisplayControl, Prototypable, ControlListener, DisplayListener

public class TransectDrawingControl
extends DrawingControl

A MetApps Display Control for drawing lines on a navigated display.

Version:
$Revision: 1.41 $
Author:
MetApps development team

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.unidata.idv.control.DisplayControlImpl
DisplayControlImpl.SideLegendLabel
 
Field Summary
 
Fields inherited from class ucar.unidata.idv.control.DrawingControl
ATTR_EDITABLE, ATTR_TITLE, ATTR_USETIMESINANIMATION, CMD_MOVE, CMD_SELECT, CMD_STRETCH, currentCmd, enabledCbx, FILTER_XGRF, FLAG_FILLED, FLAG_FULLLATLON, glyphs, selectedGlyphs, SHARE_LINES, SUFFIX_XGRF, TAG_EDITOR
 
Fields inherited from class ucar.unidata.idv.control.DisplayControlImpl
categories, colorScaleInfo, colorScales, contourInfo, contourInfoParams, controlContext, ctw, cw, dataSelection, defaultView, defaultViewManager, DISPLAY_LIST_NAME, displayListTable, displayMasters, displayUnit, helpUrl, initNoteText, instantiatedWithNoData, noteTextArea, noteWrapper, paramName, requestProperties, settingVisibility, sharables, showNoteText, skipSlider, srw, version, viewManagers
 
Fields inherited from class ucar.unidata.idv.control.DisplayControlBase
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_LINEWIDTH, FLAG_NONE, FLAG_SELECTRANGE, FLAG_SKIPFACTOR, FLAG_TIMERANGE, FLAG_ZPOSITION, GRID_INSETS, ICON_LOCK, ICON_REMOVE, ICON_UNLOCK, LABEL_NONE, log_, MACRO_DATASOURCENAME, MACRO_DISPLAYNAME, MACRO_DISPLAYUNIT, MACRO_LONGNAME, MACRO_POSITION, MACRO_SHORTNAME, MACRO_TIMESTAMP, MACRO_VALUE, NEAREST_NEIGHBOR, PREF_DISPLAYLIST_TEMPLATE, PREF_EXTRALABEL_TEMPLATE, PREF_LEGENDLABEL_TEMPLATE, PROP_REMOVED, SETTINGS_GROUP_DISPLAY, SETTINGS_GROUP_FLAGS, SHARE_CHOICES, SHARE_COLOR, SHARE_COLORSCALE, SHARE_COLORTABLE, SHARE_DISPLAYUNIT, SHARE_POSITION, SHARE_SELECTRANGE, SHARE_SKIPVALUE, SHARE_TRANSECT, SHARE_VISIBILITY, WEIGHTED_AVERAGE
 
Fields inherited from interface ucar.unidata.idv.DisplayControl
BOTTOM_LEGEND, DEFAULT_PROBEFORMAT, PREF_PREFIX, PREF_PROBEFORMAT, PREF_REMOVEONWINDOWCLOSE, PREF_SAMPLING_MODE, PREF_STANDALONE_REMOVEONCLOSE, PREF_STANDALONE_REMOVEONCLOSE_ASK, PROP_LEGENDICON, SIDE_LEGEND
 
Constructor Summary
TransectDrawingControl()
          Create a new Drawing Control; set attributes.
 
Method Summary
protected  void addControlWidgets(List widgets)
          Add gui components to the list
protected  void addFileMenuItems(List items, boolean forMenuBar)
          Add the relevant file menu items into the list
protected  void doneMovingGlyph(DrawingGlyph glyph)
          The user is done moving or resizing the given glyph
 boolean getAutoUpdateTransect()
          Get the AutoUpdateTransect property.
protected  String getGlyphNameDefault(DrawingGlyph glyph)
          Use a different name
protected  List getShapeCommands()
          Provide the list of shape commands to the base class
 boolean getShowDisplayTransects()
          Get the ShowDisplayTransects property.
 boolean getShowRegularTransects()
          Get the ShowRegularTransects property.
 void initDone()
          All initialization is done
protected  void makeModePanel(List widgets)
          Overwrite base class method to make the mode panel
 void removeGlyph(DrawingGlyph glyph)
          Overwrite base class method to write out the transects on a delete
protected  void selectionChanged()
          The selections set of glyphs has changed.
 void setAutoUpdateTransect(boolean value)
          Set the AutoUpdateTransect property.
 void setDisplayedTransect(TransectViewManager tvm)
          Add and/or change the displayed transect for the given tvm.
 void setDisplayVisibility(boolean on)
          Extra check for the display visibility
 void setShowDisplayTransects(boolean value)
          Set the ShowDisplayTransects property.
 void setShowRegularTransects(boolean value)
          Set the ShowRegularTransects property.
 boolean shouldBeVisible(DrawingGlyph tg)
          Overwrite base class method to determine if we should show the glyph
protected  boolean showFilledCbx()
          Overwrite base class method to not show the filled cbx
protected  boolean showLocationWidgets()
          Don't show location widgets
protected  boolean showTimeWidgets()
          Don't show time widgets
protected  void timeChanged(Real time)
          Ignore this call
protected  void transectChanged(DrawingGlyph glyph)
          Write out the transects when we've changed
 void transectViewsChanged()
          This is called by the VMManager to notify us that one of the TransectViewManagers has changed its zoom.
 void writeTransects()
          Write out the transect xml resource
 void zSliderChanged(int value)
          Overwrite this even handler to apply the z position to all of the transect glyphs
 
Methods inherited from class ucar.unidata.idv.control.DrawingControl
addGlyph, applyColorToAll, applyZPosition, canHandleEvents, checkZSliderEnabled, close, closestGlyph, closestGlyph, createGlyph, doCut, doMakeContents, doMakeControlsPanel, doMakeLineWidthBox, doMakeStylePanel, doMakeTablePanel, doProperties, doRemove, evaluateGlyphJython, formatDistance, getAllTimes, getAnimationSet, getControlChangeSleepTime, getCoordType, getCurrentTime, getEditable, getEditMenuItems, getEditorTitle, getEnabled, getFileMenuItems, getFilled, getFont, getFullLatLon, getGlyphJython, getGlyphs, getIgnoreTime, getInitialZPosition, getJustification, getLegendLabels, getLineWidth, getRGBColorTable, getShowFronts, getTimeForGlyph, getUseTime, getVerticalJustification, glyphChanged, handleDisplayChanged, handleWindowClosing, init, isSelected, makeButtonPanel, projectionChanged, receiveShareData, removeAllGlyphs, setActive, setCoordType, setCurrentCommand, setEditable, setEditorTitle, setEnabled, setFilled, setFullLatLon, setGlyphJython, setGlyphs, setIgnoreTime, setLines, setLineWidth, setSelection, setSelection, setShowFronts, setUseTime, shouldAddControlListener, shouldAddDisplayListener, viewpointChanged
 
Methods inherited from class ucar.unidata.idv.control.DisplayControlImpl
actionPerformed, activateDisplays, addAttributedDisplayable, addAttributedDisplayable, addAttributedDisplayable, addAttributeFlags, addCheckBoxSettings, addDataChoice, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayMaster, addDisplaySettings, addLabelMacros, addNewData, addNoteText, addPropertiesComponents, addPropertyChangeListener, addSharable, addToRangeMenu, addToRangeMenu, addToRangeMenu, addViewManager, appendDataChoices, applyAttributesToDisplayables, applyColor, applyColorScaleInfo, applyColorTable, applyColorUnit, applyContourInfo, applyDisplaySetting, applyDisplayUnit, applyLineWidth, applyPreferences, applyProperties, applyProperties, applyPropertyValues, applyRange, applySelectRange, applySkipFactor, applyTimeRange, applyZPosition, boundsClose, canBeDocked, canExportData, canSaveDataInCache, captureWindow, changeColorUnit, changeDisplayUnit, checkFlag, checkIfDataOk, checkImageSize, clearDataInstance, clearPrototype, clearViewManagers, colorUnitChanged, controlChanged, convertColorRange, convertRange, createDisplayListDisplayable, createIdvWindow, dataChanged, deactivateDisplays, debug, displayableToFront, displayChanged, displayControlFailed, displayUnitChanged, doApplyProperties, doMakeBottomLegendComponent, doMakeChangeColorMenu, doMakeChangeColorMenu, doMakeChangeParameterMenuItem, doMakeColorControl, doMakeColorControl, doMakeColorScales, doMakeDataInstance, doMakeMenuBar, doMakeMenuBarMenus, doMakeRemoveControl, doMakeSideLegendComponent, doMakeSkipFactorSlider, 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, getControlWidgets, getCursorReadout, getCursorReadoutInner, getDataChoice, getDataChoices, 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, getDisplayUnit, getDisplayUnitName, getDisplayVisibility, getDoCursorReadout, getEditMenuItems, getExpandedInTabs, getExtraLabelTemplate, getExtraLegendComponent, getExtraMenus, getFileMenuItems, getGraphicsConfiguration, getHadDataChoices, getHaveInitialized, getHelpIds, getHelpMenuItems, getId, getIdv, getImage, getImage, getInitDataChoices, getInitialColorTable, getInitialRange, getLabel, getLastFileMenuItems, getLegendButtons, getLegendComponent, getLegendLabel, getLegendLabelTemplate, getLegendToolTip, getLineWidthWidget, getLineWidthWidgetLabel, getLockVisibilityToggle, getLongParamName, getMacroNames, getMainPanel, getMainPanelSize, getMakeWindow, getMapDisplay, getMapViewManager, getMapViewProjection, getMenuLabel, getMyDataChoices, getNavigatedDisplay, getNoteText, getObjectStore, getOkToFireEvents, getOldColorTableOrInitialColorTable, getOriginalDataChoicesLabel, getOuterContents, getProperty, getProperty, getPropertyDisplayName, getRange, getRangeForColorTable, getRangeToApply, getRawDataUnit, getRequestProperties, getSamplingModeName, getSamplingModeValue, getSaveMenuItems, getSelectRange, getSelectRangeEnabled, getSelectRangeWidget, getSettingsPanel, getShortParamName, getShowInDisplayList, getShowInLegend, getShowInTabs, getShowNoteText, getSkipValue, getSkipWidgetLabel, getStore, getTemplateName, getTimeSet, getTitle, getTransientProperty, getUnitForColor, getUseFastRendering, getUseTimesInAnimation, getVersion, getVerticalValue, getViewContext, getViewer, getViewManager, getViewManager, getViewManager, getViewManagerClassNames, getViewManagers, getViewMenuItems, getViewMenuItems, getWasUnPersisted, getWindow, getWindowSize, getWindowVisible, getWindowX, getWindowY, getZPosition, getZPositionSliderLabel, guiExported, guiImported, hasMapProjection, haveDataTimes, haveParameterDefaults, hide, hyperlinkUpdate, init, init, init, initAfterUnPersistence, initAfterUnPersistence, initAsPrototype, initAsTemplate, initBasic, initializeWithNewData, initWindow, isDisplay3D, isDisplayUnitAlsoColorUnit, isGuiShown, isInitDone, isInTransectView, isInViewManager, itemStateChanged, makeChangeColorMenuItems, makeLegendLabel, makeLockButton, makeRemoveButton, moveTo, notifyViewManagersOfChange, parseProperties, popup, popupDataDialog, popupDataDialog, popupDataDialog, processRequestProperties, propertyChange, putTransientProperty, redoGuiLayout, reloadDataSource, reloadDataSourceInThread, removeDataChoice, removeDisplayable, removeDisplayables, removeOnWindowClose, removePropertyChangeListener, resetData, resetDimness, resetViewManager, revertToDefaultColorTable, revertToDefaultColorTable, revertToDefaultRange, revertToDefaultRange, saveAsFavorite, saveAsParameterDefaults, saveAsPrototype, saveAsTemplate, saveDataChoiceInCache, saveImage, 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, setDisplayCategory, setDisplayId, setDisplayInactive, setDisplayListColor, setDisplayListProperties, setDisplayListTemplate, setDisplayName, setDisplayUnit, setDisplayUnitName, setDoCursorReadout, setExpandedInTabs, setExtraLabelTemplate, setHadDataChoices, setHelpUrl, setId, setInitDataChoices, setInitialSettings, setLabelAsPreference, setLegendBackground, setLegendForeground, setLegendLabel, setLegendLabelTemplate, setLockVisibilityToggle, setMainPanelDimensions, setMainPanelSize, setMakeWindow, setName, setNameFromUser, setNewColorUnit, setNewDisplayUnit, setNoteText, setOkToFireEvents, setOriginalDataChoicesLabel, setParamName, setPersistedVisadData, setProjectionInView, setProjectionInView, setProperty, setRange, setRange, setSelectRange, setSelectRangeEnabled, setSettingsDisplayUnit, setSharedColorScaleInfo, setShowInDisplayList, setShowInLegend, setShowInTabs, setShowNoteText, setSkipValue, setTemplateName, setTitle, setUnitForColor, setUseFastRendering, setUseTimesInAnimation, setVersion, setViewer, setViewManagerClassNames, setWindowSize, setWindowVisible, setWindowX, setWindowY, 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, updateDisplayList, updateLegendAndList, updateLegendLabel, updateLockButton, useZPosition, viewManagerChanged, viewManagerDestroyed, writeTestArchive, xxxsetDisplayActive
 
Methods inherited from class ucar.unidata.idv.control.DisplayControlBase
boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToScreen, calculateRectangle, createStationTfo, earthToBox, earthToBox, earthToBoxTuple, earthToScreen, formatLevels, getScreenCenter, getSelectedStation, isLeftButtonDown, logException, logException, makeEarthLocation, screenToBox, screenToBox, screenToEarth, setStations, setStations, toBox, toEarth, userErrorMessage, userMessage
 
Methods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, removeSharable, setShareGroup, setSharing, setUniqueId, showSharableDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ucar.unidata.collab.Sharable
getShareGroup, getSharing, getUniqueId
 

Constructor Detail

TransectDrawingControl

public TransectDrawingControl()
Create a new Drawing Control; set attributes.

Method Detail

zSliderChanged

public void zSliderChanged(int value)
Overwrite this even handler to apply the z position to all of the transect glyphs

Overrides:
zSliderChanged in class DrawingControl
Parameters:
value - New z position

selectionChanged

protected void selectionChanged()
The selections set of glyphs has changed. Update the global transects if needed

Overrides:
selectionChanged in class DrawingControl

transectChanged

protected void transectChanged(DrawingGlyph glyph)
Write out the transects when we've changed

Parameters:
glyph - Which glyph

doneMovingGlyph

protected void doneMovingGlyph(DrawingGlyph glyph)
The user is done moving or resizing the given glyph

Overrides:
doneMovingGlyph in class DrawingControl
Parameters:
glyph - The glyph that was moved

removeGlyph

public void removeGlyph(DrawingGlyph glyph)
Overwrite base class method to write out the transects on a delete

Overrides:
removeGlyph in class DrawingControl
Parameters:
glyph - Which glyph

initDone

public void initDone()
All initialization is done

Overrides:
initDone in class DisplayControlImpl

getShapeCommands

protected List getShapeCommands()
Provide the list of shape commands to the base class

Overrides:
getShapeCommands in class DrawingControl
Returns:
Shape creation commands

addControlWidgets

protected void addControlWidgets(List widgets)
Add gui components to the list

Overrides:
addControlWidgets in class DrawingControl
Parameters:
widgets - List if gui components

addFileMenuItems

protected void addFileMenuItems(List items,
                                boolean forMenuBar)
Add the relevant file menu items into the list

Overrides:
addFileMenuItems in class DrawingControl
Parameters:
items - List of menu items
forMenuBar - Is this for the menu in the window's menu bar or for a popup menu in the legend

setDisplayedTransect

public void setDisplayedTransect(TransectViewManager tvm)
                          throws VisADException,
                                 RemoteException
Add and/or change the displayed transect for the given tvm.

Parameters:
tvm - The view manager
Throws:
RemoteException - On badness
VisADException - On badness

writeTransects

public void writeTransects()
Write out the transect xml resource


showFilledCbx

protected boolean showFilledCbx()
Overwrite base class method to not show the filled cbx

Overrides:
showFilledCbx in class DrawingControl
Returns:
false

makeModePanel

protected void makeModePanel(List widgets)
Overwrite base class method to make the mode panel

Overrides:
makeModePanel in class DrawingControl
Parameters:
widgets - List of panel widgets to add to

showTimeWidgets

protected boolean showTimeWidgets()
Don't show time widgets

Overrides:
showTimeWidgets in class DrawingControl
Returns:
false

showLocationWidgets

protected boolean showLocationWidgets()
Don't show location widgets

Overrides:
showLocationWidgets in class DrawingControl
Returns:
false

getGlyphNameDefault

protected String getGlyphNameDefault(DrawingGlyph glyph)
Use a different name

Overrides:
getGlyphNameDefault in class DrawingControl
Parameters:
glyph - The glyph
Returns:
glyph name

transectViewsChanged

public void transectViewsChanged()
This is called by the VMManager to notify us that one of the TransectViewManagers has changed its zoom.


setAutoUpdateTransect

public void setAutoUpdateTransect(boolean value)
Set the AutoUpdateTransect property.

Parameters:
value - The new value for AutoUpdateTransect

getAutoUpdateTransect

public boolean getAutoUpdateTransect()
Get the AutoUpdateTransect property.

Returns:
The AutoUpdateTransect

setShowRegularTransects

public void setShowRegularTransects(boolean value)
Set the ShowRegularTransects property.

Parameters:
value - The new value for ShowRegularTransects

getShowRegularTransects

public boolean getShowRegularTransects()
Get the ShowRegularTransects property.

Returns:
The ShowRegularTransects

setShowDisplayTransects

public void setShowDisplayTransects(boolean value)
Set the ShowDisplayTransects property.

Parameters:
value - The new value for ShowDisplayTransects

getShowDisplayTransects

public boolean getShowDisplayTransects()
Get the ShowDisplayTransects property.

Returns:
The ShowDisplayTransects

setDisplayVisibility

public void setDisplayVisibility(boolean on)
Extra check for the display visibility

Specified by:
setDisplayVisibility in interface DisplayControl
Overrides:
setDisplayVisibility in class DrawingControl
Parameters:
on - visible

shouldBeVisible

public boolean shouldBeVisible(DrawingGlyph tg)
Overwrite base class method to determine if we should show the glyph

Overrides:
shouldBeVisible in class DrawingControl
Parameters:
tg - The glyph
Returns:
Should we show this

timeChanged

protected void timeChanged(Real time)
Ignore this call

Overrides:
timeChanged in class DrawingControl
Parameters:
time - The time