|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.collab.SharableImpl
ucar.unidata.idv.ViewManager
ucar.unidata.idv.NavigatedViewManager
ucar.unidata.idv.MapViewManager
public class MapViewManager
A wrapper around a MapProjectDisplay display master. Provides an interface for managing user interactions, gui creation, etc.
| Nested Class Summary | |
|---|---|
static class |
MapViewManager.ProjectionCommand
Class ProjectionCommand manages changes to the projection |
| Nested classes/interfaces inherited from class ucar.unidata.idv.ViewManager |
|---|
ViewManager.MatrixCommand |
| Field Summary | |
|---|---|
static String |
PREF_ADDRESS_LIST
_more_ |
static String |
PREF_ADDRESS_REPROJECT
_more_ |
static String |
PREF_AUTOROTATE
Preference for autorotate in globe mode |
static String |
PREF_PERSPECTIVEVIEW
Preference for showing display in perspective view_ |
static String |
PREF_PROJ_DFLT
Preference for default projection |
static String |
PREF_PROJ_USEFROMDATA
Preference for setting projection automatically from data_ |
static String |
PREF_SHOWEARTHNAVPANEL
Preference for showing the earth nav panel |
static String |
PREF_SHOWPIP
Preference for showing the pip |
static String |
SHARE_PROJECTION
Defines the projection when sharing state |
| Constructor Summary | |
|---|---|
MapViewManager()
Default constructor |
|
MapViewManager(ViewContext viewContext)
Construct a MapViewManager from an IDV |
|
MapViewManager(ViewContext viewContext,
ViewDescriptor desc,
String properties)
Construct a MapViewManager with the specified params |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent event)
Required interface for ActionEvents, to implement ActionListener for the UI objects such as JButton-s and MenuItem-s |
boolean |
addDisplayInfo(DisplayInfo displayInfo)
Reset projection of display based control's getDataProjection(). |
boolean |
canBe(ViewManager that)
Can this view manager be used in exchange for the given view manager |
void |
checkPipPanel()
Check the pip panel. |
void |
checkProjection(FieldImpl data,
DisplayControl display)
Deprecated. no substitute. Use setMapProjection() |
void |
displayChanged(DisplayEvent de)
Handle the event |
protected Container |
doMakeContents()
Make the GUI contents. |
protected DisplayMaster |
doMakeDisplayMaster()
Make the DisplayMaster for this ViewManager |
ArrayList |
doMakeMenuList()
Create and return the list of menus for the menu bar. |
protected void |
doneFirstFrame()
Received the first frame done event from the display |
boolean |
getAutoRotate()
Get the autorotate flag |
ucar.unidata.geoloc.ProjectionImpl |
getDefaultProjection()
Get the default projection to use |
protected void |
getInitialBooleanProperties(List props)
Create the set of BooleanPropertys. |
JComponent |
getInnerContents()
Get the JComponent for the VisAD display |
MapProjection |
getMainProjection()
Get the current projection.Used for xml encoding/decoding. |
String |
getMainProjectionName()
The main projection name.Used for xml encoding/decoding. |
NavigatedDisplay |
getMapDisplay()
Get the map display. |
boolean |
getPerspectiveView()
Get the perspective view flag |
EarthLocation |
getScreenCenter()
Get the earth location of the screen center |
List<TwoFacedObject> |
getScreenCoordinates()
Get a list of named locations of the different points of the view rectangle. |
boolean |
getShowEarthNavPanel()
Get the ShowEarthNavPanel property. |
protected JComponent |
getSideComponent(JComponent sideLegend)
Add the PIP panel if needed |
String |
getTypeName()
What type of view is this |
boolean |
getUse3D()
Get the use 3D display flag. |
boolean |
getUseGlobeDisplay()
Get the globe display flag. |
boolean |
getUseProjectionFromData()
Get the use projection from data flag |
GeoLocationInfo |
getVisibleGeoBounds()
Get the bounds that are visible |
void |
goToAddress()
Go the a street address |
protected void |
handleBooleanPropertyChange(String id,
boolean value)
The BooleanProperty identified byt he given id has changed. |
protected void |
init()
Initialize this object. |
void |
initializeDisplaysProjectionMenu(JMenu displaysMenu)
Init menu |
void |
initializeProjectionHistoryMenu(JMenu menu)
Init menu |
void |
initializeProjectionMenu(JMenu projectionsMenu)
Init menu |
void |
initializeViewMenu(JMenu viewMenu)
Dynamically initialize the view menu |
void |
initPreferences(IdvPreferenceManager preferenceManager)
Add in the different preference panels. |
protected void |
initToolBars()
Initialize the toolbars for the GUI |
protected void |
initWithInner(ViewManager that,
boolean ignoreWindow)
Initialize this object's state with the state from that. |
boolean |
isDisplay3D()
Are we in 3d mode |
static void |
makeProjectionsMenu(JMenu projectionsMenu,
List projections,
Object object,
String method)
Make the projections menu. |
static void |
makeProjectionsMenu(JMenu projectionsMenu,
List projections,
Object object,
String method,
ucar.unidata.geoloc.ProjectionImpl currentProjection)
Make the projections menu |
protected JMenu |
makeShowMenu()
Create and return the show menu. |
boolean |
okToImportDisplay(DisplayControl control)
_more_ |
protected void |
perspectiveViewChanged(boolean v)
Handle a perspective view change |
void |
receiveShareData(Sharable from,
Object dataId,
Object[] data)
Handle the receipt of shared data |
void |
setAutoRotate(boolean value)
Set the autorotate property |
void |
setBgColor(boolean bgColor)
Deprecated. Keep this around for old bundles |
void |
setCurrentAsProjection()
Set the current viewpoint as the projection |
void |
setInitialMapResources(String value)
Set the InitialMapResources property. |
void |
setMainProjection(MapProjection projection)
Set the current projection. |
void |
setMainProjectionName(String projectionName)
The main projection name.Used for xml encoding/decoding. |
void |
setMapArea(ucar.unidata.geoloc.ProjectionRect mapArea)
Set or reset map area of view, using NavigatedDisplay method. |
void |
setMapConfigFile(String location)
Have this so we don't get warnings on unpersisting old bundles |
void |
setMapProjection(MapProjection projection,
boolean fromWidget)
A wrapper aroung the setMapProjection call that takes a projection name. |
void |
setMapProjection(MapProjection projection,
boolean fromWidget,
String name)
Set map projection in the main display. |
void |
setMapProjection(MapProjection projection,
boolean fromWidget,
String name,
boolean checkDefault)
Set map projection in the main display. |
void |
setMapProjection(MapProjection projection,
boolean fromWidget,
String name,
boolean checkDefault,
boolean addToCommandHistory)
Set map projection in the main display. |
void |
setMapProjection(MapProjection projection,
boolean fromWidget,
String name,
boolean checkDefault,
boolean addToCommandHistory,
boolean maintainViewpoint)
Set map projection in the main display. |
void |
setMapState(String ms)
Leave this here for old bundles |
void |
setPerspectiveView(boolean value)
Set the perspective view flag |
void |
setProjection(ucar.unidata.geoloc.ProjectionImpl p)
Set the current projection |
void |
setProjectionByName(String projName)
Find and set the projection by name |
void |
setProjectionFromFirstDisplay()
Set the projection to the first projection found in the displays |
void |
setShowEarthNavPanel(boolean value)
Set the ShowEarthNavPanel property. |
void |
setShowElevation(boolean value)
Dummy for old bundles |
void |
setShowMap(boolean value)
Dummy for old bundles |
void |
setUse3D(boolean use)
Use a 3D display. |
void |
setUseGlobeDisplay(boolean use)
Use globe display. |
void |
setUseProjectionFromData(boolean value)
Set the use projection from data flag |
void |
showProjectionManager()
Show the projection manager. |
protected void |
updateProjection()
If we are using a ProjectionImpl then see if it hsa |
protected void |
verticalScaleChanged()
Handle a vertical scale change |
| Methods inherited from class ucar.unidata.collab.SharableImpl |
|---|
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getSharablePropertiesComponent, getShareGroup, getSharing, initSharable, removeSharable, setShareGroup, setSharing, setUniqueId, showSharableDialog |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PREF_ADDRESS_LIST
public static final String PREF_ADDRESS_REPROJECT
public static final String PREF_AUTOROTATE
public static final String PREF_PERSPECTIVEVIEW
public static final String PREF_PROJ_DFLT
public static final String PREF_PROJ_USEFROMDATA
public static final String PREF_SHOWPIP
public static final String PREF_SHOWEARTHNAVPANEL
public static final String SHARE_PROJECTION
| Constructor Detail |
|---|
public MapViewManager()
public MapViewManager(ViewContext viewContext)
MapViewManager from an IDV
viewContext - Really the IDV
public MapViewManager(ViewContext viewContext,
ViewDescriptor desc,
String properties)
throws VisADException,
RemoteException
MapViewManager with the specified params
viewContext - context in which this MVM existsdesc - ViewDescriptorproperties - semicolon separated list of properties (can be null)
RemoteException - Java RMI problem
VisADException - Couldn't create the VisAD object| Method Detail |
|---|
public ucar.unidata.geoloc.ProjectionImpl getDefaultProjection()
protected DisplayMaster doMakeDisplayMaster()
throws VisADException,
RemoteException
doMakeDisplayMaster in class ViewManagerRemoteException - Java RMI problem
VisADException - Couldn't create the VisAD object
public EarthLocation getScreenCenter()
throws VisADException,
RemoteException
RemoteException - On badness
VisADException - On badness
public List<TwoFacedObject> getScreenCoordinates()
throws VisADException,
RemoteException
RemoteException - On badness
VisADException - On badness
protected void init()
throws VisADException,
RemoteException
init in class NavigatedViewManagerRemoteException
VisADExceptionprotected void perspectiveViewChanged(boolean v)
perspectiveViewChanged in class NavigatedViewManagerv - the valueprotected void verticalScaleChanged()
verticalScaleChanged in class NavigatedViewManager
public void displayChanged(DisplayEvent de)
throws VisADException,
RemoteException
displayChanged in interface DisplayListenerdisplayChanged in class NavigatedViewManagerde - The event
RemoteException - On badness
VisADException - On badnesspublic boolean canBe(ViewManager that)
canBe in class ViewManagerthat - The other view manager to check
protected void initWithInner(ViewManager that,
boolean ignoreWindow)
throws VisADException,
RemoteException
initWithInner in class NavigatedViewManagerthat - The other obejct to get state fromignoreWindow - If true then don't set the window size and location
RemoteException - Java RMI problem
VisADException - Couldn't create the VisAD objectpublic JComponent getInnerContents()
JComponent for the VisAD display
getInnerContents in class ViewManagerpublic void setMapState(String ms)
ms - The map specificationpublic void initPreferences(IdvPreferenceManager preferenceManager)
initPreferences in class ViewManagerpreferenceManager - The preference manager to add things intopublic void goToAddress()
public NavigatedDisplay getMapDisplay()
public boolean isDisplay3D()
public void receiveShareData(Sharable from,
Object dataId,
Object[] data)
receiveShareData in interface SharablereceiveShareData in class NavigatedViewManagerfrom - Who is it fromdataId - What is itdata - Here it isprotected JComponent getSideComponent(JComponent sideLegend)
getSideComponent in class ViewManagersideLegend - The side legend
protected Container doMakeContents()
doMakeContents in class ViewManagerprotected void initToolBars()
initToolBars in class NavigatedViewManagerpublic void initializeViewMenu(JMenu viewMenu)
initializeViewMenu in class ViewManagerviewMenu - the view menupublic ArrayList doMakeMenuList()
doMakeMenuList in class ViewManagerprotected JMenu makeShowMenu()
makeShowMenu in class NavigatedViewManagerpublic void setProjectionFromFirstDisplay()
protected void updateProjection()
throws RemoteException,
VisADException
RemoteException - On badness
VisADException - On badnesspublic void setProjectionByName(String projName)
projName - projection namepublic void setProjection(ucar.unidata.geoloc.ProjectionImpl p)
p - The new projection.
public void setMapProjection(MapProjection projection,
boolean fromWidget)
projection - The projectionfromWidget - Is it from the projection selection widgetpublic MapProjection getMainProjection()
public void setMainProjection(MapProjection projection)
projection - The new projectionpublic String getMainProjectionName()
public void setMainProjectionName(String projectionName)
projectionName - Projection name
public void setMapProjection(MapProjection projection,
boolean fromWidget,
String name)
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)
public void setMapProjection(MapProjection projection,
boolean fromWidget,
String name,
boolean checkDefault)
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()
public void setMapProjection(MapProjection projection,
boolean fromWidget,
String name,
boolean checkDefault,
boolean addToCommandHistory)
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
public void setMapProjection(MapProjection projection,
boolean fromWidget,
String name,
boolean checkDefault,
boolean addToCommandHistory,
boolean maintainViewpoint)
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 viewpointpublic void checkPipPanel()
public boolean okToImportDisplay(DisplayControl control)
okToImportDisplay in class ViewManagercontrol - _more_
protected void doneFirstFrame()
doneFirstFrame in class ViewManager
public boolean addDisplayInfo(DisplayInfo displayInfo)
throws RemoteException,
VisADException
addDisplayInfo in class ViewManagerdisplayInfo - The new display info to add
RemoteException
VisADException
public void checkProjection(FieldImpl data,
DisplayControl display)
data - The data form the displaydisplay - The displaypublic void actionPerformed(ActionEvent event)
actionPerformed in interface ActionListeneractionPerformed in class NavigatedViewManagerevent - an ActionEventpublic GeoLocationInfo getVisibleGeoBounds()
getVisibleGeoBounds in class ViewManagerpublic void setCurrentAsProjection()
public void showProjectionManager()
public void setMapArea(ucar.unidata.geoloc.ProjectionRect mapArea)
mapArea - ProjectionRect the map area of viewpublic void initializeProjectionMenu(JMenu projectionsMenu)
projectionsMenu - menupublic void initializeDisplaysProjectionMenu(