org.crosswire.common.config.swing
Class OptionsField

java.lang.Object
  extended by org.crosswire.common.config.swing.OptionsField
All Implemented Interfaces:
Field

public class OptionsField
extends Object
implements Field

Allow the user to choose from True/False.

Author:
Joe Walker [joe at eireneh dot com]
See Also:
for license details. The copyright to this program is held by it's authors.

Field Summary
private  JComboBox combo
          The component that we are wrapping in a field
private  String[] list
          The options
private static Logger log
          The log stream
 
Constructor Summary
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(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 Logger log
The log stream

Constructor Detail

OptionsField

public OptionsField()
Method Detail

setChoice

public void setChoice(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

Copyright ? 2003-2006