|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.htmlunit.corejs.javascript.ScriptableObject
com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
com.gargoylesoftware.htmlunit.javascript.host.Node
com.gargoylesoftware.htmlunit.javascript.host.EventNode
com.gargoylesoftware.htmlunit.javascript.host.Element
com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
com.gargoylesoftware.htmlunit.javascript.host.FormChild
com.gargoylesoftware.htmlunit.javascript.host.FormField
com.gargoylesoftware.htmlunit.javascript.host.html.HTMLSelectElement
public class HTMLSelectElement
The JavaScript object for HtmlSelect.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement |
|---|
HTMLElement.ProxyDomNode |
| Field Summary |
|---|
| Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement |
|---|
BEHAVIOR_ID_CLIENT_CAPS, BEHAVIOR_ID_DOWNLOAD, BEHAVIOR_ID_HOMEPAGE |
| Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.Node |
|---|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject |
|---|
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST |
| Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable |
|---|
NOT_FOUND |
| Constructor Summary | |
|---|---|
HTMLSelectElement()
|
|
| Method Summary | |
|---|---|
protected void |
add_FF(HTMLOptionElement newOptionObject,
Object beforeOptionObject)
Adds a new item to the list (optionally) before the specified item in Firefox way. |
protected void |
add_IE(HTMLOptionElement newOptionObject,
Object index)
Adds a new item to the list (optionally) at the specified index in IE way. |
void |
add(HTMLOptionElement newOptionObject,
Object arg2)
Adds a new item to the list (optionally) before the specified item. |
protected void |
addBefore(HTMLOptionElement newOptionObject,
HtmlOption beforeOption)
Adds the option (and create the associated DOM node if needed) before the specified one or at the end if the specified one in null. |
Object |
appendChild(Object childObject)
Adds a DOM node to the node. |
Object |
get(int index,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
Returns the specified indexed property. |
String |
getDefaultStyleDisplay()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. Returns the default display style. |
int |
getLength()
Returns the value of the "length" property. |
boolean |
getMultiple()
Returns true if the multiple attribute is set. |
HTMLOptionsCollection |
getOptions()
Returns the value of the "options" property. |
int |
getSelectedIndex()
Returns the value of the "selectedIndex" property. |
int |
getSize()
Returns the size attribute. |
String |
getType()
Returns the type of this input. |
String |
getValue()
Returns the actual value of the selected Option. |
void |
initialize()
Initialize the object. |
Object |
insertBeforeImpl(Object[] args)
Add a DOM node as a child to this node before the referenced node. |
HTMLOptionElement |
item(int index)
Gets the item at the specified index. |
void |
put(int index,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start,
Object newValue)
Sets the index property. |
void |
remove(int index)
Removes option at the specified index. |
void |
setLength(int newLength)
Removes options by reducing the "length" property. |
void |
setMultiple(boolean multiple)
Sets or clears the multiple attribute. |
void |
setSelectedIndex(int index)
Sets the value of the "selectedIndex" property. |
void |
setSize(String size)
Sets the size attribute. |
void |
setValue(String newValue)
Selects the option with the specified value. |
| Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.FormField |
|---|
getDisabled, getName, getOnchange, setDisabled, setDomNode, setName, setOnchange |
| Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.FormChild |
|---|
getForm |
| Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Element |
|---|
createAttributesObject, getAttributeNS, getAttributes, getBaseURI, getChildElementCount, getCurrentStyle, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getLastElementChild, getNextElementSibling, getPreviousElementSibling, getRuntimeStyle, getStyle, getText, hasAttributeNS, removeAttribute, removeAttributeNS, selectNodes, selectSingleNode, setAttributeNS, setDefaults |
| Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.EventNode |
|---|
fireEvent, getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnerror, getOnfocus, getOnfocusin, getOnfocusout, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnpropertychange, getOnresize, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnerror, setOnfocus, setOnfocusin, setOnfocusout, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnpropertychange, setOnresize |
| Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Node |
|---|
addEventListener, attachEvent, cloneNode, compareDocumentPosition, contains, detachEvent, executeEvent, fireEvent, fireEvent, getBaseName, getChildNodes, getEventHandler, getEventHandlerProp, getFirstChild, getJavaScriptNode, getLastChild, getNextSibling, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getTextContent, getXml, hasChildNodes, hasEventHandlers, insertBefore, isSameNode, normalize, removeChild, removeEventListener, replaceChild, setEventHandler, setEventHandlerProp, setNodeValue |
| Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable |
|---|
clone, defineFunctionProperties, defineProperty, equivalentValues, getBrowserVersion, getClassName, getDefaultValue, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setHtmlElement, setParentScope |
| Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject |
|---|
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setPrototype, size |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable |
|---|
delete, delete, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, put, setParentScope, setPrototype |
| Constructor Detail |
|---|
public HTMLSelectElement()
| Method Detail |
|---|
public void initialize()
public void remove(int index)
index - the index of the item to remove
public void add(HTMLOptionElement newOptionObject,
Object arg2)
newOptionObject - the DomNode to insertarg2 - for Firefox: the DomNode to insert the previous element before (null if at end),
for Internet Explorer: the index where the element should be placed (optional).public Object appendChild(Object childObject)
appendChild in class NodechildObject - the node to add to this node
public Object insertBeforeImpl(Object[] args)
insertBeforeImpl in class Nodeargs - the arguments
public HTMLOptionElement item(int index)
index - the position of the option to retrieve
protected void add_IE(HTMLOptionElement newOptionObject,
Object index)
newOptionObject - the DomNode to insertindex - (optional) the index where the node should be inserted
protected void add_FF(HTMLOptionElement newOptionObject,
Object beforeOptionObject)
newOptionObject - the DomNode to insertbeforeOptionObject - the DomNode to insert the previous element before (null if at end)
protected void addBefore(HTMLOptionElement newOptionObject,
HtmlOption beforeOption)
newOptionObject - the new option to addbeforeOption - the option that should be after the option to addpublic String getType()
getType in class FormFieldpublic HTMLOptionsCollection getOptions()
public int getSelectedIndex()
public void setSelectedIndex(int index)
index - the new valuepublic String getValue()
getValue in class FormFieldpublic int getLength()
public void setLength(int newLength)
newLength - the new length property value
public Object get(int index,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
get in interface net.sourceforge.htmlunit.corejs.javascript.Scriptableget in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObjectindex - the index of the propertystart - the scriptable object that was originally queried for this property
public void put(int index,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start,
Object newValue)
put in interface net.sourceforge.htmlunit.corejs.javascript.Scriptableput in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObjectindex - the indexstart - the scriptable object that was originally invoked for this propertynewValue - the new valuepublic void setValue(String newValue)
setValue in class FormFieldnewValue - the value of the option to selectpublic int getSize()
public void setSize(String size)
size - the size attributepublic boolean getMultiple()
public void setMultiple(boolean multiple)
multiple - true to set the multiple attribute, false to clear itpublic String getDefaultStyleDisplay()
getDefaultStyleDisplay in class Element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||