## com.bbn.openmap
Interface PropertyConsumer

All Known Subinterfaces:
  LocationHandler, PlugIn, SymbolImageMaker

All Known Implementing Classes:
  AbstractImageFormatter, AbstractLocationHandler, AbstractOpenMapMenu, AbstractPlugIn, AreaHandler, BasicLocationHandler, BasicSymbolImageMaker, CSVLocationHandler, DBLocationHandler, DrawingAttributes, DrawingEditorTool, DTEDDirectoryHandler, DTEDFrameCache, DTEDFrameCache, DTEDFrameCacheHandler, ImageServer, Layer, LibraryBean, NetMapConnector, OMComponent, OMComponentPanel, OpenMapFrame, OverviewMapHandler, PropertyConsumerPropertyEditor, RpfCoverage, RpfViewAttributes, ScenarioGraphicLoader.TimerRateHolder, SpatialIndexHandler, StatusLightPanel, TimerRateComboBox, TimerToggleButton, ToolPanel

public interface PropertyConsumer

A PropertyConsumer is an interface defining an object that is configured by a Properties object, containing property keys and values that is expected by it.

Field Summary
`static java.lang.String` `EditorProperty` Keyword for PropertyEditor class from PropertyInfo Property object (editor).
`static java.lang.String` `initPropertiesProperty` Key in the associated propertyInfo object.
`static java.lang.String` `LabelEditorProperty` Scoped keyword for PropertyEditor class from PropertyInfo Property object, to scope the label for the property as displayed in the Inspector (label).
`static java.lang.String` `ScopedEditorProperty` Scoped keyword for PropertyEditor class from PropertyInfo Property object, same as EditorProperty with a period in front (.editor).

Method Summary
`java.util.Properties` `getProperties(java.util.Properties getList)` Method to fill in a Properties object, reflecting the current values of the PropertyConsumer.
`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 setList)` Method to set the properties in the PropertyConsumer.
`void` `setProperties(java.lang.String prefix, java.util.Properties setList)` 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.

Field Detail

### initPropertiesProperty

    public static final java.lang.String initPropertiesProperty

  Key in the associated propertyInfo object. Holds a list of property names, which should be displayed and editable when configuring a PropertyConsumer object interatively. List is space seperated and the order is the order in which the properties will appear (initProperties).

  See Also:
    Constant Field Values

### EditorProperty

    public static final java.lang.String EditorProperty

  Keyword for PropertyEditor class from PropertyInfo Property object (editor).

  See Also:
    Constant Field Values

### ScopedEditorProperty

    public static final java.lang.String ScopedEditorProperty

  Scoped keyword for PropertyEditor class from PropertyInfo Property object, same as EditorProperty with a period in front (.editor).

  See Also:
    Constant Field Values

### LabelEditorProperty

    public static final java.lang.String LabelEditorProperty

  Scoped keyword for PropertyEditor class from PropertyInfo Property object, to scope the label for the property as displayed in the Inspector (label).

  See Also:
    Constant Field Values

Method Detail

### setProperties

    public void setProperties(java.util.Properties setList)

  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.

  Parameters:
    `setList` - a properties object that the PropertyConsumer can use to retrieve expected properties it can use for configuration.

### setProperties

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

  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.

  Parameters:
    `prefix` - a String used by the PropertyConsumer to prepend to each property value it wants to look up - setList.getProperty(prefix.propertyKey). If the prefix had already been set, then the prefix passed in should replace that previous value.
    `setList` - a Properties object that the PropertyConsumer can use to retrieve expected properties it can use for configuration.

### getProperties

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

  Method to fill in a Properties object, reflecting the current values of the PropertyConsumer. If the PropertyConsumer has a prefix set, the property keys should have that prefix plus a separating '.' prepended to each property key it uses for configuration.

  Parameters:
    `getList` - 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.

### 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.).

  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.

  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.

  Returns:
    the prefix string

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