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
FieldsFields inherited from class com.google.gwt.dom.client.Element
DRAGGABLE_AUTO, DRAGGABLE_FALSE, DRAGGABLE_TRUEFields inherited from class com.google.gwt.dom.client.Node
DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OptionElementAssert that the givenElementis compatible with this class and automatically typecast it.final FormElementgetForm()Returns the FORM element containing this control.final intgetIndex()The index of this OPTION in its parent SELECT, starting from 0.final StringgetLabel()Option label for use in hierarchical menus.final StringgetText()The text contained within the option element.final StringgetValue()The current form control value.static booleanDetermines whether the givenJavaScriptObjectcan be cast to this class.static booleanDetermine whether the givenElementcan be cast to this class.static booleanDetermine whether the givenNodecan be cast to this class.final booleanRepresents the value of the HTML selected attribute.final booleanThe control is unavailable in this context.final booleanRepresents the current state of the corresponding form control, in an interactive user agent.final voidsetDefaultSelected(boolean selected) Represents the value of the HTML selected attribute.final voidsetDisabled(boolean disabled) The control is unavailable in this context.final voidOption label for use in hierarchical menus.final voidsetSelected(boolean selected) Represents the current state of the corresponding form control, in an interactive user agent.final voidThe text contained within the option element.final voidThe 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, toggleClassNameMethods 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, setNodeValueMethods 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 givenElementis compatible with this class and automatically typecast it. -
is
Determines whether the givenJavaScriptObjectcan be cast to this class. Anullobject will cause this method to returnfalse. -
is
Determine whether the givenNodecan be cast to this class. Anullnode will cause this method to returnfalse. -
is
Determine whether the givenElementcan be cast to this class. Anullnode 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:
-