CoordInfoFormatterHandler (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.util.coordFormatter
Class CoordInfoFormatterHandler

    java.lang.Object
      com.bbn.openmap.MapHandlerChild
          com.bbn.openmap.OMComponent
              com.bbn.openmap.util.coordFormatter.CoordInfoFormatterHandler

All Implemented Interfaces:
  LightMapHandlerChild, PropertyConsumer, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener

    public class CoordInfoFormatterHandler

extends OMComponent

The CoordInfoFormatterHandler manages CoordInfoFormatters for all of the CoordMouseModes, in order to provide a consistent coordinate display across mouse modes that display coordinate info. If you want different coordinate information for each CoordMouseMode, set the CoordInfoFormatter on each mouse mode and don't use this class in the openmap.components property or MapHandler. Only use this if you want to provide a choice to your users and you want that choice used over all of your mouse modes.

This class should be placed in the MapHandler, which you can do via the properties by adding it's marker name to the openmap.components property list. The properties look like this (for a marker name coordFormatterHandler):

     coordFormatterHandler.class=com.bbn.openmap.util.coordFormatter.CoordInfoFormatterHandler
     coordFormatterHandler.formatters=dmsFormatter basicFormatter
     coordFormatterHandler.dmsFormatter.class=com.bbn.openmap.util.coordFormatter.DMSCoordInfoFormatter
     coordFormatterHandler.basicFormatter.class=com.bbn.openmap.util.coordFormatter.BasicCoordInfoFormatter

Author:
  dietrick

Field Summary
`protected CoordInfoFormatter` | `activeFormatter`
`static java.lang.String` | `FORMATTER_PROPERTY`
`protected java.util.List<CoordInfoFormatter>` | `formatters`

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
`CoordInfoFormatterHandler()`

Method Summary
`void` | `addPropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener pcl)` Method for BeanContextChild interface.
`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` | `setActiveFormatter(CoordInfoFormatter formatter)`
`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
`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

### formatters

    protected java.util.List<CoordInfoFormatter> formatters

### activeFormatter

    protected CoordInfoFormatter activeFormatter

### FORMATTER_PROPERTY

    public static final java.lang.String FORMATTER_PROPERTY

See Also:
  Constant Field Values

Constructor Detail

### CoordInfoFormatterHandler

    public CoordInfoFormatterHandler()

Method Detail

### 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 `OMComponent`
  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 `OMComponent`
  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 `OMComponent`
  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.

### setActiveFormatter

    public void setActiveFormatter(CoordInfoFormatter formatter)

### addPropertyChangeListener

    public void addPropertyChangeListener(java.lang.String property,
                                          java.beans.PropertyChangeListener pcl)

  Description copied from class: `MapHandlerChild`
  Method for BeanContextChild interface. Uses the BeanContextChildSupport to add a listener to this object's property. You don't need this function for objects that extend java.awt.Component.

  Specified by:
    `addPropertyChangeListener` in interface `java.beans.beancontext.BeanContextChild`
  Overrides:
    `addPropertyChangeListener` in class `MapHandlerChild`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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