|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.html.DomNode
com.gargoylesoftware.htmlunit.html.DomNamespaceNode
com.gargoylesoftware.htmlunit.html.HtmlElement
com.gargoylesoftware.htmlunit.html.StyledElement
com.gargoylesoftware.htmlunit.html.ClickableElement
com.gargoylesoftware.htmlunit.html.HtmlOption
public class HtmlOption
Wrapper for the html element "option"
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement |
---|
HtmlElement.MapEntryWrappingIterator |
Field Summary | |
---|---|
static java.lang.String |
TAG_NAME
the HTML tag represented by this element |
Fields inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement |
---|
ATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTY |
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomNode |
---|
PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED |
Method Summary | |
---|---|
DomNode |
appendDomChild(DomNode node)
append a child node to the end of the current list |
java.lang.String |
asText()
Returns a text representation of this element that represents what would be visible to the user if this page was shown in a web browser. This implementation will show the label attribute before the content of the tag if the attribute exists. |
java.lang.String |
getDisabledAttribute()
Return the value of the attribute "disabled". |
HtmlSelect |
getEnclosingSelect()
Gets the enclosing select of this option |
java.lang.String |
getLabelAttribute()
Return the value of the attribute "label". |
java.lang.String |
getSelectedAttribute()
Return the value of the attribute "selected". |
java.lang.String |
getValueAttribute()
Return the value of the attribute "value". |
void |
insertBefore(DomNode newNode)
Inserts a new child node before this node into the child relationship this node is a part of. |
boolean |
isDefaultSelected()
Return whether this Option is selected by default. |
boolean |
isDisabled()
Return true if the disabled attribute is set for this element. |
boolean |
isSelected()
Return true if this option is currently selected |
void |
reset()
Reset the option to its original selected state. |
void |
setLabelAttribute(java.lang.String newLabel)
Set the value of the attribute "label". |
Page |
setSelected(boolean selected)
Set the selected state of this option. |
void |
setValueAttribute(java.lang.String newValue)
Set the value of the attribute "value". |
Methods inherited from class com.gargoylesoftware.htmlunit.html.ClickableElement |
---|
click, click, dblClick, dblClick, getLangAttribute, getOnClickAttribute, getOnDblClickAttribute, getOnKeyDownAttribute, getOnKeyPressAttribute, getOnKeyUpAttribute, getOnMouseDownAttribute, getOnMouseMoveAttribute, getOnMouseOutAttribute, getOnMouseOverAttribute, getOnMouseUpAttribute, getTextDirectionAttribute, getXmlLangAttribute |
Methods inherited from class com.gargoylesoftware.htmlunit.html.StyledElement |
---|
getClassAttribute, getIdAttribute, getStyleAttribute, getTitleAttribute |
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNamespaceNode |
---|
getLocalName, getNamespaceURI, getPrefix, getQualifiedName, setPrefix |
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNode |
---|
addDomChangeListener, asXml, getAllHtmlChildElements, getByXPath, getChildIterator, getEndColumnNumber, getEndLineNumber, getFirstDomChild, getLastDomChild, getNextDomSibling, getNodeValue, getPage, getParentDomNode, getPreviousDomSibling, getReadyState, getScriptObject, getStartColumnNumber, getStartLineNumber, remove, removeAllChildren, removeDomChangeListener, replace, setNodeValue, setReadyState, setScriptObject |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TAG_NAME
Method Detail |
---|
public DomNode appendDomChild(DomNode node)
appendDomChild
in class DomNode
node
- the node to append
public java.lang.String asText()
asText
in class DomNode
public final java.lang.String getDisabledAttribute()
getDisabledAttribute
in interface DisabledElement
public HtmlSelect getEnclosingSelect()
null
if no select is found (for instance malformed html)public final java.lang.String getLabelAttribute()
public final java.lang.String getSelectedAttribute()
public final java.lang.String getValueAttribute()
public void insertBefore(DomNode newNode) throws java.lang.IllegalStateException
insertBefore
in class DomNode
newNode
- the new node to insert
java.lang.IllegalStateException
- if this node is not a child of any other nodeDomNode.insertBefore(DomNode)
public final boolean isDefaultSelected()
public final boolean isDisabled()
isDisabled
in interface DisabledElement
public boolean isSelected()
public void reset()
public final void setLabelAttribute(java.lang.String newLabel)
newLabel
- The value of the attribute "label".public Page setSelected(boolean selected)
selected
- true if this option should be selected.
public final void setValueAttribute(java.lang.String newValue)
newValue
- The value of the attribute "value".
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |