public abstract class BasicProjectionLoader extends OMComponent implements ProjectionLoader
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.
Modifier and Type | Field and Description |
---|---|
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 |
i18n, propertyPrefix
beanContextChildSupport, isolated
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
BasicProjectionLoader(java.lang.Class<? extends Projection> pClass,
java.lang.String pName,
java.lang.String pDescription)
Set the basic parameters needed for a ProjectionLoader.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getPropertyPrefix, setProperties, setPropertyPrefix
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated
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
public BasicProjectionLoader(java.lang.Class<? extends Projection> pClass, java.lang.String pName, java.lang.String pDescription)
public java.lang.Class<? extends Projection> getProjectionClass()
getProjectionClass
in interface ProjectionLoader
public java.lang.String getPrettyName()
getPrettyName
in interface ProjectionLoader
public void setPrettyName(java.lang.String pn)
public java.lang.String getDescription()
getDescription
in interface ProjectionLoader
public void setDescription(java.lang.String desc)
public abstract Projection create(java.util.Properties props) throws ProjectionException
create
in interface ProjectionLoader
exception
- if a parameter is missing or invalid.ProjectionException
public void setProperties(java.lang.String prefix, java.util.Properties props)
OMComponent
setProperties
in interface PropertyConsumer
setProperties
in class OMComponent
prefix
- the token to prefix the property namesprops
- the Properties
objectpublic java.util.Properties getProperties(java.util.Properties props)
OMComponent
getProperties
in interface PropertyConsumer
getProperties
in class OMComponent
props
- 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 PropertyConsumer
getPropertyInfo
in class OMComponent
props
- 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)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details