javax.swing.text.html
public class Option extends Object
<option>
elements.
Constructor Summary | |
---|---|
Option(AttributeSet attr)
Creates a new Option instance that uses the specified
tag attributes.
|
Method Summary | |
---|---|
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.
|
Option
instance that uses the specified
tag attributes.
Parameters: attr the attributes to use
<option>
tag.
Returns: the attributes used to render this <option>
tag
<option>
tag.
Returns: the label of this <option>
tag
value
attribute or
the label, if no such attribute is specified.
Returns: the string associated with the value
attribute or
the label, if no such attribute is specified
true
when this option is selected, false
otherwise.
Returns: true
when this option is selected, false
otherwise
<option>
tag.
Parameters: l the label to set
<option>
tag.
Parameters: s the selected state to set
<option>
tag.
This returns the label
property.
Returns: a string representation of this <option>
tag