public class ProjectionManager
extends java.lang.Object
implements java.awt.event.ActionListener
1) It uses bean introspection on ProjectionImpl subclasses to dynamically configure edit fields for the projection's parameters. The subclass should define getXXX() and setXXX() methods for each parameter. 3) when the user selects a projection, a NewProjectionEvent is sent to any listeners 4) currently the list of possible projection classes is maintained as a hard-wired list of class names. This should be rethunk.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_CHANGE
property change identifier
|
Constructor and Description |
---|
ProjectionManager()
Default constructor
|
ProjectionManager(javax.swing.RootPaneContainer parent)
Create a new ProjectionManager
|
ProjectionManager(javax.swing.RootPaneContainer parent,
boolean makeDialog)
Create a new ProjectionManager.
|
ProjectionManager(javax.swing.RootPaneContainer parent,
java.util.List projections)
Create a new ProjectionManager.
|
ProjectionManager(javax.swing.RootPaneContainer parent,
java.util.List projections,
boolean makeDialog)
Create a new ProjectionManager.
|
ProjectionManager(javax.swing.RootPaneContainer parent,
java.util.List projections,
boolean makeDialog,
java.lang.String helpId)
Create a new ProjectionManager.
|
ProjectionManager(javax.swing.RootPaneContainer parent,
java.util.List projections,
boolean makeDialog,
java.lang.String helpId,
java.util.List maps)
Create a new ProjectionManager.
|
ProjectionManager(javax.swing.RootPaneContainer parent,
java.lang.Object dummy)
Create a new ProjectionManager.
|
Modifier and Type | Method and Description |
---|---|
void |
accept()
Accept a change.
|
void |
actionPerformed(java.awt.event.ActionEvent event)
Handle action events
|
static void |
addDefaultProjection(java.lang.String projectionClass)
Add the given class to the list of default projections
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a property change listener.
|
void |
close()
Close this widget
|
boolean |
contains(java.lang.String id)
See if the manager contains the projection by name.
|
void |
destroy()
Destroy this object
|
void |
doDelete()
Delete the selected projection.
|
void |
doEdit()
_more_
|
void |
doExport()
Export a list of user selected projections
|
void |
doNew()
_more_
|
void |
edit(boolean isNew)
Edit a projection.
|
java.awt.Component |
getContents()
Get the contents as a component.
|
static java.util.List |
getDefaultProjections()
Create the list of default projection classes
|
javax.swing.JDialog |
getDialog()
Get this as a dialog.
|
java.lang.String |
getManagerName()
Get the name of this manager to put in a menu
|
java.lang.Class |
getPersistentObjectClass()
Get the Class type of the objects managed; must implement
Serializable, Cloneable
|
java.util.List |
getProjections()
Get the list of projections that this manager manages
|
PersistentObject |
getSelection()
Get the currently selected object, of type getPersistentObjectClass()
|
static void |
main(java.lang.String[] args)
Test the class
|
static java.util.List |
makeDefaultProjections()
Make the default projections from the internal list of classes.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove a property change listener.
|
void |
saveProjection(ucar.unidata.geoloc.ProjectionImpl proj)
Store this Projection in the data table
|
void |
setMaps(java.util.List maps)
Set the list of maps to use in this ProjectionManager
|
void |
setProjections(java.util.List list)
Set the list of projections for this manager
|
void |
setSelection(PersistentObject select)
Set the currently selected thing: must be of type
getPersistentObjectClass().
|
void |
show()
Popup the Manager Dialog
|
void |
storePersistentData()
Dummy method for stores
|
public static final java.lang.String PROPERTY_CHANGE
public ProjectionManager()
public ProjectionManager(javax.swing.RootPaneContainer parent, java.lang.Object dummy)
parent
- parent containerdummy
- dummy argument for clients that try to pass in
a storepublic ProjectionManager(javax.swing.RootPaneContainer parent)
parent
- parent containerpublic ProjectionManager(javax.swing.RootPaneContainer parent, boolean makeDialog)
parent
- parent containermakeDialog
- true to make this a dialogpublic ProjectionManager(javax.swing.RootPaneContainer parent, java.util.List projections)
parent
- JFrame (application) or JApplet (applet)projections
- list of initial projectionspublic ProjectionManager(javax.swing.RootPaneContainer parent, java.util.List projections, boolean makeDialog)
parent
- JFrame (application) or JApplet (applet)projections
- list of initial projectionsmakeDialog
- true to make this a dialogpublic ProjectionManager(javax.swing.RootPaneContainer parent, java.util.List projections, boolean makeDialog, java.lang.String helpId)
parent
- JFrame (application) or JApplet (applet)projections
- list of initial projectionsmakeDialog
- true to make this a dialoghelpId
- help id if dialogpublic ProjectionManager(javax.swing.RootPaneContainer parent, java.util.List projections, boolean makeDialog, java.lang.String helpId, java.util.List maps)
parent
- JFrame (application) or JApplet (applet)projections
- list of initial projectionsmakeDialog
- true to make this a dialoghelpId
- help id if dialogmaps
- List of MapDatapublic static void addDefaultProjection(java.lang.String projectionClass)
projectionClass
- The classpublic static java.util.List getDefaultProjections()
public void storePersistentData()
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
event
- event to handlepublic void close()
public void doExport()
public static java.util.List makeDefaultProjections()
public void setMaps(java.util.List maps)
maps
- list of MapData's (may be null)public void setProjections(java.util.List list)
list
- list of projectionspublic java.util.List getProjections()
public java.lang.String getManagerName()
public java.lang.Class getPersistentObjectClass()
public java.awt.Component getContents()
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l
- listener to addpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l
- listener to removepublic javax.swing.JDialog getDialog()
public void show()
public void destroy()
public PersistentObject getSelection()
public void setSelection(PersistentObject select)
select
- the object to select.public void accept()
public boolean contains(java.lang.String id)
id
- name of projectionpublic void doDelete()
public void doEdit()
public void doNew()
public void edit(boolean isNew)
isNew
- true if this is a new projection.public void saveProjection(ucar.unidata.geoloc.ProjectionImpl proj)
proj
- the Projection to storepublic static void main(java.lang.String[] args)
args
- not used