com.bbn.openmap.proj
Class CartesianLoader

java.lang.Object
  extended by com.bbn.openmap.MapHandlerChild
      extended by com.bbn.openmap.OMComponent
          extended by com.bbn.openmap.proj.BasicProjectionLoader
              extended by com.bbn.openmap.proj.CartesianLoader
All Implemented Interfaces:
LightMapHandlerChild, ProjectionLoader, PropertyConsumer, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener

public class CartesianLoader
extends BasicProjectionLoader
implements ProjectionLoader

ProjectionLoader to add the Cartesian projection to an OpenMap application. There are some properties you can set for the Cartesian projection, namely limits on where it can pan. If you don't set the limits, the projection will just keep going. You can use the anchorX and anchorY settings to hold the map against some of the limits.

  topLimit=top coordinate limit
  bottomLimit=bottom coordinate limit
  leftLimit=left side coordinate limit
  rightLimit=right side coordinate limit
  anchorX=horizontal coordinate to set on projection before checking limits
  anchorY=vertical coordinate to set on projection before checking limits
 

See Also:
BasicProjectionLoader

Field Summary
static java.lang.String AnchorXProperty
           
static java.lang.String AnchorYProperty
           
protected  double bottomLimit
          The coordinate limit of the bottom side of the projection.
static java.lang.String BottomLimitProperty
           
protected  double leftLimit
          The coordinate limit of the left side of the projection.
static java.lang.String LeftLimitProperty
           
protected  java.awt.geom.Point2D limitAnchorPoint
          A point that can be used for force the projection against the limits.
protected  double rightLimit
          The coordinate limit of the right side of the projection.
static java.lang.String RightLimitProperty
           
protected  double topLimit
          The coordinate limit of the top side of the projection.
static java.lang.String TopLimitProperty
           
 
Fields inherited from class com.bbn.openmap.proj.BasicProjectionLoader
description, DescriptionProperty, prettyName, PrettyNameProperty, 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
CartesianLoader()
           
 
Method Summary
 Projection create(java.util.Properties props)
          Create the projection with the given parameters.
 double getBottomLimit()
           
 double getLeftLimit()
           
 java.awt.geom.Point2D getLimitAnchorPoint()
           
 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.
 double getRightLimit()
           
 double getTopLimit()
           
 void setBottomLimit(double bottomLimit)
           
 void setLeftLimit(double leftLimit)
           
 void setLimitAnchorPoint(java.awt.geom.Point2D limitAnchorPoint)
           
 void setProperties(java.lang.String prefix, java.util.Properties props)
          Sets the properties for the OMComponent.
 void setRightLimit(double rightLimit)
           
 void setTopLimit(double topLimit)
           
 
Methods inherited from class com.bbn.openmap.proj.BasicProjectionLoader
convertToLLP, getDescription, getPrettyName, getProjectionClass, setDescription, setPrettyName
 
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
 
Methods inherited from interface com.bbn.openmap.proj.ProjectionLoader
getDescription, getPrettyName, getProjectionClass
 

Field Detail

TopLimitProperty

public static final java.lang.String TopLimitProperty
See Also:
Constant Field Values

BottomLimitProperty

public static final java.lang.String BottomLimitProperty
See Also:
Constant Field Values

RightLimitProperty

public static final java.lang.String RightLimitProperty
See Also:
Constant Field Values

LeftLimitProperty

public static final java.lang.String LeftLimitProperty
See Also:
Constant Field Values

AnchorXProperty

public static final java.lang.String AnchorXProperty
See Also:
Constant Field Values

AnchorYProperty

public static final java.lang.String AnchorYProperty
See Also:
Constant Field Values

leftLimit

protected double leftLimit
The coordinate limit of the left side of the projection. If the left side of the map projection would show coordinates more left than this value, the center of the map will be changed so that this value is on the edge.


rightLimit

protected double rightLimit
The coordinate limit of the right side of the projection. If the right side of the map projection would show coordinates more right than this value, the center of the map will be changed so that this value is on the edge.


topLimit

protected double topLimit
The coordinate limit of the top side of the projection. If the top side of the map projection would show coordinates higher than this value, the center of the map will be changed so that this value is on the edge.


bottomLimit

protected double bottomLimit
The coordinate limit of the bottom side of the projection. If the bottom side of the map projection would show coordinates lower than this value, the center of the map will be changed so that this value is on the edge.


limitAnchorPoint

protected java.awt.geom.Point2D limitAnchorPoint
A point that can be used for force the projection against the limits. Is only used if the limits are set to be something other than infinity.

Constructor Detail

CartesianLoader

public CartesianLoader()
Method Detail

create

public Projection create(java.util.Properties props)
                  throws ProjectionException
Create the projection with the given parameters.

Specified by:
create in interface ProjectionLoader
Specified by:
create in class BasicProjectionLoader
Throws:
ProjectionException - if a parameter is missing or invalid

setProperties

public void setProperties(java.lang.String prefix,
                          java.util.Properties props)
Description copied from class: OMComponent
Sets the properties for the OMComponent.

Specified by:
setProperties in interface PropertyConsumer
Overrides:
setProperties in class BasicProjectionLoader
Parameters:
prefix - the token to prefix the property names
props - the Properties object

getProperties

public java.util.Properties getProperties(java.util.Properties props)
Description copied from class: OMComponent
PropertyConsumer method, to fill in a Properties object, reflecting the current values of the OMComponent. If the component has a propertyPrefix set, the property keys should have that prefix plus a separating '.' prepended to each property key it uses for configuration.

Specified by:
getProperties in interface PropertyConsumer
Overrides:
getProperties in class BasicProjectionLoader
Parameters:
props - a Properties object to load the PropertyConsumer properties into. If props equals null, then a new Properties object should be created.
Returns:
Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

getPropertyInfo

public java.util.Properties getPropertyInfo(java.util.Properties props)
Description copied from class: OMComponent
Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. The key for each property should be the raw property name (without a prefix) with a value that is a String that describes what the property key represents, along with any other information about the property that would be helpful (range, default value, etc.). For Layer, this method should at least return the 'prettyName' property.

Specified by:
getPropertyInfo in interface PropertyConsumer
Overrides:
getPropertyInfo in class BasicProjectionLoader
Parameters:
props - a Properties object to load the PropertyConsumer properties into. If getList equals null, then a new Properties object should be created.
Returns:
Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

getBottomLimit

public double getBottomLimit()

setBottomLimit

public void setBottomLimit(double bottomLimit)

getLeftLimit

public double getLeftLimit()

setLeftLimit

public void setLeftLimit(double leftLimit)

getLimitAnchorPoint

public java.awt.geom.Point2D getLimitAnchorPoint()

setLimitAnchorPoint

public void setLimitAnchorPoint(java.awt.geom.Point2D limitAnchorPoint)

getRightLimit

public double getRightLimit()

setRightLimit

public void setRightLimit(double rightLimit)

getTopLimit

public double getTopLimit()

setTopLimit

public void setTopLimit(double topLimit)


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details