public class

OptionElement

extends Element
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

Class Overview

A selectable choice.

Summary

[Expand]
Inherited Constants
From class com.google.gwt.dom.client.Node
Protected Constructors
OptionElement()
Public Methods
static OptionElement as(Element elem)
Assert that the given Element 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.
final boolean isDefaultSelected()
Represents the value of the HTML selected attribute.
final boolean isDisabled()
The control is unavailable in this context.
final boolean isSelected()
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 setLabel(String label)
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 setText(String text)
The text contained within the option element.
final void setValue(String value)
The current form control value.
[Expand]
Inherited Methods
From class com.google.gwt.dom.client.Element
From class com.google.gwt.dom.client.Node
From class com.google.gwt.core.client.JavaScriptObject
From class java.lang.Object

Protected Constructors

protected OptionElement ()

Public Methods

public static OptionElement as (Element elem)

Assert that the given Element is compatible with this class and automatically typecast it.

public final FormElement getForm ()

Returns the FORM element containing this control. Returns null if this control is not within the context of a form.

public final int getIndex ()

The index of this OPTION in its parent SELECT, starting from 0.

public final String getLabel ()

Option label for use in hierarchical menus.

public final String getText ()

The text contained within the option element.

public final String getValue ()

The current form control value.

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.

public final boolean isDisabled ()

The control is unavailable in this context.

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.

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.

public final void setDisabled (boolean disabled)

The control is unavailable in this context.

public final void setLabel (String label)

Option label for use in hierarchical menus.

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.

public final void setText (String text)

The text contained within the option element.

public final void setValue (String value)

The current form control value.