|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.view.geoloc.ProjectionManager
public class ProjectionManager
Manages a modal dialogue box that allows the user to define projections using subclasses of ucar.unidata.gis.ProjectionImpl.
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.
| Field Summary | |
|---|---|
static String |
PROPERTY_CHANGE
property change identifier |
| Constructor Summary | |
|---|---|
ProjectionManager()
Default constructor |
|
ProjectionManager(RootPaneContainer parent)
Create a new ProjectionManager |
|
ProjectionManager(RootPaneContainer parent,
boolean makeDialog)
Create a new ProjectionManager. |
|
ProjectionManager(RootPaneContainer parent,
List projections)
Create a new ProjectionManager. |
|
ProjectionManager(RootPaneContainer parent,
List projections,
boolean makeDialog)
Create a new ProjectionManager. |
|
ProjectionManager(RootPaneContainer parent,
List projections,
boolean makeDialog,
String helpId)
Create a new ProjectionManager. |
|
ProjectionManager(RootPaneContainer parent,
List projections,
boolean makeDialog,
String helpId,
List maps)
Create a new ProjectionManager. |
|
ProjectionManager(RootPaneContainer parent,
Object dummy)
Create a new ProjectionManager. |
|
| Method Summary | |
|---|---|
void |
accept()
Accept a change. |
void |
actionPerformed(ActionEvent event)
Handle action events |
static void |
addDefaultProjection(String projectionClass)
Add the given class to the list of default projections |
void |
addPropertyChangeListener(PropertyChangeListener l)
Add a property change listener. |
void |
close()
Close this widget |
boolean |
contains(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. |
Component |
getContents()
Get the contents as a component. |
static List |
getDefaultProjections()
Create the list of default projection classes |
JDialog |
getDialog()
Get this as a dialog. |
String |
getManagerName()
Get the name of this manager to put in a menu |
Class |
getPersistentObjectClass()
Get the Class type of the objects managed; must implement Serializable, Cloneable |
List |
getProjections()
Get the list of projections that this manager manages |
PersistentObject |
getSelection()
Get the currently selected object, of type getPersistentObjectClass() |
static void |
main(String[] args)
Test the class |
static List |
makeDefaultProjections()
Make the default projections from the internal list of classes. |
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove a property change listener. |
void |
saveProjection(ucar.unidata.geoloc.ProjectionImpl proj)
Store this Projection in the data table |
void |
setMaps(List maps)
Set the list of maps to use in this ProjectionManager |
void |
setProjections(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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTY_CHANGE
| Constructor Detail |
|---|
public ProjectionManager()
public ProjectionManager(RootPaneContainer parent,
Object dummy)
parent - parent containerdummy - dummy argument for clients that try to pass in
a storepublic ProjectionManager(RootPaneContainer parent)
parent - parent container
public ProjectionManager(RootPaneContainer parent,
boolean makeDialog)
parent - parent containermakeDialog - true to make this a dialog
public ProjectionManager(RootPaneContainer parent,
List projections)
parent - JFrame (application) or JApplet (applet)projections - list of initial projections
public ProjectionManager(RootPaneContainer parent,
List projections,
boolean makeDialog)
parent - JFrame (application) or JApplet (applet)projections - list of initial projectionsmakeDialog - true to make this a dialog
public ProjectionManager(RootPaneContainer parent,
List projections,
boolean makeDialog,
String helpId)
parent - JFrame (application) or JApplet (applet)projections - list of initial projectionsmakeDialog - true to make this a dialoghelpId - help id if dialog
public ProjectionManager(RootPaneContainer parent,
List projections,
boolean makeDialog,
String helpId,
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 MapData| Method Detail |
|---|
public static void addDefaultProjection(String projectionClass)
projectionClass - The classpublic static List getDefaultProjections()
public void storePersistentData()
public void actionPerformed(ActionEvent event)
actionPerformed in interface ActionListenerevent - event to handlepublic void close()
public void doExport()
public static List makeDefaultProjections()
public void setMaps(List maps)
maps - list of MapData's (may be null)public void setProjections(List list)
list - list of projectionspublic List getProjections()
public String getManagerName()
public Class getPersistentObjectClass()
public Component getContents()
public void addPropertyChangeListener(PropertyChangeListener l)
l - listener to addpublic void removePropertyChangeListener(PropertyChangeListener l)
l - listener to removepublic 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(String id)
id - name of projection
public 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(String[] args)
args - not used
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||