Package ucar.unidata.idv
Class NavigatedViewManager
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.idv.ViewManager
ucar.unidata.idv.NavigatedViewManager
- All Implemented Interfaces:
ActionListener,ItemListener,EventListener,Sharable,ControlListener,DisplayListener
- Direct Known Subclasses:
MapViewManager,TransectViewManager
- Author:
- IDV development team
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.unidata.idv.ViewManager
ViewManager.MatrixCommand -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAction command to pan downstatic final StringAction command to reset zoom and panstatic final StringAction command to pan leftstatic final StringAction command to pan rightstatic final StringAction command to rotatestatic final StringAction command to rotatestatic final StringAction command to pan downstatic final StringAction command to pan leftstatic final StringAction command to pan rightstatic final StringAction command to rotatestatic final StringAction command to rotatestatic final StringAction command to tiltstatic final StringAction command to tiltstatic final StringAction command to pan upstatic final StringAction command to zoom instatic final StringAction command to zoom outstatic final StringAction command to pan upstatic final StringAction command to zoom instatic final StringAction command to zoom outprotected CursorReadoutWindowcursor readout windowstatic final StringVertical range propertystatic final StringDefines the viewpoint matrix when sharing statestatic final StringDefines the rubber band box for sharing statestatic final doubleHow far do we zoom on a zoom in or outstatic final doubleHow far do we zoom on a zoom in or outFields inherited from class ucar.unidata.idv.ViewManager
animationHolder, animationMenu, borderHighlightColor, borderWidth, clickToFocus, displayBounds, fullScreenWindow, highlightBorder, innerContents, lastActive, lastTimeActivated, lastTimePolled, logoPoses, nameLabel, normalBorder, PREF_3DCLIP, PREF_ANIREADOUT, PREF_BGCOLOR, PREF_BORDERCOLOR, PREF_CONTOUR_LABELALIGN, PREF_CONTOUR_LABELFONT, PREF_CONTOUR_LABELSIZE, PREF_DIMENSION, PREF_DISPLAYLISTCOLOR, PREF_DISPLAYLISTFONT, PREF_FGCOLOR, PREF_LOGO, PREF_LOGO_POSITION_OFFSET, PREF_LOGO_SCALE, PREF_LOGO_VISIBILITY, PREF_PREFIX, PREF_SHAREVIEWS, PREF_SHOWANIMATIONBOXES, PREF_SHOWBOTTOMLEGEND, PREF_SHOWCURSOR, PREF_SHOWDISPLAYLIST, PREF_SHOWSCALES, PREF_SHOWSIDELEGEND, PREF_SHOWTOOLBAR, PREF_SHOWTRANSECTSCALES, PREF_TOOLBARSFLOATABLE, PREF_TOPBAR_VISIBLE, PREF_WAITMSG, PREF_WIREFRAME, PROP_COMPONENT_RESIZED, showControlLegend, showControlMenu, TAG_COLORPAIR, TAG_COLORPAIRS, toolbarIds, toolbarNames, toolbars, windowBounds -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorNavigatedViewManager(ViewContext viewContext) Construct aNavigatedViewManagerfrom an IDVNavigatedViewManager(ViewContext viewContext, ViewDescriptor desc, String properties) Construct aNavigatedViewManagerwith the specified params. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Required interface for ActionEvents, to implement ActionListener for the UI objects such as JButton-s and MenuItem-sprotected voidaddPropertiesComponents(JTabbedPane tabbedPane) Add components to the properties dialogprotected voidHandle an animation time changevoidApply preferencesbooleanApply properties.protected voidCheck the matrix history.voiddestroy()Cleanup when destroying this object.voidAn implementation of the the DisplayListener interface.doMakeViewPointToolBar(int orientation) Creates the Viewpoint Toolbar in the specified orientation.protected ComponentdoMakeZoomPanToolBar(int orientation) Creates the Zoom/Pan Toolbar in the specified orientation.booleanGet the 3d clipping flagGet the display side coordinate system, subclasses should implement if there is one.protected voidgetInitialBooleanProperties(List props) Get the intial BooleanProperty-sbooleanGet the show vertical scale flagGet the NavigatedDisplay associated with this ViewManagerbooleanGet the show cursor readout flagbooleanGet the show vertical scale flagdouble[]Get the min/max used for the vertical range.Get theUnitused for the vertical range.protected ViewpointControlGet the viewpoint control for this view manager.protected voidhandleBooleanPropertyChange(String id, boolean value) The BooleanProperty identified byt he given id has changed.protected voidRespond toControlEvents.protected booleanHas a viewpoint controlprotected voidinit()Initialize this object.protected voidInitialize the toolbars for the GUIprotected voidinitWithInner(ViewManager that, boolean ignoreWindow) Initialize this object's state with the state from that.protected JMenuCreate and return the show menu.protected voidHandle the change to the matrixprotected voidmouseFlicked(Point startPoint, Point endPoint, double[] startMatrix, double[] endMatrix, double speed) Handle a mouse flickedprotected voidperspectiveViewChanged(boolean v) Handle a perspective view changevoidreceiveShareData(Sharable from, Object dataId, Object[] data) Handle the receipt of shared dataprotected voidHandle the rubber band box changes.voidsetClipping(boolean value) Set the clipping flagprotected voidsetDisplayMaster(DisplayMaster master) Set theDisplayMastervoidsetLabelsVisible(boolean value) Set the show vertical scale flagprotected voidSet the format for the cursor readout.voidsetShowCursor(boolean value) Set the show cursor flagvoidsetTransectLabelsVisible(boolean value) Set the show vertical scale flagvoidsetVerticalRange(double[] r) Set the min/max used for the vertical range.voidSet theUnitused for the vertical range.protected voidSet the vertical range unit from the preferencevoidSet the window that this ViewManager is shown in.protected voidHandle a change to the vertical rangeprotected voidhandle a vertical scale change deprecated seeverticalRangeChanged()Methods inherited from class ucar.unidata.idv.ViewManager
addBooleanProperty, addCommand, addContextMenuItems, addDisplayInfo, addDisplayInfos, addDisplayListener, addRemovable, addToolBar, addViewDescriptor, animationDriverChanged, animationOk, aspectSliderChanged, brighter, canBe, captureIslImage, checkForKmlImageCapture, checkToolBarVisibility, clearDisplays, clearImageGrabber, controlChanged, controlMoved, createCBMI, displayControlChanged, displayControlVisibilityChanged, displayDataChanged, doClose, doDrop, doMakeContents, doMakeDisplayMaster, doMakeMenuBar, doMakeMenuList, doMakeViewState, doneFirstFrame, doPrintImage, doPublishImage, doPublishImage, doSaveImage, doSaveImage, doSaveImageInThread, doSaveState, ensureOnlyOneTimeDriver, fillLegends, fillLegendsInner, fillLegendsLater, findLoc, firstInitializeViewMenu, getAliases, getAnimation, getAnimationInfo, getAnimationStringVisible, getAnimationTimes, getAnimationWidget, getAniReadout, getAspectPropertiesComponent, getAspectRatio, getBackground, getBooleanPropertiesForPersistence, getBooleanProperty, getBooleanProperty, getBp, getBp, getClickToFocus, getCommandManager, getComponent, getContents, getContentsBorder, getControls, getControlsForLegend, getDefaultBackground, getDefaultForeground, getDisplayBounds, getDisplayConventions, getDisplayInfos, getDisplayInitMatrix, getDisplayListColor, getDisplayListFont, getDisplayMatrix, getDisplayRenderer, getDisplayWindow, getExternalAnimation, getExternalAnimationWidget, getForeground, getFullScreenHeight, getFullScreenWidth, getHasWindow, getHaveInitialized, getHighlightBorder, getIdv, getIdvUIManager, getInitDone, getInitViewStateName, getInnerContents, getIsActive, getIsDestroyed, getIsShared, getLastFrameDoneTime, getLastTimeActivated, getLegendOnLeft, getLegends, getLegendState, getLights, getLogoFile, getLogoPosition, getLogoScale, getLogoVisibility, getMainPropertiesComponent, getMaster, getMySize, getName, getNormalBorder, getPerspectiveView, getProjectionControl, getProjectionList, getProperties, getPropertiesComponent, getProperty, getPublishManager, getReallyHasWindow, getResourceManager, getShareViews, getShowAnimationBoxes, getShowBottomLegend, getShowControlLegend, getShowDisplayList, getShowScales, getShowSideLegend, getSideComponent, getSideDividerLocation, getSideLegend, getSideLegendContainer, getSkinProperties, getSkinProperty, getSplitPaneLocation, getStateManager, getStore, getTimeDriverTimes, getTimelineComponent, getToolbarsFloatable, getTopBarVisible, getTypeName, getUniqueId, getUseFastRendering, getViewDescriptor, getViewManager, getVisibleGeoBounds, getVMManager, getWaitMessageVisible, getWireframe, guiInitializationDone, hasBooleanProperty, hasDisplayMaster, initAfterUnPersistence, initBooleanProperties, initColorMenu, initDisplayMenu, initFromSkin, initializeBooleanProperty, initializeViewMenu, initPreferences, initUI, initViewState, initViewStateMenu, initWith, initWith, initWith, insertSideLegend, isClassOk, isCompatibleWith, isCompatibleWith, isDefinedBy, isFullScreen, isInteractive, isVectorGraphicsFile, itemStateChanged, keyWasTyped, logException, makeBufferedImage, makeColorMenu, makeDropPanel, makeFrames, makeLogoPosition, makeSavedViewsMenu, makeViewMenu, makeViewStateMenu, notifyDisplayControls, okToImportDisplay, paintDisplayList, parseLogoPosition, parseProperties, printAspect, putProperty, reallyFillLegends, removeColorPair, removeDisplayInfo, resetAspectSliders, resetFullScreen, resetProjectionControl, setAliases, setAnimatedVisibility, setAnimationInfo, setAnimationStringVisible, setAniReadout, setAspectRatio, setBackground, setBooleanProperties, setBooleanPropertiesForPersistence, setBp, setClickToFocus, setColors, setContentsBorder, setCursorInDisplay, setDisplayBounds, setDisplayListColor, setDisplayListFont, setDisplayMatrix, setExternalAnimation, setForeground, setFullScreen, setFullScreenHeight, setFullScreenWidth, setHasWindow, setHighlightBorder, setIdv, setInitialSplitPaneLocation, setInitViewStateName, setIsShared, setLastActive, setLegendOnLeft, setLegendState, setLegendState, setLights, setLogoFile, setLogoPosition, setLogoScale, setLogoVisibility, setMasterActive, setMasterActive, setMasterInactive, setName, setProjectionFromData, setProperties, setProperty, setShareViews, setShowControlLegend, setShowDisplayList, setShowScales, setShowToolBars, setSideDividerLocation, setSideLegend, setSideLegendPosition, setSize, setSkinProperties, setSplitPaneLocation, setTimeDriverTimes, setTopBarVisible, setView, setViewDescriptor, setWaitMessageVisible, setWindowBounds, setWireframe, shouldDoThingsRightAway, showColorPairDialog, showHighlight, showLegend, showPropertiesDialog, showTimeline, showWindow, startImageCapture, toFront, toggleFullScreen, toString, turnOnOffAllDisplays, updateAnnotations, updateDisplayIfNeeded, updateDisplayList, updateNameLabel, useDisplay, useImages, useImages, writeImage, writeImage, writeImage, writeImage, writeImage, writeImage, writeImage, writeTestArchiveMethods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, initSharable, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
-
Field Details
-
CMD_NAV_DOWN
Action command to pan down- See Also:
-
CMD_NAV_HOME
Action command to reset zoom and pan- See Also:
-
CMD_NAV_LEFT
Action command to pan left- See Also:
-
CMD_NAV_RIGHT
Action command to pan right- See Also:
-
CMD_NAV_ROTATELEFT
Action command to rotate- See Also:
-
CMD_NAV_ROTATERIGHT
Action command to rotate- See Also:
-
CMD_NAV_SMALLDOWN
Action command to pan down- See Also:
-
CMD_NAV_SMALLLEFT
Action command to pan left- See Also:
-
CMD_NAV_SMALLRIGHT
Action command to pan right- See Also:
-
CMD_NAV_SMALLROTATELEFT
Action command to rotate- See Also:
-
CMD_NAV_SMALLROTATERIGHT
Action command to rotate- See Also:
-
CMD_NAV_SMALLTILTDOWN
Action command to tilt- See Also:
-
CMD_NAV_SMALLTILTUP
Action command to tilt- See Also:
-
CMD_NAV_SMALLUP
Action command to pan up- See Also:
-
CMD_NAV_SMALLZOOMIN
Action command to zoom in- See Also:
-
CMD_NAV_SMALLZOOMOUT
Action command to zoom out- See Also:
-
CMD_NAV_UP
Action command to pan up- See Also:
-
CMD_NAV_ZOOMIN
Action command to zoom in- See Also:
-
CMD_NAV_ZOOMOUT
Action command to zoom out- See Also:
-
PROP_VERTICALRANGE
Vertical range property- See Also:
-
SHARE_MATRIX
Defines the viewpoint matrix when sharing state- See Also:
-
SHARE_RUBBERBAND
Defines the rubber band box for sharing state- See Also:
-
ZOOM_FACTOR
public static final double ZOOM_FACTORHow far do we zoom on a zoom in or out- See Also:
-
TRANSLATE_FACTOR
public static final double TRANSLATE_FACTORHow far do we zoom on a zoom in or out- See Also:
-
cursorReadoutWindow
cursor readout window
-
-
Constructor Details
-
NavigatedViewManager
public NavigatedViewManager()Default constructor -
NavigatedViewManager
Construct aNavigatedViewManagerfrom an IDV- Parameters:
viewContext- Really the IDV
-
NavigatedViewManager
public NavigatedViewManager(ViewContext viewContext, ViewDescriptor desc, String properties) throws VisADException, RemoteException Construct aNavigatedViewManagerwith the specified params.- Parameters:
viewContext- context in which this MVM existsdesc-ViewDescriptorproperties- semicolon separated list of properties (can be null)- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
-
Method Details
-
setDisplayMaster
Set theDisplayMaster- Overrides:
setDisplayMasterin classViewManager- Parameters:
master- The display master
-
init
Initialize this object.- Overrides:
initin classViewManager- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
initWithInner
protected void initWithInner(ViewManager that, boolean ignoreWindow) throws VisADException, RemoteException Initialize this object's state with the state from that.- Overrides:
initWithInnerin classViewManager- Parameters:
that- The other obejct to get state fromignoreWindow- If true then don't set the window size and location- Throws:
RemoteException- On badnessVisADException- On badness
-
applyProperties
public boolean applyProperties()Apply properties. Override super class to set class specific props.- Overrides:
applyPropertiesin classViewManager- Returns:
- true if successful
-
addPropertiesComponents
Add components to the properties dialog- Overrides:
addPropertiesComponentsin classViewManager- Parameters:
tabbedPane- the tabbed pane to add to
-
initToolBars
protected void initToolBars()Initialize the toolbars for the GUI- Overrides:
initToolBarsin classViewManager
-
hasViewpointControl
protected boolean hasViewpointControl()Has a viewpoint control- Returns:
- true if it does.
-
getViewpointControl
Get the viewpoint control for this view manager.- Returns:
- the ViewpointControl
-
perspectiveViewChanged
protected void perspectiveViewChanged(boolean v) Handle a perspective view change- Parameters:
v- true to set to perspective view
-
verticalScaleChanged
protected void verticalScaleChanged()handle a vertical scale change deprecated seeverticalRangeChanged() -
destroy
public void destroy()Cleanup when destroying this object.- Overrides:
destroyin classViewManager
-
rubberBandBoxChanged
Handle the rubber band box changes.- Throws:
VisADException- the VisAD exception
-
handleControlChanged
Respond toControlEvents.- Overrides:
handleControlChangedin classViewManager- Parameters:
e-ControlEventto respond to
-
displayChanged
An implementation of the the DisplayListener interface. This method turns on/off the wait cursor when it gets a WAIT_ON or WAIT_OFF event. It also, when it receives a FRAME_DONE event for the fist time, callsfirstFrameDoneon theDisplayControls- Specified by:
displayChangedin interfaceDisplayListener- Overrides:
displayChangedin classViewManager- Parameters:
de- TheDisplayEvent- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
mouseFlicked
protected void mouseFlicked(Point startPoint, Point endPoint, double[] startMatrix, double[] endMatrix, double speed) Handle a mouse flicked- Parameters:
startPoint- the start pointendPoint- the end pointstartMatrix- the start matrixendMatrix- the end matrixspeed- how fast to move
-
animationTimeChanged
protected void animationTimeChanged()Handle an animation time change- Overrides:
animationTimeChangedin classViewManager
-
matrixChanged
protected void matrixChanged()Handle the change to the matrix -
verticalRangeChanged
protected void verticalRangeChanged()Handle a change to the vertical range -
setReadoutFormat
protected void setReadoutFormat()Set the format for the cursor readout. -
applyPreferences
public void applyPreferences()Apply preferences- Overrides:
applyPreferencesin classViewManager
-
handleBooleanPropertyChange
The BooleanProperty identified byt he given id has changed. Apply the change to the display.- Overrides:
handleBooleanPropertyChangein classViewManager- Parameters:
id- Id of the changed BooleanPropertyvalue- Its new value- Throws:
Exception- problem handeling the change
-
getInitialBooleanProperties
Get the intial BooleanProperty-s- Overrides:
getInitialBooleanPropertiesin classViewManager- Parameters:
props- list to add them to.
-
checkHistoryMatrix
protected void checkHistoryMatrix()Check the matrix history. -
setWindow
Set the window that this ViewManager is shown in. This adds this object as aWindowListenerand sets the bounds of the window if the windowBounds is non-null.- Overrides:
setWindowin classViewManager- Parameters:
w- The window
-
doMakeViewPointToolBar
Creates the Viewpoint Toolbar in the specified orientation.- Parameters:
orientation- orientation of the toolbar (JToolBar.VERTICAL or JToolBar.HORIZONTAL)- Returns:
- the toolbar component
-
doMakeZoomPanToolBar
Creates the Zoom/Pan Toolbar in the specified orientation.- Parameters:
orientation- orientation of the toolbar (JToolBar.VERTICAL or JToolBar.HORIZONTAL)- Returns:
- the toolbar component
-
actionPerformed
Required interface for ActionEvents, to implement ActionListener for the UI objects such as JButton-s and MenuItem-s- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classViewManager- Parameters:
event- an ActionEvent
-
makeShowMenu
Create and return the show menu.- Overrides:
makeShowMenuin classViewManager- Returns:
- The Show menu
-
setShowCursor
public void setShowCursor(boolean value) Set the show cursor flag- Parameters:
value- The value
-
getShowCursor
public boolean getShowCursor()Get the show cursor readout flag- Returns:
- The flag value
-
setLabelsVisible
public void setLabelsVisible(boolean value) Set the show vertical scale flag- Parameters:
value- The value
-
getLabelsVisible
public boolean getLabelsVisible()Get the show vertical scale flag- Returns:
- The flag value
-
setTransectLabelsVisible
public void setTransectLabelsVisible(boolean value) Set the show vertical scale flag- Parameters:
value- The value
-
getTransectLabelsVisible
public boolean getTransectLabelsVisible()Get the show vertical scale flag- Returns:
- The flag value
-
setClipping
public void setClipping(boolean value) Set the clipping flag- Parameters:
value- The value
-
getClipping
public boolean getClipping()Get the 3d clipping flag- Returns:
- The flag value
-
setVerticalRangeUnit
Set theUnitused for the vertical range.- Parameters:
u- new unit
-
getVerticalRangeUnit
Get theUnitused for the vertical range.- Returns:
- unit of vertical range values
-
getVerticalRange
public double[] getVerticalRange()Get the min/max used for the vertical range.- Returns:
- array of vertical range values (double[] {min, max})
-
setVerticalRange
public void setVerticalRange(double[] r) Set the min/max used for the vertical range.- Parameters:
r- array of vertical range values (double[] {min, max})
-
getDisplayCoordinateSystem
Get the display side coordinate system, subclasses should implement if there is one.- Overrides:
getDisplayCoordinateSystemin classViewManager- Returns:
- CoordinateSystem or null