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

## org.crosswire.common.config.swing
Class OptionsField

    java.lang.Object
      org.crosswire.common.config.swing.OptionsField

All Implemented Interfaces:
  Field

    public class OptionsField

extends Object
implements Field

Allow the user to choose from a combo box.

Author:
  Joe Walker
See Also:
  `The GNU General Public License for details.`

Field Summary
`private JComboBox` | `combo` The component that we are wrapping in a field
`private String[]` | `list` The options
`private static org.slf4j.Logger` | `log` The log stream

Constructor Summary
`OptionsField()` Create an empty OptionsField

Method Summary
`JComponent` | `getComponent()` Get the actual component that we can add to a Panel.
`String` | `getValue()` Return a string for use in the properties file
`void` | `setChoice(org.crosswire.common.config.Choice param)` Some fields will need some extra info to display properly like the options in an options field.
`void` | `setValue(String value)` Set the current value

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

Field Detail

### combo

    private JComboBox combo

  The component that we are wrapping in a field

### list

    private String[] list

  The options

### log

    private static final org.slf4j.Logger log

  The log stream

Constructor Detail

### OptionsField

    public OptionsField()

  Create an empty OptionsField

Method Detail

### setChoice

    public void setChoice(org.crosswire.common.config.Choice param)

  Some fields will need some extra info to display properly like the options in an options field. FieldMap calls this method with options provided by the choice.

  Specified by:
    `setChoice` in interface `Field`
  Parameters:
    `param` - The options provided by the Choice

### getValue

    public String getValue()

  Return a string for use in the properties file

  Specified by:
    `getValue` in interface `Field`
  Returns:
    The current value

### setValue

    public void setValue(String value)

  Set the current value

  Specified by:
    `setValue` in interface `Field`
  Parameters:
    `value` - The new text

### getComponent

    public JComponent getComponent()

  Get the actual component that we can add to a Panel. (This can well be this in an implementation).

  Specified by:
    `getComponent` in interface `Field`

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