|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bbn.openmap.MapHandlerChild
com.bbn.openmap.OMComponent
com.bbn.openmap.proj.BasicProjectionLoader
public abstract class BasicProjectionLoader
The BasicProjectionLoader is a base implementation of the ProjectionLoader interface that conveniently handles the PropertyConsumer methods for the ProjectionLoader. There are two basic properties built into this base class that can be modified in a properties file. You can add ProjectionLoaders to the MapHandler, and if the ProjectionFactory singleton instance has been added to it as well, it will be picked up and the projection made available to the application. For example, the BasicProjectionFactory allows you to set thse properties for the Mercator projection:
projLoader.class=com.bbn.openmap.proj.MercatorLoader
projLoader.prettyName=Mercator
projLoader.description=Mercator Projection.
The prettyName and description properties should have defaults, but
internationalized strings can be substituted as needed.
| Field Summary | |
|---|---|
protected java.lang.String |
description
|
static java.lang.String |
DescriptionProperty
|
protected java.lang.String |
prettyName
|
static java.lang.String |
PrettyNameProperty
|
protected java.lang.Class<? extends Projection> |
projClass
|
| Fields inherited from class com.bbn.openmap.OMComponent |
|---|
i18n, propertyPrefix |
| Fields inherited from class com.bbn.openmap.MapHandlerChild |
|---|
beanContextChildSupport, isolated |
| Fields inherited from interface com.bbn.openmap.PropertyConsumer |
|---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
| Constructor Summary | |
|---|---|
BasicProjectionLoader(java.lang.Class<? extends Projection> pClass,
java.lang.String pName,
java.lang.String pDescription)
Set the basic parameters needed for a ProjectionLoader. |
|
| Method Summary | |
|---|---|
LatLonPoint |
convertToLLP(java.awt.geom.Point2D pt)
|
abstract Projection |
create(java.util.Properties props)
Create the projection with the given parameters. |
java.lang.String |
getDescription()
Get a description for the projection. |
java.lang.String |
getPrettyName()
Get a pretty name for the projection. |
java.lang.Class<? extends Projection> |
getProjectionClass()
Get a class name to use for the projection. |
java.util.Properties |
getProperties(java.util.Properties props)
PropertyConsumer method, to fill in a Properties object, reflecting the current values of the OMComponent. |
java.util.Properties |
getPropertyInfo(java.util.Properties props)
Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. |
void |
setDescription(java.lang.String desc)
Set a description for the projection. |
void |
setPrettyName(java.lang.String pn)
Set a pretty name for the projection. |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Sets the properties for the OMComponent. |
| Methods inherited from class com.bbn.openmap.OMComponent |
|---|
getPropertyPrefix, setProperties, setPropertyPrefix |
| Methods inherited from class com.bbn.openmap.MapHandlerChild |
|---|
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.Class<? extends Projection> projClass
protected java.lang.String prettyName
protected java.lang.String description
public static final java.lang.String PrettyNameProperty
public static final java.lang.String DescriptionProperty
| Constructor Detail |
|---|
public BasicProjectionLoader(java.lang.Class<? extends Projection> pClass,
java.lang.String pName,
java.lang.String pDescription)
| Method Detail |
|---|
public java.lang.Class<? extends Projection> getProjectionClass()
getProjectionClass in interface ProjectionLoaderpublic java.lang.String getPrettyName()
getPrettyName in interface ProjectionLoaderpublic void setPrettyName(java.lang.String pn)
public java.lang.String getDescription()
getDescription in interface ProjectionLoaderpublic void setDescription(java.lang.String desc)
public abstract Projection create(java.util.Properties props)
throws ProjectionException
create in interface ProjectionLoaderProjectionException - if a parameter is missing or invalid
public void setProperties(java.lang.String prefix,
java.util.Properties props)
OMComponent
setProperties in interface PropertyConsumersetProperties in class OMComponentprefix - the token to prefix the property namesprops - the Properties objectpublic java.util.Properties getProperties(java.util.Properties props)
OMComponent
getProperties in interface PropertyConsumergetProperties in class OMComponentprops - a Properties object to load the PropertyConsumer properties
into. If props equals null, then a new Properties object should be
created.
public java.util.Properties getPropertyInfo(java.util.Properties props)
OMComponent
getPropertyInfo in interface PropertyConsumergetPropertyInfo in class OMComponentprops - a Properties object to load the PropertyConsumer properties
into. If getList equals null, then a new Properties object should
be created.
public LatLonPoint convertToLLP(java.awt.geom.Point2D pt)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||