public class: Option
All Implemented Interfaces:
Value for the ListModel used to represent
<option> elements. This is the object
installed as items of the DefaultComboBoxModel
used to represent the <select> element.
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the
Please see java.beans.XMLEncoder .
Timothy - Prinzing
public Option(AttributeSet attr)
Creates a new Option object.
attr - the attributes associated with the
option element. The attributes are copied to
ensure they won't change.
|Methods from java.lang.Object:|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait|
|Method from javax.swing.text.html.Option Detail:|
public AttributeSet getAttributes()
Fetch the attributes associated with this option.
public String getLabel()
Fetch the label associated with the option.
public String getValue()
Convenience method to return the string associated
value attribute. If the
value has not been specified, the label will be
public boolean isSelected()
Fetches the selection state associated with this option.
public void setLabel(String label)
Sets the label to be used for the option.
protected void setSelection(boolean state)
public String toString()
String representation is the label.