public class VMManager extends IdvManager
ViewManager
s. It handles
initializing them after unpersistence, managing the set of view manager
states (this is where you can save off the state of a view manager
and then reapply it. So you can save projection, map, etc., name it
and use it later.)contents, dialog, frame, window
ARG_B64BUNDLE, ARG_B64ISL, ARG_BUNDLE, ARG_CATALOG, ARG_CHOOSER, ARG_CLEARDEFAULT, ARG_CODE, ARG_CONNECT, ARG_CURRENTTIME, ARG_DATA, ARG_DEBUG, ARG_DEFAULT, ARG_DISPLAY, ARG_DXML, ARG_FIXEDTIME, ARG_HELP, ARG_IMAGE, ARG_IMAGESERVER, ARG_INSTALLPLUGIN, ARG_ISLFILE, ARG_ISLINTERACTIVE, ARG_LISTRESOURCES, ARG_MAINCLASS, ARG_MOVIE, ARG_MSG_DEBUG, ARG_MSG_RECORD, ARG_NODEFAULT, ARG_NOERRORSINGUI, ARG_NOGUI, ARG_NOONEINSTANCE, ARG_NOPLUGINS, ARG_NOPREF, ARG_ONEINSTANCEPORT, ARG_PLUGIN, ARG_PORT, ARG_PRINTJNLP, ARG_PROPERTIES, ARG_SCRIPT, ARG_SERVER, ARG_SETFILES, ARG_SITEPATH, ARG_TEMPLATE, ARG_TEST, ARG_TESTEVAL, ARG_TRACE, ARG_TRACEONLY, ARG_USERPATH, DEFAULT_DATE_FORMAT, DEFAULT_DOCPATH, DEFAULT_TIMEZONE, FILTER_CPT, FILTER_ISL, FILTER_JNLP, FILTER_XIDV, FILTER_XIDVZIDV, FILTER_XML, FILTER_ZIDV, ID_COMMANDSTORUN, ID_DATASOURCES, ID_DISPLAYCONTROLS, ID_IDV, ID_JYTHON, ID_MESSAGE, ID_MISCHASHTABLE, ID_NCIDV_VERSION, ID_VERSION, ID_VIEWMANAGERS, ID_WINDOWS, INITIAL_PROBE_EARTHLOCATION, NULL_DATA_SELECTION, NULL_STRING, PREF_APPEARANCEMODE, PREF_ARCHIVEDIR, PREF_ARCHIVENAME, PREF_AUTODISPLAYS_ENABLE, PREF_AUTODISPLAYS_SHOWGUI, PREF_AUTOSELECTDATA, PREF_CACHESIZE, PREF_CONTROLSINTABS, PREF_DATAPREFIX, PREF_DATE_FORMAT, PREF_DISTANCEUNIT, PREF_DOCACHE, PREF_EMBEDDATACHOOSERINDASHBOARD, PREF_EMBEDFIELDSELECTORINDASHBOARD, PREF_EMBEDLEGENDINDASHBOARD, PREF_EMBEDQUICKLINKSINDASHBOARD, PREF_EVENT_KEYBOARDMAP, PREF_EVENT_MOUSEMAP, PREF_EVENT_WHEELMAP, PREF_FAST_RENDER, PREF_FIELD_CACHETHRESHOLD, PREF_FILEREADDIR, PREF_FILEWRITEDIR, PREF_GEOMETRY_BY_REF, PREF_HISTORY, PREF_IMAGE_BY_REF, PREF_LARGE_REMOTE_DATA_WARN, PREF_LASTVERSION, PREF_LATLON_FORMAT, PREF_LEGEND_SHOWICONS, PREF_LOCALE, PREF_LOOKANDFEEL, PREF_MAXIMAGESIZE, PREF_MEMORY, PREF_NPOT_IMAGE, PREF_OPEN_ASK, PREF_OPEN_MERGE, PREF_OPEN_REMOVE, PREF_PROJ_LIST, PREF_SAMPLINGMODE, PREF_SHOWCONTROLWINDOW, PREF_SHOWDASHBOARD, PREF_SHOWDECODEDIALOG, PREF_SHOWHIDDENFILES, PREF_SHOWQUITCONFIRM, PREF_SITEPATH, PREF_THREADS_DATA, PREF_THREADS_RENDER, PREF_TIMEZONE, PREF_VERTICALCS, PREF_VERTICALUNIT, PREF_WINDOW_SHOWTOOLBAR, PREF_ZIDV_ASK, PREF_ZIDV_DIRECTORY, PREF_ZIDV_SAVETOTMP, PROP_3DMODE, PROP_ABOUTTEXT, PROP_APPRESOURCEPATH, PROP_CHOOSERS, PROP_CHOOSERS_ALL, PROP_CONTROLDESCRIPTORS, PROP_CONTROLDESCRIPTORS_ALL, PROP_DATAHOLDERBOUNDS, PROP_DEFAULTLOCATIONS, PROP_DISPLAYLIST_GROUP, PROP_FIXFILELOCKUP, PROP_JNLPCODEBASE, PROP_JNLPTEMPLATE, PROP_JNLPTITLE, PROP_LOADINGXML, PROP_MAP_GLOBE_LEVEL, PROP_MAP_MAP_LEVEL, PROP_MINIMUMFRAMECYCLETIME, PROP_MONITORPORT, PROP_OLDCONTROLDESCRIPTORS, PROP_ONEINSTANCEPORT, PROP_PREFERENCES, PROP_PROJ_NAME, PROP_RESOURCEFILES, PROP_SHOWCLOCK_DASH, PROP_SHOWCLOCK_VIEW, PROP_SHOWDASHBOARD, PROP_SHOWDATATREE, PROP_SHOWFORMULAS, PROP_SHOWSPLASH, PROP_SPLASHICON, PROP_UI_DESKTOP, PROP_USE_DISPLAYAREA, PROP_USE_TIMEDRIVER, PROP_VERSIONFILE, PROP_WINDOW_SCREENSIZEOFFSET, PROP_WINDOW_SIZEHEIGHT, PROP_WINDOW_SIZEWIDTH, PROP_WINDOW_USESCREENSIZE, SUFFIX_BAT, SUFFIX_CPT, SUFFIX_ISL, SUFFIX_JNLP, SUFFIX_RBI, SUFFIX_SH, SUFFIX_XIDV, SUFFIX_XML, SUFFIX_ZIDV
Constructor and Description |
---|
VMManager(IntegratedDataViewer idv)
Construct this manager with the given idv.
|
Modifier and Type | Method and Description |
---|---|
void |
addViewManager(ViewManager newViewManager)
Add the new view manager into the list if we don't have
one with the
ViewDescriptor of the new view manager
already. |
void |
addViewManagers(java.util.List newVms)
Add the view managers in the list
|
void |
applyPreferences()
Apply the user preferences to all ViewManagers
|
void |
captureAll()
Capture an image for all ViewManagers
|
void |
center()
Set the projection on all MapViewManagers to be the projection of the first
display.
|
void |
center(visad.georef.EarthLocation el)
Center all of the MapViewManager-s at the given point
|
void |
center(visad.georef.EarthLocation el,
java.util.List viewManagers)
Center the view managers in the list to the given point
|
void |
center(java.util.List viewManagers)
Set the projection on all MapViewManagers to be the projection of the first
display.
|
void |
center(visad.georef.MapProjection mp)
Center all of the MapViewManager-s at the given point
|
void |
center(visad.georef.MapProjection mp,
java.util.List viewManagers)
Center all of the MapViewManager-s at the given point
|
void |
center(ucar.unidata.geoloc.ProjectionRect pr)
Zoom and center all of the MapViewManager-s at the given rect
|
void |
center(ucar.unidata.geoloc.ProjectionRect pr,
java.util.List viewManagers)
Zoom and center all of the MapViewManager-s at the given rect
|
ViewManager |
createViewManager(ViewDescriptor viewDescriptor,
java.lang.String properties)
Create the given ViewManager
|
ViewManager |
findOrCreateViewManager(ViewDescriptor viewDescriptor,
java.lang.String properties)
As the name implies find the view manager identified by the given
viewDescriptor or create a new one.
|
java.util.List |
findTransectDrawingControls()
Find a TDC
|
ViewManager |
findViewManager(ViewDescriptor viewDescriptor)
Find the view manager identified by the given view descriptor
|
static ViewManager |
findViewManagerInList(ViewDescriptor viewDescriptor,
java.util.List vms)
Find the view manager in the given list that is defined by the given view descriptor.
|
ViewManager |
getLastActiveViewManager()
Get the
ViewManager whose window was last active. |
java.util.List<ViewManager> |
getViewManagers()
Get the list of active
ViewManager s |
java.util.List |
getViewManagers(java.lang.Class c)
Get all of the view managers of the given class
|
java.util.List |
getVMState()
Instantiates (if needed) and returns the list of
TwoFacedObject s that is the set of saved viewpoints |
boolean |
haveMoreThanOneMainViewManager()
Is there currently more than one possibly active viewmanager
|
void |
removeAllViewManagers()
Remove all view managers
|
void |
removeAllViewManagers(boolean andDestroyThem)
Remove all view managers
|
void |
removeViewManager(ViewManager viewManager)
Remove the given view manager from the list.
|
protected void |
saveViewManagerState(ViewManager vm)
Popup a dialog asking the user for the name of the saved ViewManager.
|
void |
setDisplayMastersActive()
Iterate through all of the ViewManager-s and tell each on to setMasterActive
|
void |
setDisplayMastersInactive()
Iterate through all of the ViewManager-s and tell each on to setMasterInactive
|
void |
setLastActiveViewManager(ViewManager viewManager)
Set the
ViewManager whose window was last active. |
void |
setTransect(Transect transect)
Set the Transect used for all TransectViewManagers
|
void |
showProjectionManager()
Find the first
ViewManager in the list and
have it show its @[link ucar.unidata.view.geoloc.ProjectionManager}. |
void |
transectViewsChanged()
Be notified that a transect view manager has changed.
|
void |
unpersistViewManagers(java.util.List newViewManagers)
Do the initialization of the unpersisted
ViewManager . |
void |
updateAllLegends()
_more_
|
void |
writeVMState()
Write the viewpoints list
|
getArgsManager, getCollabManager, getColorTableManager, getDataManager, getIdv, getIdvChooserManager, getIdvClass, getIdvProjectionManager, getIdvUIManager, getImageGenerator, getInstallManager, getJythonManager, getPersistenceManager, getPreferenceManager, getProperty, getProperty, getProperty, getPublishManager, getResourceManager, getStateManager, getStationModelManager, getStore, getVMManager, logException, showNormalCursor, showWaitCursor, waitUntilDisplaysAreDone, waitUntilDisplaysAreDone
actionPerformed, close, doMakeContents, getContents, getDialog, getFrame, getWindow, getWindowTitle, isShowing, removeAll, setMenuBar, setWindowTitle, shouldMakeDialog, show, show, showModal, toFront, windowIsClosing
public VMManager(IntegratedDataViewer idv)
idv
- The IDVpublic java.util.List<ViewManager> getViewManagers()
ViewManager
spublic java.util.List getViewManagers(java.lang.Class c)
c
- ViewManager classpublic void captureAll()
public void applyPreferences()
public void setLastActiveViewManager(ViewManager viewManager)
ViewManager
whose window was last active.viewManager
- The last active view managerpublic boolean haveMoreThanOneMainViewManager()
public ViewManager getLastActiveViewManager()
ViewManager
whose window was last active.public ViewManager findViewManager(ViewDescriptor viewDescriptor)
viewDescriptor
- The id of the VMpublic static ViewManager findViewManagerInList(ViewDescriptor viewDescriptor, java.util.List vms)
viewDescriptor
- The view descriptorvms
- List of ViewManagerspublic void transectViewsChanged()
public java.util.List findTransectDrawingControls()
public void updateAllLegends()
public void writeVMState()
public java.util.List getVMState()
TwoFacedObject
s that is the set of saved viewpointsprotected void saveViewManagerState(ViewManager vm)
vm
- The view manager to savepublic void addViewManager(ViewManager newViewManager)
ViewDescriptor
of the new view manager
already.newViewManager
- The new view managerpublic void addViewManagers(java.util.List newVms)
newVms
- New view managerspublic void removeAllViewManagers()
public void removeAllViewManagers(boolean andDestroyThem)
andDestroyThem
- If true then also call destroypublic void removeViewManager(ViewManager viewManager)
viewManager
- The view manager to be removed.public void showProjectionManager()
ViewManager
in the list and
have it show its @[link ucar.unidata.view.geoloc.ProjectionManager}.public void unpersistViewManagers(java.util.List newViewManagers)
ViewManager
.newViewManagers
- List of view managers to unpersistpublic void setDisplayMastersActive()
public void setDisplayMastersInactive()
public ViewManager findOrCreateViewManager(ViewDescriptor viewDescriptor, java.lang.String properties)
viewDescriptor
- The id to look forproperties
- Properties to pass if we create one.public ViewManager createViewManager(ViewDescriptor viewDescriptor, java.lang.String properties)
viewDescriptor
- Identifies the VMproperties
- Property string to passpublic void center(visad.georef.EarthLocation el) throws visad.VisADException, java.rmi.RemoteException
el
- The pointjava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic void center(visad.georef.EarthLocation el, java.util.List viewManagers) throws visad.VisADException, java.rmi.RemoteException
el
- Point to center toviewManagers
- ViewManagers to centerjava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic void center(visad.georef.MapProjection mp) throws visad.VisADException, java.rmi.RemoteException
mp
- Set all view managers projection to thejava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic void center(visad.georef.MapProjection mp, java.util.List viewManagers) throws visad.VisADException, java.rmi.RemoteException
mp
- new projectionviewManagers
- ViewManagers to centerjava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic void center(ucar.unidata.geoloc.ProjectionRect pr) throws visad.VisADException, java.rmi.RemoteException
pr
- The projection rect to zoom and center tojava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic void center(ucar.unidata.geoloc.ProjectionRect pr, java.util.List viewManagers) throws visad.VisADException, java.rmi.RemoteException
pr
- The projection rect to zoom and center toviewManagers
- ViewManagers to centerjava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic void center() throws visad.VisADException, java.rmi.RemoteException
java.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic void center(java.util.List viewManagers) throws visad.VisADException, java.rmi.RemoteException
viewManagers
- ViewManagers to centerjava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic void setTransect(Transect transect)
transect
- The transect