public class OptionElement extends FormElement<HTMLOptionElement>
The OptionElement represents a wrapper that is associated with the HTMLOptionElement
Constructor and Description |
---|
OptionElement(HTMLOptionElement element)
Initializes a new instance of the
OptionElement class. |
Modifier and Type | Method and Description |
---|---|
boolean |
getDisabled()
The control is unavailable in this context.
|
java.lang.String |
getLabel()
Option label for use in hierarchical menus.
|
boolean |
getSelected()
Represents the current state of the corresponding form control, in an interactive user agent.
|
java.lang.String |
getText()
This attribute represents the text content of this node and its descendants.
|
java.lang.String |
getValue()
The current form control value.
|
void |
setDisabled(boolean value)
The control is unavailable in this context.
|
void |
setLabel(java.lang.String value)
Option label for use in hierarchical menus.
|
void |
setSelected(boolean value)
Represents the current state of the corresponding form control, in an interactive user agent.
|
void |
setText(java.lang.String value)
This attribute represents the text content of this node and its descendants.
|
void |
setValue(java.lang.String value)
The current form control value.
|
getHtmlElement
getElementType, getId, getName, setId, setName
public OptionElement(HTMLOptionElement element)
Initializes a new instance of the OptionElement
class.
element
- The element.public boolean getDisabled()
The control is unavailable in this context. See the disabled attribute definition in HTML 4.01.
Value:true
if disabled; otherwise, false
.public void setDisabled(boolean value)
The control is unavailable in this context. See the disabled attribute definition in HTML 4.01.
Value:true
if disabled; otherwise, false
.public java.lang.String getLabel()
Option label for use in hierarchical menus. See the label attribute definition in HTML 4.01.
Value: The label value.public void setLabel(java.lang.String value)
Option label for use in hierarchical menus. See the label attribute definition in HTML 4.01.
Value: The label value.public boolean getSelected()
Represents the current state of the corresponding form control, in an interactive user agent. Changing this attribute changes the state of the form control, but does not change the value of the HTML selected attribute of the element.
public void setSelected(boolean value)
Represents the current state of the corresponding form control, in an interactive user agent. Changing this attribute changes the state of the form control, but does not change the value of the HTML selected attribute of the element.
public java.lang.String getText()
This attribute represents the text content of this node and its descendants.
public void setText(java.lang.String value)
This attribute represents the text content of this node and its descendants.
public java.lang.String getValue()
The current form control value. See the value attribute definition in HTML 4.01.
getValue
in class FormElementBase
public void setValue(java.lang.String value)
The current form control value. See the value attribute definition in HTML 4.01.
setValue
in class FormElementBase