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 OptionPropertyEditor

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

All Implemented Interfaces:
  PropertyConsumer, java.beans.PropertyEditor

Direct Known Subclasses:
  ComboBoxPropertyEditor

public abstract class OptionPropertyEditor
extends PropertyConsumerPropertyEditor

The base class for property editors that support a list of options being presented in the GUI. When defining the properties that the property editor will use for a PropertyConsumer in the getPropertyInfo method, just use the name of the property that the options are being used for:

      BigNameOptionProperty.options=option1 option2 option3
      BigNameOptionProperty.option1=Big Name 1
      BigNameOptionProperty.option2=Big Name 2
      BigNameOptionProperty.option3=Big Name 3

Don't use the property prefix for the PropertyConsumer being defined, only the property.

Field Summary
`protected java.awt.Component` | `customEditor`
`static java.lang.String` | `OptionsProperty`
`static java.lang.String` | `ScopedOptionsProperty`

Fields inherited from class com.bbn.openmap.util.propertyEditor.PropertyConsumerPropertyEditor
`propertyPrefix`

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

Constructor Summary
`OptionPropertyEditor()`

Method Summary
`void` | `focusGained(java.awt.event.FocusEvent e)`
`void` | `focusLost(java.awt.event.FocusEvent e)`
`abstract java.lang.String` | `getAsText()` Returns String from option choices.
`java.awt.Component` | `getCustomEditor()` Returns the editor GUI.
`void` | `setCustomEditor(java.awt.Component comp)`
`abstract void` | `setOptions(java.lang.String[] options)`
`void` | `setProperties(java.lang.String prefix, java.util.Properties props)` Method to set the properties in the PropertyConsumer.
`abstract void` | `setValue(java.lang.Object string)` Sets option based on string.
`boolean` | `supportsCustomEditor()`

Methods inherited from class com.bbn.openmap.util.propertyEditor.PropertyConsumerPropertyEditor
`getProperties, getPropertyInfo, getPropertyPrefix, setProperties, setPropertyPrefix`

Methods inherited from class java.beans.PropertyEditorSupport
`addPropertyChangeListener, firePropertyChange, getJavaInitializationString, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText`

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

Field Detail

### OptionsProperty

    public static final java.lang.String OptionsProperty

See Also:
  Constant Field Values

### ScopedOptionsProperty

    public static final java.lang.String ScopedOptionsProperty

See Also:
  Constant Field Values

### customEditor

    protected java.awt.Component customEditor

Constructor Detail

### OptionPropertyEditor

    public OptionPropertyEditor()

Method Detail

### supportsCustomEditor

    public boolean supportsCustomEditor()

### setCustomEditor

    public void setCustomEditor(java.awt.Component comp)

### getCustomEditor

    public java.awt.Component getCustomEditor()

  Returns the editor GUI.

### setOptions

    public abstract void setOptions(java.lang.String[] options)

### setValue

    public abstract void setValue(java.lang.Object string)

  Sets option based on string.

### getAsText

    public abstract java.lang.String getAsText()

  Returns String from option choices.

### focusGained

    public void focusGained(java.awt.event.FocusEvent e)

### focusLost

    public void focusLost(java.awt.event.FocusEvent e)

### 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`
  Overrides:
    `setProperties` in class `PropertyConsumerPropertyEditor`
  Parameters:
    `prefix` - the token to prefix the property names
    `props` - the `Properties` object

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