Package ucar.unidata.idv
Class MapViewManager
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.idv.ViewManager
ucar.unidata.idv.NavigatedViewManager
ucar.unidata.idv.MapViewManager
- All Implemented Interfaces:
ActionListener,ItemListener,EventListener,Sharable,ControlListener,DisplayListener
A wrapper around a MapProjectDisplay display master.
Provides an interface for managing user interactions, gui creation, etc.
- Author:
- IDV development team
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass ProjectionCommand manages changes to the projectionNested classes/interfaces inherited from class ucar.unidata.idv.ViewManager
ViewManager.MatrixCommand -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringflythrough commandstatic final Stringflythrough commandstatic final Stringflythrough commandstatic final Stringflythrough commandstatic final Stringlabel for progressive resolution/disclosure/whatever we call itstatic final Stringpreference id for the list of addresses in the geocode dialogstatic final Stringdo we reproject when we go to an addressstatic final StringPreference for autorotate in globe modestatic final StringPreference for the globe background colorstatic final StringPreference for showing display in perspective view_static final StringPreference for default projectionstatic final StringPreference for setting projection automatically from data_static final StringPreference for showing the earth nav panelstatic final StringPreference for showing the globe backgroundstatic final StringPreference for showing the pipstatic final StringPreference for progressive resolutionstatic final Stringback globe clipping distancestatic final Stringfront globe clipping distancestatic final Stringback map clipping distancestatic final Stringfron map clipping distancestatic final StringDefines the projection when sharing stateFields inherited from class ucar.unidata.idv.NavigatedViewManager
CMD_NAV_DOWN, CMD_NAV_HOME, CMD_NAV_LEFT, CMD_NAV_RIGHT, CMD_NAV_ROTATELEFT, CMD_NAV_ROTATERIGHT, CMD_NAV_SMALLDOWN, CMD_NAV_SMALLLEFT, CMD_NAV_SMALLRIGHT, CMD_NAV_SMALLROTATELEFT, CMD_NAV_SMALLROTATERIGHT, CMD_NAV_SMALLTILTDOWN, CMD_NAV_SMALLTILTUP, CMD_NAV_SMALLUP, CMD_NAV_SMALLZOOMIN, CMD_NAV_SMALLZOOMOUT, CMD_NAV_UP, CMD_NAV_ZOOMIN, CMD_NAV_ZOOMOUT, cursorReadoutWindow, PROP_VERTICALRANGE, SHARE_MATRIX, SHARE_RUBBERBAND, TRANSLATE_FACTOR, ZOOM_FACTORFields 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 constructorMapViewManager(ViewContext viewContext) Construct aMapViewManagerfrom an IDVMapViewManager(ViewContext viewContext, ViewDescriptor desc, String properties) Construct aMapViewManagerwith 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-svoidaddDisplayInfos(List<DisplayInfo> displayInfos) Reset projection of display based control's getDataProjection().protected voidaddPropertiesComponents(JTabbedPane tabbedPane) Add the properties components for this ViewManagerprotected voidHandle the animation time changedvoidApply preferencesbooleanApply the propertiesbooleancanBe(ViewManager that) Can this view manager be used in exchange for the given view managervoidcenter(MapProjection mp) Center the display (animated) to the center of the given mapprojectionprotected booleanCheck if its ok to capture a kmz filevoidCheck the pip panel.voidcheckProjection(FieldImpl data, DisplayControl display) Reset projection of display based on data.voiddestroy()Destroy this ViewManagervoiddisplayChanged(DisplayEvent event) Handle the eventvoiddisplayDataChanged(DisplayControl display) Handle a change to the data in a DisplayControlvoiddisplayDataChanged(DisplayControl display, boolean fromInitialLoad) Handle a change to the data in a DisplayControlprotected ContainerMake the GUI contents.protected DisplayMasterMake the DisplayMaster for this ViewManagerCreate and return the list of menus for the menu bar.protected voidReceived the first frame done event from the displayprotected voidFill the legendsvoidflythrough(float[][] pts) Do a flythroughvoidflythrough(List<FlythroughPoint> pts) Flythrough the pointsbooleanGet the autorotate flagfloatGet the default map position from a propertyucar.unidata.geoloc.ProjectionImplGet the default projection to useGet the DfltProjectionName property.doubleGet the DisplayProjectionZoom property.Get the Flythrough property.Get the GlobeBackgroundColor property.Get the GlobeBackgroundColor property to be used.doubleGet the GlobeBackgroundLevel property.booleanGet the GlobeBackgroundShow property.protected voidgetInitialBooleanProperties(List props) Create the set ofBooleanPropertys.Get the InitLatLonBounds property.Get the InitMapColor property.Get the InitMapPaths property.floatGet the InitMapWidth property.Get theJComponentfor the VisAD displayGets the lat axis scale info.Gets the lon axis scale info.Get the current projection.Used for xml encoding/decoding.The main projection name.Used for xml encoding/decoding.Get the map display.booleanGet the perspective view flagGet the earth location of the screen centerGet a list of named locations of the different points of the view rectangle.booleanGet the ShowEarthNavPanel property.booleanGet the ShowMaps property.booleanGet the ShowPipPanel property.protected JComponentgetSideComponent(JComponent sideLegend) Add the PIP panel if neededWhat type of view is thisbooleangetUse3D()Get the use 3D display flag.booleanGet the globe display flag.booleanGet the ProgressiveResolution property.booleanGet the use projection from data flagGet the bounds that are visiblevoidGo the a street addressprotected voidhandleBooleanPropertyChange(String id, boolean value) The BooleanProperty identified byt he given id has changed.voidhidePip()Hide the pip panelprotected voidinit()Initialize this object.final voidInitialize after unpersistencevoidinitializeDisplaysProjectionMenu(JMenu displaysMenu) Init menuvoidInit menuvoidinitializeProjectionMenu(JMenu projectionsMenu) Init menuvoidinitializeViewMenu(JMenu viewMenu) Dynamically initialize the view menuvoidinitPreferences(IdvPreferenceManager preferenceManager) Add in the different preference panels.protected voidInitialize the toolbars for the GUIprotected voidinitUI()Initialize the UIvoidinitViewState(ViewState viewState) Initialize the ViewStatevoidInitialize with another viewprotected voidinitWithInner(ViewManager that, boolean ignoreWindow) Initialize this object's state with the state from that.booleanIs this a compatible ViewManagerbooleanisCompatibleWith(ViewState viewState) Is this compatible with the ViewStatebooleanAre we in 3d modestatic voidmakeProjectionsMenu(JMenu projectionsMenu, List projections, Object object, String method) Make the projections menu.static voidmakeProjectionsMenu(JMenu projectionsMenu, List projections, Object object, String method, ucar.unidata.geoloc.ProjectionImpl currentProjection) Make the projections menuprotected JMenuCreate and return the show menu.protected voidmouseFlicked(Point startPoint, Point endPoint, double[] startMatrix, double[] endMatrix, double speed) Handle the mouse flickedbooleanokToImportDisplay(DisplayControl control) can this viewmanager import the given display controlprotected voidperspectiveViewChanged(boolean v) Handle a perspective view changevoidreceiveShareData(Sharable from, Object dataId, Object[] data) Handle the receipt of shared datavoidsetAutoRotate(boolean value) Set the autorotate propertyvoidsetBgColor(boolean bgColor) Set the background color property.voidSet the current viewpoint as the projectionvoidsetDefaultProjectionName(String value) Set the DfltProjectionName property.voidsetDisplayProjectionZoom(double value) Set the DisplayProjectionZoom property.voidsetFlythrough(Flythrough value) Set the Flythrough property.voidsetGlobeBackgroundColor(Color value) Set the GlobeBackgroundColor property.voidsetGlobeBackgroundLevel(double value) Set the GlobeBackgroundLevel property.voidsetGlobeBackgroundShow(boolean value) Set the GlobeBackgroundShow property.voidsetInitialMapResources(String value) Set the InitialMapResources property.voidSet the InitLatLonBounds property.voidSet the intial lat/lon colorvoidsetInitLatLonSpacing(float v) Set the initial lat/lon spacingvoidsetInitLatLonVisible(boolean v) Set the intial lat/lon visiblevoidsetInitLatLonWidth(int v) Set the initial lat/lon line widthvoidsetInitMapColor(Color value) Set the InitMapColor property.voidsetInitMapPaths(String value) Set the InitMapPaths property.voidsetInitMapWidth(float value) Set the InitMapWidth property.voidsetLatAxisScaleInfo(LatLonAxisScaleInfo axisScaleInfo) Sets the lat axis scale info.voidsetLonAxisScaleInfo(LatLonAxisScaleInfo axisScaleInfo) Sets the lon axis scale info.voidsetMainProjection(MapProjection projection) Set the current projection.voidsetMainProjectionName(String projectionName) The main projection name.Used for xml encoding/decoding.voidsetMapArea(ucar.unidata.geoloc.ProjectionRect mapArea) Set or reset map area of view, using NavigatedDisplay method.voidsetMapConfigFile(String location) Have this so we don't get warnings on unpersisting old bundlesvoidsetMapProjection(MapProjection projection, boolean fromWidget) A wrapper aroung the setMapProjection call that takes a projection name.booleansetMapProjection(MapProjection projection, boolean fromWidget, String name) Set map projection in the main display.booleansetMapProjection(MapProjection projection, boolean fromWidget, String name, boolean checkDefault) Set map projection in the main display.booleansetMapProjection(MapProjection projection, boolean fromWidget, String name, boolean checkDefault, boolean addToCommandHistory) Set map projection in the main display.booleansetMapProjection(MapProjection projection, boolean fromWidget, String name, boolean checkDefault, boolean addToCommandHistory, boolean maintainViewpoint) Set map projection in the main display.voidsetMapState(String ms) Leave this here for old bundlesvoidsetPerspectiveView(boolean value) Set the perspective view flagvoidsetProjection(ucar.unidata.geoloc.ProjectionImpl p) Set the current projectionvoidsetProjectionByName(String projName) Find and set the projection by namevoidsetProjectionFromData(boolean value) _more_voidSet the projection to the first projection found in the displaysvoidsetShowEarthNavPanel(boolean value) Set the ShowEarthNavPanel property.voidsetShowElevation(boolean value) Dummy for old bundlesvoidsetShowMap(boolean value) Dummy for old bundlesvoidsetShowMaps(boolean value) Set the ShowMaps property.voidsetShowPip(boolean value) Set the ShowPipPanel property.voidsetUse3D(boolean use) Use a 3D display.voidsetUseGlobeDisplay(boolean use) Use globe display.voidsetUseProgressiveResolution(boolean value) Set the Progressive Resolution property.voidsetUseProjectionFromData(boolean value) Set the use projection from data flagvoidsetViewpointInfo(ViewpointInfo viewpointInfo) Set the viewpoint infobooleanShould we animate view changesvoidShow the fly throughvoidShow the projection manager.protected voidIf we are using a ProjectionImpl then see if it hsaprotected voidHandle a vertical range changeprotected voidHandle a vertical scale change deprecated seeverticalRangeChanged()Methods inherited from class ucar.unidata.idv.NavigatedViewManager
checkHistoryMatrix, doMakeViewPointToolBar, doMakeZoomPanToolBar, getClipping, getDisplayCoordinateSystem, getLabelsVisible, getNavigatedDisplay, getShowCursor, getTransectLabelsVisible, getVerticalRange, getVerticalRangeUnit, getViewpointControl, handleControlChanged, hasViewpointControl, matrixChanged, rubberBandBoxChanged, setClipping, setDisplayMaster, setLabelsVisible, setReadoutFormat, setShowCursor, setTransectLabelsVisible, setVerticalRange, setVerticalRangeUnit, setVerticalRangeUnitPreference, setWindowMethods inherited from class ucar.unidata.idv.ViewManager
addBooleanProperty, addCommand, addContextMenuItems, addDisplayInfo, addDisplayListener, addRemovable, addToolBar, addViewDescriptor, animationDriverChanged, animationOk, aspectSliderChanged, brighter, captureIslImage, checkToolBarVisibility, clearDisplays, clearImageGrabber, controlChanged, controlMoved, createCBMI, displayControlChanged, displayControlVisibilityChanged, doClose, doDrop, doMakeMenuBar, doMakeViewState, doPrintImage, doPublishImage, doPublishImage, doSaveImage, doSaveImage, doSaveImageInThread, doSaveState, ensureOnlyOneTimeDriver, 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, getIsActive, getIsDestroyed, getIsShared, getLastFrameDoneTime, getLastTimeActivated, getLegendOnLeft, getLegends, getLegendState, getLights, getLogoFile, getLogoPosition, getLogoScale, getLogoVisibility, getMainPropertiesComponent, getMaster, getMySize, getName, getNormalBorder, getProjectionControl, getProjectionList, getProperties, getPropertiesComponent, getProperty, getPublishManager, getReallyHasWindow, getResourceManager, getShareViews, getShowAnimationBoxes, getShowBottomLegend, getShowControlLegend, getShowDisplayList, getShowScales, getShowSideLegend, getSideDividerLocation, getSideLegend, getSideLegendContainer, getSkinProperties, getSkinProperty, getSplitPaneLocation, getStateManager, getStore, getTimeDriverTimes, getTimelineComponent, getToolbarsFloatable, getTopBarVisible, getUniqueId, getUseFastRendering, getViewDescriptor, getViewManager, getVMManager, getWaitMessageVisible, getWireframe, guiInitializationDone, hasBooleanProperty, hasDisplayMaster, initBooleanProperties, initColorMenu, initDisplayMenu, initFromSkin, initializeBooleanProperty, initViewStateMenu, initWith, initWith, insertSideLegend, isClassOk, isDefinedBy, isFullScreen, isInteractive, isVectorGraphicsFile, itemStateChanged, keyWasTyped, logException, makeBufferedImage, makeColorMenu, makeDropPanel, makeFrames, makeLogoPosition, makeSavedViewsMenu, makeViewMenu, makeViewStateMenu, notifyDisplayControls, 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, 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
-
PROP_CLIPDISTANCE_GLOBE_FRONT
front globe clipping distance- See Also:
-
PROP_CLIPDISTANCE_GLOBE_BACK
back globe clipping distance- See Also:
-
PROP_CLIPDISTANCE_MAP_FRONT
fron map clipping distance- See Also:
-
PROP_CLIPDISTANCE_MAP_BACK
back map clipping distance- See Also:
-
CMD_FLY_LEFT
flythrough command- See Also:
-
CMD_FLY_RIGHT
flythrough command- See Also:
-
CMD_FLY_FORWARD
flythrough command- See Also:
-
CMD_FLY_BACK
flythrough command- See Also:
-
PREF_ADDRESS_LIST
preference id for the list of addresses in the geocode dialog- See Also:
-
PREF_ADDRESS_REPROJECT
do we reproject when we go to an address- See Also:
-
PREF_AUTOROTATE
Preference for autorotate in globe mode- See Also:
-
PREF_PERSPECTIVEVIEW
Preference for showing display in perspective view_- See Also:
-
PREF_PROJ_DFLT
Preference for default projection- See Also:
-
PREF_PROJ_USEFROMDATA
Preference for setting projection automatically from data_- See Also:
-
PREF_SHOWPIP
Preference for showing the pip- See Also:
-
PREF_USE_PROGRESSIVE_RESOLUTION
Preference for progressive resolution- See Also:
-
PR_LABEL
label for progressive resolution/disclosure/whatever we call it- See Also:
-
PREF_SHOWGLOBEBACKGROUND
Preference for showing the globe background- See Also:
-
PREF_GLOBEBACKGROUND
Preference for the globe background color- See Also:
-
PREF_SHOWEARTHNAVPANEL
Preference for showing the earth nav panel- See Also:
-
SHARE_PROJECTION
Defines the projection when sharing state- See Also:
-
-
Constructor Details
-
MapViewManager
public MapViewManager()Default constructor -
MapViewManager
Construct aMapViewManagerfrom an IDV- Parameters:
viewContext- Really the IDV
-
MapViewManager
public MapViewManager(ViewContext viewContext, ViewDescriptor desc, String properties) throws VisADException, RemoteException Construct aMapViewManagerwith the specified params- Parameters:
viewContext- context in which this MVM existsdesc-ViewDescriptorproperties- semicolon separated list of properties (can be null)- Throws:
RemoteException- Java RMI problemVisADException- Couldn't create the VisAD object
-
-
Method Details
-
getDefaultProjection
public ucar.unidata.geoloc.ProjectionImpl getDefaultProjection()Get the default projection to use- Returns:
- The default projection
-
doMakeDisplayMaster
Make the DisplayMaster for this ViewManager- Overrides:
doMakeDisplayMasterin classViewManager- Returns:
- the DisplayMaster
- Throws:
RemoteException- Java RMI problemVisADException- Couldn't create the VisAD object
-
getScreenCenter
Get the earth location of the screen center- Returns:
- screen center
- Throws:
RemoteException- On badnessVisADException- On badness
-
getScreenCoordinates
Get a list of named locations of the different points of the view rectangle. e.g., center, upper left, etc.- Returns:
- list of locations
- Throws:
RemoteException- On badnessVisADException- On badness
-
init
Initialize this object.- Overrides:
initin classNavigatedViewManager- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
initUI
protected void initUI()Initialize the UI- Overrides:
initUIin classViewManager
-
fillLegends
protected void fillLegends()Fill the legends- Overrides:
fillLegendsin classViewManager
-
perspectiveViewChanged
protected void perspectiveViewChanged(boolean v) Handle a perspective view change- Overrides:
perspectiveViewChangedin classNavigatedViewManager- Parameters:
v- the value
-
verticalScaleChanged
protected void verticalScaleChanged()Handle a vertical scale change deprecated seeverticalRangeChanged()- Overrides:
verticalScaleChangedin classNavigatedViewManager
-
verticalRangeChanged
protected void verticalRangeChanged()Handle a vertical range change- Overrides:
verticalRangeChangedin classNavigatedViewManager
-
shouldAnimateViewChanges
public boolean shouldAnimateViewChanges()Should we animate view changes- Returns:
- true if not running ISL
-
displayChanged
Handle the event- Specified by:
displayChangedin interfaceDisplayListener- Overrides:
displayChangedin classNavigatedViewManager- Parameters:
event- The event- Throws:
RemoteException- On badnessVisADException- On badness
-
mouseFlicked
protected void mouseFlicked(Point startPoint, Point endPoint, double[] startMatrix, double[] endMatrix, double speed) Handle the mouse flicked- Overrides:
mouseFlickedin classNavigatedViewManager- Parameters:
startPoint- start point of flickendPoint- end point of flickstartMatrix- the start matrixendMatrix- the end matrixspeed- the speed of flicking
-
checkForKmlImageCapture
protected boolean checkForKmlImageCapture()Check if its ok to capture a kmz file- Overrides:
checkForKmlImageCapturein classViewManager- Returns:
- ok to capture kmz
-
canBe
Can this view manager be used in exchange for the given view manager- Overrides:
canBein classViewManager- Parameters:
that- The other view manager to check- Returns:
- Can this be used in place of that
-
initWith
Initialize with another view- Overrides:
initWithin classViewManager- Parameters:
viewState- the view state- Throws:
Exception- problems
-
animationTimeChanged
protected void animationTimeChanged()Handle the animation time changed- Overrides:
animationTimeChangedin classNavigatedViewManager
-
initWithInner
protected void initWithInner(ViewManager that, boolean ignoreWindow) throws VisADException, RemoteException Initialize this object's state with the state from that.- Overrides:
initWithInnerin classNavigatedViewManager- Parameters:
that- The other obejct to get state fromignoreWindow- If true then don't set the window size and location- Throws:
RemoteException- Java RMI problemVisADException- Couldn't create the VisAD object
-
initViewState
Initialize the ViewState- Overrides:
initViewStatein classViewManager- Parameters:
viewState- the ViewState
-
getInnerContents
Get theJComponentfor the VisAD display- Overrides:
getInnerContentsin classViewManager- Returns:
- VisAD display's Component
-
setMapState
Leave this here for old bundles- Parameters:
ms- The map specification
-
initPreferences
Add in the different preference panels.- Overrides:
initPreferencesin classViewManager- Parameters:
preferenceManager- The preference manager to add things into
-
goToAddress
public void goToAddress()Go the a street address -
getMapDisplay
Get the map display.- Returns:
- The map display. This is the main display for thie view manager.
-
isDisplay3D
public boolean isDisplay3D()Are we in 3d mode- Returns:
- Is display in 3d?
-
getSideComponent
Add the PIP panel if needed- Overrides:
getSideComponentin classViewManager- Parameters:
sideLegend- The side legend- Returns:
- The side legend or the sidelegend coupled with the pip panel
-
doMakeContents
Make the GUI contents.- Overrides:
doMakeContentsin classViewManager- Returns:
- The GUI contents
-
initToolBars
protected void initToolBars()Initialize the toolbars for the GUI- Overrides:
initToolBarsin classNavigatedViewManager
-
setViewpointInfo
Set the viewpoint info- Parameters:
viewpointInfo- the viewpoint info
-
initializeViewMenu
Dynamically initialize the view menu- Overrides:
initializeViewMenuin classViewManager- Parameters:
viewMenu- the view menu
-
doMakeMenuList
Create and return the list of menus for the menu bar. Just the map and view menu.- Overrides:
doMakeMenuListin classViewManager- Returns:
- List of menus.
-
makeShowMenu
Create and return the show menu.- Overrides:
makeShowMenuin classNavigatedViewManager- Returns:
- The Show menu
-
center
Center the display (animated) to the center of the given mapprojection- Parameters:
mp- map projection- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
setProjectionFromFirstDisplay
public void setProjectionFromFirstDisplay()Set the projection to the first projection found in the displays -
updateProjection
If we are using a ProjectionImpl then see if it hsa- Throws:
RemoteException- On badnessVisADException- On badness
-
setProjectionByName
Find and set the projection by name- Parameters:
projName- projection name
-
setProjection
public void setProjection(ucar.unidata.geoloc.ProjectionImpl p) Set the current projection- Parameters:
p- The new projection.
-
setMapProjection
A wrapper aroung the setMapProjection call that takes a projection name. This passes in null.- Parameters:
projection- The projectionfromWidget- Is it from the projection selection widget
-
getMainProjection
Get the current projection.Used for xml encoding/decoding.- Returns:
- The current projection
-
setMainProjection
Set the current projection. Used for xml encoding/decoding.- Parameters:
projection- The new projection
-
getMainProjectionName
The main projection name.Used for xml encoding/decoding.- Returns:
- Projection name
-
setMainProjectionName
The main projection name.Used for xml encoding/decoding.- Parameters:
projectionName- Projection name
-
setDefaultProjectionName
Set the DfltProjectionName property.- Parameters:
value- The new value for DfltProjectionName
-
getDefaultProjectionName
Get the DfltProjectionName property.- Returns:
- The DfltProjectionName
-
setMapProjection
Set map projection in the main display.- Parameters:
projection- a ProjectionfromWidget- true if this was from a widget (ie. widget or menu item)name- name to put in the history list (may be null)- Returns:
- true if successful
-
setMapProjection
public boolean setMapProjection(MapProjection projection, boolean fromWidget, String name, boolean checkDefault) Set map projection in the main display.- Parameters:
projection- a ProjectionfromWidget- true if this was from a widget (ie. widget or menu item)name- name to put in the history list (may be null)checkDefault- if true, check to see if we should call getUseProjectionFromData()- Returns:
- true if successful
-
setMapProjection
public boolean setMapProjection(MapProjection projection, boolean fromWidget, String name, boolean checkDefault, boolean addToCommandHistory) Set map projection in the main display.- Parameters:
projection- a ProjectionfromWidget- true if this was from a widget (ie. widget or menu item)name- name to put in the history list (may be null)checkDefault- if true, check to see if we should call getUseProjectionFromData()addToCommandHistory- Add this projection to the command history- Returns:
- true if successful
-
setMapProjection
public boolean setMapProjection(MapProjection projection, boolean fromWidget, String name, boolean checkDefault, boolean addToCommandHistory, boolean maintainViewpoint) Set map projection in the main display.- Parameters:
projection- a ProjectionfromWidget- true if this was from a widget (ie. widget or menu item)name- name to put in the history list (may be null)checkDefault- if true, check to see if we should call getUseProjectionFromData()addToCommandHistory- Add this projection to the command historymaintainViewpoint- maintain the viewpoint- Returns:
- true if successful
-
checkPipPanel
public void checkPipPanel()Check the pip panel. If non-null have it reset its box -
okToImportDisplay
can this viewmanager import the given display control- Overrides:
okToImportDisplayin classViewManager- Parameters:
control- the control- Returns:
- ok to import
-
doneFirstFrame
protected void doneFirstFrame()Received the first frame done event from the display- Overrides:
doneFirstFramein classViewManager
-
applyProperties
public boolean applyProperties()Apply the properties- Overrides:
applyPropertiesin classNavigatedViewManager- Returns:
- true if successful
-
addPropertiesComponents
Add the properties components for this ViewManager- Overrides:
addPropertiesComponentsin classNavigatedViewManager- Parameters:
tabbedPane- the tabbed pane to add to
-
destroy
public void destroy()Destroy this ViewManager- Overrides:
destroyin classNavigatedViewManager
-
showFlythrough
public void showFlythrough()Show the fly through -
flythrough
public void flythrough(float[][] pts) Do a flythrough- Parameters:
pts- the flythrough points
-
flythrough
Flythrough the points- Parameters:
pts- the List of points
-
initAfterUnPersistence
public final void initAfterUnPersistence(IntegratedDataViewer idv) throws VisADException, RemoteException Initialize after unpersistence- Overrides:
initAfterUnPersistencein classViewManager- Parameters:
idv- the IDV- Throws:
RemoteException- Java RMI exceptionVisADException- VisAD problem
-
displayDataChanged
Handle a change to the data in a DisplayControl- Overrides:
displayDataChangedin classViewManager- Parameters:
display- the DisplayControl
-
displayDataChanged
Handle a change to the data in a DisplayControl- Parameters:
display- the DisplayControlfromInitialLoad- if this is from the initial load
-
addDisplayInfos
Reset projection of display based control's getDataProjection(). called by DisplayInfo.addDisplayable (), usually from control's init.- Overrides:
addDisplayInfosin classViewManager- Parameters:
displayInfos- The List of new display infos to add- Throws:
RemoteException- Java RMI ExceptionVisADException- Problem creating VisAD object
-
checkProjection
Reset projection of display based on data. deprecated no substitute. Use setMapProjection()- Parameters:
data- The data form the displaydisplay- The display
-
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 classNavigatedViewManager- Parameters:
event- an ActionEvent
-
getVisibleGeoBounds
Get the bounds that are visible- Overrides:
getVisibleGeoBoundsin classViewManager- Returns:
- bounds
-
setCurrentAsProjection
public void setCurrentAsProjection()Set the current viewpoint as the projection -
showProjectionManager
public void showProjectionManager()Show the projection manager. -
setMapArea
public void setMapArea(ucar.unidata.geoloc.ProjectionRect mapArea) Set or reset map area of view, using NavigatedDisplay method.- Parameters:
mapArea- ProjectionRect the map area of view
-
initializeProjectionMenu
Init menu- Parameters:
projectionsMenu- menu
-
initializeDisplaysProjectionMenu
Init menu- Parameters:
displaysMenu- menu
-
makeProjectionsMenu
public static void makeProjectionsMenu(JMenu projectionsMenu, List projections, Object object, String method) Make the projections menu. Call the method on the given object.- Parameters:
projectionsMenu- Menu to add toprojections- List of projectionsobject- object to callmethod- method to call
-
makeProjectionsMenu
public static void makeProjectionsMenu(JMenu projectionsMenu, List projections, Object object, String method, ucar.unidata.geoloc.ProjectionImpl currentProjection) Make the projections menu- Parameters:
projectionsMenu- the menu to add toprojections- list of projectionsobject- object to callmethod- method to callcurrentProjection- current projection
-
initializeProjectionHistoryMenu
Init menu- Parameters:
menu- menu
-
isCompatibleWith
Is this a compatible ViewManager- Overrides:
isCompatibleWithin classViewManager- Parameters:
vm- the other- Returns:
- true if compatible
-
isCompatibleWith
Is this compatible with the ViewState- Overrides:
isCompatibleWithin classViewManager- Parameters:
viewState- the view state- Returns:
- true if compatible
-
setMapConfigFile
Have this so we don't get warnings on unpersisting old bundles- Parameters:
location- The location
-
setUseGlobeDisplay
public void setUseGlobeDisplay(boolean use) Use globe display. Used for xml encoding/decoding.- Parameters:
use- The globe display value
-
getUseGlobeDisplay
public boolean getUseGlobeDisplay()Get the globe display flag. Used for xml encoding/decoding.- Returns:
- The globe display value
-
setUse3D
public void setUse3D(boolean use) Use a 3D display. Used for xml encoding/decoding.- Parameters:
use- The use 3D display value
-
getUse3D
public boolean getUse3D()Get the use 3D display flag. Used for xml encoding/decoding.- Returns:
- The use 3D value
-
handleBooleanPropertyChange
The BooleanProperty identified byt he given id has changed. Apply the change to the display.- Overrides:
handleBooleanPropertyChangein classNavigatedViewManager- Parameters:
id- Id of the changed BooleanPropertyvalue- Its new value- Throws:
Exception- problem handeling the change
-
applyPreferences
public void applyPreferences()Apply preferences- Overrides:
applyPreferencesin classNavigatedViewManager
-
getInitialBooleanProperties
Create the set ofBooleanPropertys. These hold all of the different flag based display state.- Overrides:
getInitialBooleanPropertiesin classNavigatedViewManager- Parameters:
props- the list of properties
-
setAutoRotate
public void setAutoRotate(boolean value) Set the autorotate property- Parameters:
value- The value
-
getAutoRotate
public boolean getAutoRotate()Get the autorotate flag- Returns:
- The flag value
-
setPerspectiveView
public void setPerspectiveView(boolean value) Set the perspective view flag- Parameters:
value- The value
-
getPerspectiveView
public boolean getPerspectiveView()Get the perspective view flag- Overrides:
getPerspectiveViewin classViewManager- Returns:
- The flag value
-
setShowMap
public void setShowMap(boolean value) Dummy for old bundles- Parameters:
value- The value
-
setShowElevation
public void setShowElevation(boolean value) Dummy for old bundles- Parameters:
value- The value
-
setProjectionFromData
public void setProjectionFromData(boolean value) _more_- Overrides:
setProjectionFromDatain classViewManager- Parameters:
value- _more_
-
setUseProjectionFromData
public void setUseProjectionFromData(boolean value) Set the use projection from data flag- Parameters:
value- The value
-
getUseProjectionFromData
public boolean getUseProjectionFromData()Get the use projection from data flag- Returns:
- The flag value
-
setBgColor
public void setBgColor(boolean bgColor) Set the background color property. deprecated Keep this around for old bundles- Parameters:
bgColor- The value
-
hidePip
public void hidePip()Hide the pip panel -
setShowPip
public void setShowPip(boolean value) Set the ShowPipPanel property.- Parameters:
value- The new value for ShowPipPanel
-
getShowPip
public boolean getShowPip()Get the ShowPipPanel property.- Returns:
- The ShowPipPanel
-
setUseProgressiveResolution
public void setUseProgressiveResolution(boolean value) Set the Progressive Resolution property.- Parameters:
value- The new value for Progressive Resolution
-
getUseProgressiveResolution
public boolean getUseProgressiveResolution()Get the ProgressiveResolution property.- Returns:
- The ProgressiveResolution
-
setInitialMapResources
Set the InitialMapResources property. This gets set by the viewmanager properties and is a comma separated list of map resource paths.- Parameters:
value- The new value for InitialMapResources
-
getTypeName
What type of view is this- Overrides:
getTypeNamein classViewManager- Returns:
- The type of view
-
getDefaultMapPosition
public float getDefaultMapPosition()Get the default map position from a property- Returns:
- the value in the range of -1 to 1
-
setGlobeBackgroundColor
Set the GlobeBackgroundColor property.- Parameters:
value- The new value for GlobeBackgroundColor
-
getGlobeBackgroundColor
Get the GlobeBackgroundColor property.- Returns:
- The GlobeBackgroundColor
-
getGlobeBackgroundColorToUse
Get the GlobeBackgroundColor property to be used. If it has not been set then get the preference- Returns:
- The GlobeBackgroundColor to use
-
setGlobeBackgroundShow
public void setGlobeBackgroundShow(boolean value) Set the GlobeBackgroundShow property.- Parameters:
value- The new value for GlobeBackgroundShow
-
getGlobeBackgroundShow
public boolean getGlobeBackgroundShow()Get the GlobeBackgroundShow property.- Returns:
- The GlobeBackgroundShow
-
setGlobeBackgroundLevel
public void setGlobeBackgroundLevel(double value) Set the GlobeBackgroundLevel property.- Parameters:
value- The new value for GlobeBackgroundLevel
-
getGlobeBackgroundLevel
public double getGlobeBackgroundLevel()Get the GlobeBackgroundLevel property.- Returns:
- The GlobeBackgroundLevel
-
setFlythrough
Set the Flythrough property.- Parameters:
value- The new value for Flythrough
-
getFlythrough
Get the Flythrough property.- Returns:
- The Flythrough
-
setShowMaps
public void setShowMaps(boolean value) Set the ShowMaps property.- Parameters:
value- The new value for ShowMaps
-
getShowMaps
public boolean getShowMaps()Get the ShowMaps property.- Returns:
- The ShowMaps
-
setDisplayProjectionZoom
public void setDisplayProjectionZoom(double value) Set the DisplayProjectionZoom property.- Parameters:
value- The new value for DisplayProjectionZoom
-
getDisplayProjectionZoom
public double getDisplayProjectionZoom()Get the DisplayProjectionZoom property.- Returns:
- The DisplayProjectionZoom
-
setInitMapPaths
Set the InitMapPaths property.- Parameters:
value- The new value for InitMapPaths
-
getInitMapPaths
Get the InitMapPaths property.- Returns:
- The InitMapPaths
-
setInitLatLonVisible
public void setInitLatLonVisible(boolean v) Set the intial lat/lon visible- Parameters:
v- true or false
-
setInitLatLonColor
Set the intial lat/lon color- Parameters:
v- the color
-
setInitLatLonWidth
public void setInitLatLonWidth(int v) Set the initial lat/lon line width- Parameters:
v- the width
-
setInitLatLonSpacing
public void setInitLatLonSpacing(float v) Set the initial lat/lon spacing- Parameters:
v- the spacing
-
setInitMapWidth
public void setInitMapWidth(float value) Set the InitMapWidth property.- Parameters:
value- The new value for InitMapWidth
-
getInitMapWidth
public float getInitMapWidth()Get the InitMapWidth property.- Returns:
- The InitMapWidth
-
setInitMapColor
Set the InitMapColor property.- Parameters:
value- The new value for InitMapColor
-
getInitMapColor
Get the InitMapColor property.- Returns:
- The InitMapColor
-
setInitLatLonBounds
Set the InitLatLonBounds property.- Parameters:
value- The new value for InitLatLonBounds
-
getInitLatLonBounds
Get the InitLatLonBounds property.- Returns:
- The InitLatLonBounds
-
getLatAxisScaleInfo
Gets the lat axis scale info.- Returns:
- the lat axis scale info
-
setLatAxisScaleInfo
public void setLatAxisScaleInfo(LatLonAxisScaleInfo axisScaleInfo) throws RemoteException, VisADException Sets the lat axis scale info.- Parameters:
axisScaleInfo- the new lat axis scale info- Throws:
RemoteException- the remote exceptionVisADException- the VisAD exception
-
getLonAxisScaleInfo
Gets the lon axis scale info.- Returns:
- the lon axis scale info
-
setLonAxisScaleInfo
public void setLonAxisScaleInfo(LatLonAxisScaleInfo axisScaleInfo) throws RemoteException, VisADException Sets the lon axis scale info.- Parameters:
axisScaleInfo- the new lon axis scale info- Throws:
RemoteException- the remote exceptionVisADException- the vis ad exception
-