PropertyConsumerPropertyEditor (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.propertyEditor
Class PropertyConsumerPropertyEditor

    java.lang.Object
      java.beans.PropertyEditorSupport
          com.bbn.openmap.util.propertyEditor.PropertyConsumerPropertyEditor

All Implemented Interfaces:
  PropertyConsumer, java.beans.PropertyEditor

Direct Known Subclasses:
  DrawingAttributesPropertyEditor, OptionPropertyEditor

    public abstract class PropertyConsumerPropertyEditor

extends java.beans.PropertyEditorSupport
implements PropertyConsumer

The base class for property editors that can use properties to provide a more complex interface, and need more flexibility to contribute different parameters. The PropertyEditor's PropertyConsumer methods are called by the Inspector at particular times. The setProperties method is called to configure the PropertyConsumerPropertyEdtior. The prefix used in the setProperties method is the limited scope of just the property name being defined and/or adjusted. Any other properties defined need to also be defined at this level, with the property prefix used as a base. The getProperties() method will be called by the Inspector as a way for this property editor to provide more properties as a result of configuration.

Field Summary
`protected java.lang.String` | `propertyPrefix`

Fields inherited from interface com.bbn.openmap.PropertyConsumer
`EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty`

Constructor Summary
`PropertyConsumerPropertyEditor()`

Method Summary
`java.util.Properties` | `getProperties(java.util.Properties props)` PropertyConsumer method.
`java.util.Properties` | `getPropertyInfo(java.util.Properties list)` Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer.
`java.lang.String` | `getPropertyPrefix()` Get the property key prefix that is being used to prepend to the property keys for Properties lookups.
`void` | `setProperties(java.util.Properties props)` Method to set the properties in the PropertyConsumer.
`void` | `setProperties(java.lang.String prefix, java.util.Properties props)` Method to set the properties in the PropertyConsumer.
`void` | `setPropertyPrefix(java.lang.String prefix)` Set the property key prefix that should be used by the PropertyConsumer.

Methods inherited from class java.beans.PropertyEditorSupport
`addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText, setSource, setValue, supportsCustomEditor`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### propertyPrefix

    protected java.lang.String propertyPrefix

Constructor Detail

### PropertyConsumerPropertyEditor

    public PropertyConsumerPropertyEditor()

Method Detail

### setProperties

    public void setProperties(java.util.Properties props)

  Description copied from interface: `PropertyConsumer`
  Method to set the properties in the PropertyConsumer. It is assumed that the properties do not have a prefix associated with them, or that the prefix has already been set.

  Specified by:
    `setProperties` in interface `PropertyConsumer`
  Parameters:
    `props` - the `Properties` object.

### setProperties

    public void setProperties(java.lang.String prefix,
                              java.util.Properties props)

  Description copied from interface: `PropertyConsumer`
  Method to set the properties in the PropertyConsumer. The prefix is a string that should be prepended to each property key (in addition to a separating '.') in order for the PropertyConsumer to uniquely identify properties meant for it, in the midst of of Properties meant for several objects.

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

### getProperties

    public java.util.Properties getProperties(java.util.Properties props)

  PropertyConsumer method.

  Specified by:
    `getProperties` in interface `PropertyConsumer`
  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 list)

  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.). It's not really defined what this method call should be returning.

  Specified by:
    `getPropertyInfo` in interface `PropertyConsumer`
  Parameters:
    `list` - 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.

### setPropertyPrefix

    public void setPropertyPrefix(java.lang.String prefix)

  Set the property key prefix that should be used by the PropertyConsumer. The prefix, along with a '.', should be prepended to the property keys known by the PropertyConsumer.

  Specified by:
    `setPropertyPrefix` in interface `PropertyConsumer`
  Parameters:
    `prefix` - the prefix String.

### getPropertyPrefix

    public java.lang.String getPropertyPrefix()

  Get the property key prefix that is being used to prepend to the property keys for Properties lookups.

  Specified by:
    `getPropertyPrefix` in interface `PropertyConsumer`
  Returns:
    the property prefix.

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