Top Fields Constructors Methods
org.apache.html.dom

public Class HTMLSelectElementImpl

extends HTMLElementImpl
implements HTMLSelectElement, HTMLFormControl
Class Inheritance
All Implemented Interfaces
org.apache.html.dom.HTMLFormControl, org.w3c.dom.html.HTMLSelectElement, org.w3c.dom.html.HTMLElement, org.w3c.dom.Element, org.w3c.dom.Node
Imports
org.w3c.dom.Node, .NodeList, org.w3c.dom.html.HTMLCollection, .HTMLElement, .HTMLOptionElement, .HTMLSelectElement

Author
Assaf Arkin
Version
$Revision: 1029415 $ $Date: 2010-10-31 22:32:22 +0530 (Sun, 31 Oct 2010) $
See Also
org.w3c.dom.html.HTMLSelectElement, org.apache.xerces.dom.ElementImpl

Field Summary

Modifier and TypeField and Description
private HTMLCollection
private static final long

Constructor Summary

AccessConstructor and Description
public
HTMLSelectElementImpl(HTMLDocumentImpl
The owner HTML document
owner
,
String name)

Constructor requires owner document.

Method Summary

Modifier and TypeMethod and Description
public void
add(HTMLElement
The element to add.
element
,
HTMLElement
The element to insert before, or null for the tail of the list.
before
)

Implements org.w3c.dom.html.HTMLSelectElement.add.

Add a new element to the collection of OPTION elements for this SELECT .
public void
blur()

Implements org.w3c.dom.html.HTMLSelectElement.blur.

Removes keyboard focus from this element.
public Node
cloneNode(boolean
If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
deep
)

Overrides org.apache.xerces.dom.ElementImpl.cloneNode.

Implements org.w3c.dom.Node.cloneNode.

Explicit implementation of cloneNode() to ensure that cache used for getOptions() gets cleared.
public void
focus()

Implements org.w3c.dom.html.HTMLSelectElement.focus.

Gives keyboard focus to this element.
public NodeList
getChildNodes()

Overrides org.apache.xerces.dom.ParentNode.getChildNodes.

Implements org.w3c.dom.Node.getChildNodes.

Explicit implementation of getChildNodes() to avoid problems with overriding the getLength() method hidden in the super class.
public boolean
getDisabled()

Implements org.w3c.dom.html.HTMLSelectElement.getDisabled.

The control is unavailable in this context.
public int
public boolean
getMultiple()

Implements org.w3c.dom.html.HTMLSelectElement.getMultiple.

If true, multiple OPTION elements may be selected in this SELECT .
public String
getName()

Implements org.w3c.dom.html.HTMLSelectElement.getName.

Form control or object name when submitted with a form.
public HTMLCollection
getOptions()

Implements org.w3c.dom.html.HTMLSelectElement.getOptions.

The collection of OPTION elements contained by this element.
public int
getSelectedIndex()

Implements org.w3c.dom.html.HTMLSelectElement.getSelectedIndex.

The ordinal index of the selected option, starting from 0.
public int
getSize()

Implements org.w3c.dom.html.HTMLSelectElement.getSize.

Number of visible rows.
public int
getTabIndex()

Implements org.w3c.dom.html.HTMLSelectElement.getTabIndex.

Index that represents the element's position in the tabbing order.
public String
getType()

Implements org.w3c.dom.html.HTMLSelectElement.getType.

The type of this form control.
public String
getValue()

Implements org.w3c.dom.html.HTMLSelectElement.getValue.

The current form control value.
public void
remove(int
The index of the item to remove, starting from 0.
index
)

Implements org.w3c.dom.html.HTMLSelectElement.remove.

Remove an element from the collection of OPTION elements for this SELECT .
public void
public void
public void
public void
public void
public void
public void
Inherited from org.apache.html.dom.HTMLElementImpl:
capitalizegetAttributegetAttributeNodegetAttributeNodeNSgetAttributeNSgetBinarygetCapitalizedgetClassNamegetDirgetElementsByTagNamegetElementsByTagNameNSgetFormgetIdgetIntegergetLanggetTitlesetAttributesetClassNamesetDirsetIdsetLangsetTitle

Field Detail

_optionsback to summary
private HTMLCollection _options
serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.apache.html.dom.HTMLElementImpl.serialVersionUID.

Constructor Detail

HTMLSelectElementImplback to summary
public HTMLSelectElementImpl(HTMLDocumentImpl owner, String name)

Constructor requires owner document.

Parameters
owner:HTMLDocumentImpl

The owner HTML document

Method Detail

addback to summary
public void add(HTMLElement element, HTMLElement before)

Implements org.w3c.dom.html.HTMLSelectElement.add.

Doc from org.w3c.dom.html.HTMLSelectElement.add.

Add a new element to the collection of OPTION elements for this SELECT . This method is the equivalent of the appendChild method of the Node interface if the before parameter is null . It is equivalent to the insertBefore method on the parent of before in all other cases.

Parameters
element:HTMLElement

The element to add.

before:HTMLElement

The element to insert before, or null for the tail of the list.

blurback to summary
public void blur()

Implements org.w3c.dom.html.HTMLSelectElement.blur.

Doc from org.w3c.dom.html.HTMLSelectElement.blur.

Removes keyboard focus from this element.

cloneNodeback to summary
public Node cloneNode(boolean deep)

Overrides org.apache.xerces.dom.ElementImpl.cloneNode.

Implements org.w3c.dom.Node.cloneNode.

Explicit implementation of cloneNode() to ensure that cache used for getOptions() gets cleared.

Parameters
deep:boolean

Doc from org.w3c.dom.Node.cloneNode.

If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).

Returns:Node

Doc from org.w3c.dom.Node.cloneNode.

The duplicate node.

focusback to summary
public void focus()

Implements org.w3c.dom.html.HTMLSelectElement.focus.

Doc from org.w3c.dom.html.HTMLSelectElement.focus.

Gives keyboard focus to this element.

getChildNodesback to summary
public NodeList getChildNodes()

Overrides org.apache.xerces.dom.ParentNode.getChildNodes.

Implements org.w3c.dom.Node.getChildNodes.

Explicit implementation of getChildNodes() to avoid problems with overriding the getLength() method hidden in the super class.

getDisabledback to summary
public boolean getDisabled()

Implements org.w3c.dom.html.HTMLSelectElement.getDisabled.

Doc from org.w3c.dom.html.HTMLSelectElement.getDisabled.

The control is unavailable in this context. See the disabled attribute definition in HTML 4.0.

getLengthback to summary
public int getLength()

Overrides org.apache.xerces.dom.ParentNode.getLength.

Implements org.w3c.dom.html.HTMLSelectElement.getLength, org.w3c.dom.NodeList.getLength.

Doc from org.w3c.dom.html.HTMLSelectElement.getLength.

The number of options in this SELECT .

Returns:int

Doc from org.apache.xerces.dom.ParentNode.getLength.

int

getMultipleback to summary
public boolean getMultiple()

Implements org.w3c.dom.html.HTMLSelectElement.getMultiple.

Doc from org.w3c.dom.html.HTMLSelectElement.getMultiple.

If true, multiple OPTION elements may be selected in this SELECT . See the multiple attribute definition in HTML 4.0.

getNameback to summary
public String getName()

Implements org.w3c.dom.html.HTMLSelectElement.getName.

Doc from org.w3c.dom.html.HTMLSelectElement.getName.

Form control or object name when submitted with a form. See the name attribute definition in HTML 4.0.

getOptionsback to summary
public HTMLCollection getOptions()

Implements org.w3c.dom.html.HTMLSelectElement.getOptions.

Doc from org.w3c.dom.html.HTMLSelectElement.getOptions.

The collection of OPTION elements contained by this element.

getSelectedIndexback to summary
public int getSelectedIndex()

Implements org.w3c.dom.html.HTMLSelectElement.getSelectedIndex.

Doc from org.w3c.dom.html.HTMLSelectElement.getSelectedIndex.

The ordinal index of the selected option, starting from 0. The value -1 is returned if no element is selected. If multiple options are selected, the index of the first selected option is returned.

getSizeback to summary
public int getSize()

Implements org.w3c.dom.html.HTMLSelectElement.getSize.

Doc from org.w3c.dom.html.HTMLSelectElement.getSize.

Number of visible rows. See the size attribute definition in HTML 4.0.

getTabIndexback to summary
public int getTabIndex()

Implements org.w3c.dom.html.HTMLSelectElement.getTabIndex.

Doc from org.w3c.dom.html.HTMLSelectElement.getTabIndex.

Index that represents the element's position in the tabbing order. See the tabindex attribute definition in HTML 4.0.

getTypeback to summary
public String getType()

Implements org.w3c.dom.html.HTMLSelectElement.getType.

Doc from org.w3c.dom.html.HTMLSelectElement.getType.

The type of this form control. This is the string "select-multiple" when the multiple attribute is true and the string "select-one" when false .

getValueback to summary
public String getValue()

Implements org.w3c.dom.html.HTMLSelectElement.getValue.

Doc from org.w3c.dom.html.HTMLSelectElement.getValue.

The current form control value.

removeback to summary
public void remove(int index)

Implements org.w3c.dom.html.HTMLSelectElement.remove.

Doc from org.w3c.dom.html.HTMLSelectElement.remove.

Remove an element from the collection of OPTION elements for this SELECT . Does nothing if no element has the given index.

Parameters
index:int

The index of the item to remove, starting from 0.

setDisabledback to summary
public void setDisabled(boolean disabled)

Implements org.w3c.dom.html.HTMLSelectElement.setDisabled.

setMultipleback to summary
public void setMultiple(boolean multiple)

Implements org.w3c.dom.html.HTMLSelectElement.setMultiple.

setNameback to summary
public void setName(String name)

Implements org.w3c.dom.html.HTMLSelectElement.setName.

setSelectedIndexback to summary
public void setSelectedIndex(int selectedIndex)

Implements org.w3c.dom.html.HTMLSelectElement.setSelectedIndex.

setSizeback to summary
public void setSize(int size)

Implements org.w3c.dom.html.HTMLSelectElement.setSize.

setTabIndexback to summary
public void setTabIndex(int tabIndex)

Implements org.w3c.dom.html.HTMLSelectElement.setTabIndex.

setValueback to summary
public void setValue(String value)

Implements org.w3c.dom.html.HTMLSelectElement.setValue.