org.jdesktop.html.form
Class AbstractSelect

java.lang.Object
  extended by org.jdesktop.beans.AbstractBean
      extended by org.jdesktop.html.form.AbstractSelect
All Implemented Interfaces:
Input, Select

public abstract class AbstractSelect
extends org.jdesktop.beans.AbstractBean
implements Select

Abstract implementation of the Select interface.


Constructor Summary
protected AbstractSelect(String name, Set<String> values)
          Creates a new instance of AbstractSelect.
 
Method Summary
 String getName()
          Gets the name of this Input.
 String[] getOptions()
          Gets the set of valid values.
 String getValue()
          Gets the value of the Input.
 void setValue(String value)
          Sets the value of the Input.
 
Methods inherited from class org.jdesktop.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSelect

protected AbstractSelect(String name,
                         Set<String> values)
Creates a new instance of AbstractSelect.

Parameters:
name - the name, corrosponding to the "name" property of Input.
values - the set of acceptable values
Method Detail

getOptions

public String[] getOptions()
Description copied from interface: Select
Gets the set of valid values. Any call to #setValue(String) must reference one of these.

Specified by:
getOptions in interface Select
Returns:
the array of valid values.

getName

public String getName()
Description copied from interface: Input
Gets the name of this Input.

Specified by:
getName in interface Input
Returns:
the name. This will never be null.

getValue

public String getValue()
Description copied from interface: Input
Gets the value of the Input.

Specified by:
getValue in interface Input
Returns:
the value. This may be null.

setValue

public void setValue(String value)
Description copied from interface: Input
Sets the value of the Input. This value may be null.

Specified by:
setValue in interface Input
Parameters:
value - the value. May be null.