qflib 0.99

de.qfs.lib.option
Class ChoiceOption

java.lang.Object
  extended byjava.util.Observable
      extended byde.qfs.lib.option.Option
          extended byde.qfs.lib.option.ChoiceOption
All Implemented Interfaces:
java.lang.Cloneable, ConfigurableOption, java.io.Serializable

public class ChoiceOption
extends Option
implements ConfigurableOption

A ChoiceOption is an Option that is edited with the help of a ChoiceOptionEdit.

Author:
Gregor Schmid
See Also:
Serialized Form

Constructor Summary
ChoiceOption()
          Create a new ChoiceOption.
ChoiceOption(java.lang.String name, int value)
          Create a new integer based ChoiceOption.
ChoiceOption(java.lang.String name, java.lang.Object value)
          Create a new ChoiceOption.
 
Method Summary
 java.lang.String getConfigurableValue()
          Get the Option's value as a String.
 boolean isIntBased()
          Get the intBased state of the ChoiceOption.
 void setConfigurableValue(java.lang.String val)
          Set the Option's value from a String.
 
Methods inherited from class de.qfs.lib.option.Option
addResources, addValidator, checkValue, clone, equals, getName, getResources, getValue, hashCode, isNullOK, removeValidator, setName, setNullOK, setResources, setValue, toString
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChoiceOption

public ChoiceOption()
Create a new ChoiceOption.


ChoiceOption

public ChoiceOption(java.lang.String name,
                    java.lang.Object value)
Create a new ChoiceOption.

Parameters:
name - The name of the ChoiceOption.
value - The initial value.

ChoiceOption

public ChoiceOption(java.lang.String name,
                    int value)
Create a new integer based ChoiceOption.

Parameters:
name - The name of the ChoiceOption.
value - The initial value.
Method Detail

isIntBased

public final boolean isIntBased()
Get the intBased state of the ChoiceOption.

Returns:
The intBased state of the ChoiceOption.

getConfigurableValue

public java.lang.String getConfigurableValue()
Get the Option's value as a String.

Specified by:
getConfigurableValue in interface ConfigurableOption
Returns:
The Option's value as a String.

setConfigurableValue

public void setConfigurableValue(java.lang.String val)
Set the Option's value from a String.

Specified by:
setConfigurableValue in interface ConfigurableOption
Parameters:
val - The value to set.

qflib 0.99