Package com.google.gwt.dom.client
Class OptionElement
java.lang.Object
com.google.gwt.core.client.JavaScriptObject
com.google.gwt.dom.client.Node
com.google.gwt.dom.client.Element
com.google.gwt.dom.client.OptionElement
A selectable choice.
- See Also:
-
Field Summary
Fields inherited from class com.google.gwt.dom.client.Element
DRAGGABLE_AUTO, DRAGGABLE_FALSE, DRAGGABLE_TRUE
Fields inherited from class com.google.gwt.dom.client.Node
DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic OptionElement
Assert that the givenElement
is compatible with this class and automatically typecast it.final FormElement
getForm()
Returns the FORM element containing this control.final int
getIndex()
The index of this OPTION in its parent SELECT, starting from 0.final String
getLabel()
Option label for use in hierarchical menus.final String
getText()
The text contained within the option element.final String
getValue()
The current form control value.static boolean
Determines whether the givenJavaScriptObject
can be cast to this class.static boolean
Determine whether the givenElement
can be cast to this class.static boolean
Determine whether the givenNode
can be cast to this class.final boolean
Represents the value of the HTML selected attribute.final boolean
The control is unavailable in this context.final boolean
Represents the current state of the corresponding form control, in an interactive user agent.final void
setDefaultSelected
(boolean selected) Represents the value of the HTML selected attribute.final void
setDisabled
(boolean disabled) The control is unavailable in this context.final void
Option label for use in hierarchical menus.final void
setSelected
(boolean selected) Represents the current state of the corresponding form control, in an interactive user agent.final void
The text contained within the option element.final void
The current form control value.Methods inherited from class com.google.gwt.dom.client.Element
addClassName, as, as, blur, dispatchEvent, focus, getAbsoluteBottom, getAbsoluteLeft, getAbsoluteRight, getAbsoluteTop, getAttribute, getClassName, getClientHeight, getClientWidth, getDir, getDraggable, getElementsByTagName, getFirstChildElement, getId, getInnerHTML, getInnerText, getLang, getNextSiblingElement, getOffsetHeight, getOffsetLeft, getOffsetParent, getOffsetTop, getOffsetWidth, getPreviousSiblingElement, getPropertyBoolean, getPropertyDouble, getPropertyInt, getPropertyJSO, getPropertyObject, getPropertyString, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getString, getStyle, getTabIndex, getTagName, getTitle, hasAttribute, hasClassName, hasTagName, indexOfName, removeAttribute, removeClassName, replaceClassName, scrollIntoView, setAttribute, setClassName, setDir, setDraggable, setId, setInnerHTML, setInnerSafeHtml, setInnerText, setLang, setPropertyBoolean, setPropertyDouble, setPropertyInt, setPropertyJSO, setPropertyObject, setPropertyString, setScrollLeft, setScrollTop, setTabIndex, setTitle, toggleClassName
Methods inherited from class com.google.gwt.dom.client.Node
appendChild, cloneNode, getChild, getChildCount, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPreviousSibling, hasChildNodes, hasParentElement, insertAfter, insertBefore, insertFirst, isOrHasChild, removeAllChildren, removeChild, removeFromParent, replaceChild, setNodeValue
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
-
Field Details
-
TAG
- See Also:
-
-
Constructor Details
-
OptionElement
protected OptionElement()
-
-
Method Details
-
as
Assert that the givenElement
is compatible with this class and automatically typecast it. -
is
Determines whether the givenJavaScriptObject
can be cast to this class. Anull
object will cause this method to returnfalse
. -
is
Determine whether the givenNode
can be cast to this class. Anull
node will cause this method to returnfalse
. -
is
Determine whether the givenElement
can be cast to this class. Anull
node will cause this method to returnfalse
. -
getForm
Returns the FORM element containing this control. Returns null if this control is not within the context of a form. -
getIndex
public final int getIndex()The index of this OPTION in its parent SELECT, starting from 0. -
getLabel
Option label for use in hierarchical menus.- See Also:
-
getText
The text contained within the option element. -
getValue
The current form control value.- See Also:
-
isDefaultSelected
public final boolean isDefaultSelected()Represents the value of the HTML selected attribute. The value of this attribute does not change if the state of the corresponding form control, in an interactive user agent, changes.- See Also:
-
isDisabled
public final boolean isDisabled()The control is unavailable in this context.- See Also:
-
isSelected
public final boolean isSelected()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. -
setDefaultSelected
public final void setDefaultSelected(boolean selected) Represents the value of the HTML selected attribute. The value of this attribute does not change if the state of the corresponding form control, in an interactive user agent, changes.- See Also:
-
setDisabled
public final void setDisabled(boolean disabled) The control is unavailable in this context.- See Also:
-
setLabel
Option label for use in hierarchical menus.- See Also:
-
setSelected
public final void setSelected(boolean selected) 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. -
setText
The text contained within the option element. -
setValue
The current form control value.- See Also:
-