javax.swing.text.html
Class Option
Value class for the combobox model that renders <option>
elements.
Option(AttributeSet attr) - Creates a new
Option instance that uses the specified
tag attributes.
|
AttributeSet | getAttributes() - Returns the attributes used to render this
<option>
tag.
|
String | getLabel() - Returns the label of this
<option> tag.
|
String | getValue() - Returns the string associated with the
value attribute or
the label, if no such attribute is specified.
|
boolean | isSelected() - Returns
true when this option is selected, false
otherwise.
|
void | setLabel(String l) - Sets the label to use for this
<option> tag.
|
protected void | setSelection(boolean s) - Sets the selected state of this
<option> tag.
|
String | toString() - Returns a string representation of this
<option> tag.
|
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
Option
public Option(AttributeSet attr)
Creates a new Option
instance that uses the specified
tag attributes.
attr
- the attributes to use
getAttributes
public AttributeSet getAttributes()
Returns the attributes used to render this <option>
tag.
- the attributes used to render this
<option>
tag
getLabel
public String getLabel()
Returns the label of this <option>
tag.
- the label of this
<option>
tag
getValue
public String getValue()
Returns the string associated with the value
attribute or
the label, if no such attribute is specified.
- the string associated with the
value
attribute or
the label, if no such attribute is specified
isSelected
public boolean isSelected()
Returns true
when this option is selected, false
otherwise.
true
when this option is selected, false
otherwise
setLabel
public void setLabel(String l)
Sets the label to use for this <option>
tag.
setSelection
protected void setSelection(boolean s)
Sets the selected state of this <option>
tag.
s
- the selected state to set
toString
public String toString()
Returns a string representation of this <option>
tag.
This returns the label
property.
- toString in interface Object
- a string representation of this
<option>
tag
Option.java -- Value class for