com.gargoylesoftware.htmlunit.javascript.host
Class HTMLSelectElement

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.NodeImpl
              extended by com.gargoylesoftware.htmlunit.javascript.host.HTMLElement
                  extended by com.gargoylesoftware.htmlunit.javascript.host.FocusableHostElement
                      extended by com.gargoylesoftware.htmlunit.javascript.host.FormField
                          extended by com.gargoylesoftware.htmlunit.javascript.host.HTMLSelectElement
All Implemented Interfaces:
ScriptableWithFallbackGetter, java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class HTMLSelectElement
extends FormField

The javascript object for HtmlSelect.

Version:
$Revision: 1.3 $
Author:
Mike Bowler, David K. Taylor, Marc Guillemot, Chris Erskine, Ahmed Ashour
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
HTMLSelectElement()
 Create an instance.
 
Method Summary
 java.lang.Object get(int index, org.mozilla.javascript.Scriptable start)
 Return the specified indexed property
 void initialize()
 Initialize the object.
 void jsConstructor()
 Javascript constructor.
 void jsxFunction_add(Option newOptionObject, java.lang.Object arg2)
 Add a new item to the list (optionally) before the specified item
 void jsxFunction_remove(int index)
 Remove option at the specified index
 int jsxGet_length()
 Return the value of the "length" property
 HTMLOptionsCollection jsxGet_options()
 Return the value of the "options" property
 int jsxGet_selectedIndex()
 Return the value of the "selectedIndex" property
 java.lang.String jsxGet_type()
 Return the type of this input.
 java.lang.String jsxGet_value()
 Return the actual value of the selected Option
 void jsxSet_length(int newLength)
 Remove options by reducing the "length" property
 void jsxSet_selectedIndex(int index)
 Set the value of the "selectedIndex" property
 void jsxSet_value(java.lang.String newValue)
 Selects the option with the specified value
 void put(int index, org.mozilla.javascript.Scriptable start, java.lang.Object newValue)
 Set the index property
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.FormField
jsxFunction_click, jsxFunction_select, jsxGet_disabled, jsxGet_form, jsxGet_name, jsxGet_onchange, jsxGet_tabindex, jsxSet_disabled, jsxSet_name, jsxSet_onchange, setDomNode
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.FocusableHostElement
jsxFunction_blur, jsxFunction_focus
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.HTMLElement
addComponentRequest, clearComponentRequest, compareVersions, doComponentRequest, getAvailHeight, getAvailWidth, getBufferDepth, getColorDepth, getComponentVersion, getConnectionType, getCookieEnabled, getCpuClass, getHeight, getJavaEnabled, getPlatform, getSystemLanguage, getUserLanguage, getWidth, getWithFallback, isComponentInstalled, isHomePage, jsxFunction_addBehavior, jsxFunction_getAttribute, jsxFunction_getAttributeNode, jsxFunction_getBoundingClientRect, jsxFunction_getClientRects, jsxFunction_getElementsByTagName, jsxFunction_insertAdjacentElement, jsxFunction_insertAdjacentHTML, jsxFunction_removeAttribute, jsxFunction_removeBehavior, jsxFunction_scrollIntoView, jsxFunction_setAttribute, jsxFunction_setAttributeNode, jsxGet_all, jsxGet_children, jsxGet_className, jsxGet_currentStyle, jsxGet_id, jsxGet_innerHTML, jsxGet_innerText, jsxGet_localName, jsxGet_namespaceURI, jsxGet_offsetHeight, jsxGet_offsetLeft, jsxGet_offsetParent, jsxGet_offsetTop, jsxGet_offsetWidth, jsxGet_onblur, jsxGet_onclick, jsxGet_oncontextmenu, jsxGet_ondblclick, jsxGet_onfocus, jsxGet_onkeydown, jsxGet_onkeypress, jsxGet_onkeyup, jsxGet_onmousedown, jsxGet_onmousemove, jsxGet_onmouseout, jsxGet_onmouseover, jsxGet_onmouseup, jsxGet_onresize, jsxGet_outerHTML, jsxGet_ownerDocument, jsxGet_parentElement, jsxGet_prefix, jsxGet_runtimeStyle, jsxGet_scrollHeight, jsxGet_scrollLeft, jsxGet_scrollTop, jsxGet_scrollWidth, jsxGet_style, jsxGet_tagName, jsxGet_title, jsxSet_className, jsxSet_id, jsxSet_innerHTML, jsxSet_innerText, jsxSet_onblur, jsxSet_onclick, jsxSet_oncontextmenu, jsxSet_ondblclick, jsxSet_onfocus, jsxSet_onkeydown, jsxSet_onkeypress, jsxSet_onkeyup, jsxSet_onmousedown, jsxSet_onmousemove, jsxSet_onmouseout, jsxSet_onmouseover, jsxSet_onmouseup, jsxSet_onresize, jsxSet_outerHTML, jsxSet_scrollLeft, jsxSet_scrollTop, jsxSet_title, navigateHomePage, setHomePage, startDownload, toString
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.NodeImpl
executeEvent, fireEvent, getEventHandler, jsxFunction_addEventListener, jsxFunction_appendChild, jsxFunction_attachEvent, jsxFunction_cloneNode, jsxFunction_detachEvent, jsxFunction_hasChildNodes, jsxFunction_insertBefore, jsxFunction_isSameNode, jsxFunction_removeChild, jsxFunction_removeEventListener, jsxFunction_replaceChild, jsxGet_childNodes, jsxGet_firstChild, jsxGet_lastChild, jsxGet_nextSibling, jsxGet_nodeName, jsxGet_nodeType, jsxGet_nodeValue, jsxGet_parentNode, jsxGet_previousSibling, jsxSet_nodeValue, setEventHandler
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
get, getBooleanArg, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getHtmlElementOrDie, getHtmlElementOrNull, getIntArg, getObjectArg, getStringArg, makeScriptableFor, setHtmlElement
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mozilla.javascript.Scriptable
delete, delete, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, put, setParentScope, setPrototype
 

Constructor Detail

HTMLSelectElement

public HTMLSelectElement()
Create an instance.

Method Detail

get

public java.lang.Object get(int index,
                            org.mozilla.javascript.Scriptable start)
Return the specified indexed property

Specified by:
get in interface org.mozilla.javascript.Scriptable
Overrides:
get in class org.mozilla.javascript.ScriptableObject
Parameters:
index - The index of the property
start - The scriptable object that was originally queried for this property
Returns:
The property.

initialize

public void initialize()
Initialize the object.


jsConstructor

public void jsConstructor()
Javascript constructor. This must be declared in every javascript file because the rhino engine won't walk up the hierarchy looking for constructors.


jsxFunction_add

public void jsxFunction_add(Option newOptionObject,
                            java.lang.Object arg2)
Add a new item to the list (optionally) before the specified item

Parameters:
newOptionObject - The DomNode to insert
arg2 - 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)

jsxFunction_remove

public void jsxFunction_remove(int index)
Remove option at the specified index

Parameters:
index - The index of the item to remove

jsxGet_length

public int jsxGet_length()
Return the value of the "length" property

Returns:
The length property

jsxGet_options

public HTMLOptionsCollection jsxGet_options()
Return the value of the "options" property

Returns:
The options property

jsxGet_selectedIndex

public int jsxGet_selectedIndex()
Return the value of the "selectedIndex" property

Returns:
The selectedIndex property

jsxGet_type

public java.lang.String jsxGet_type()
Return the type of this input.

Overrides:
jsxGet_type in class FormField
Returns:
The type

jsxGet_value

public java.lang.String jsxGet_value()
Return the actual value of the selected Option

Overrides:
jsxGet_value in class FormField
Returns:
The value

jsxSet_length

public void jsxSet_length(int newLength)
Remove options by reducing the "length" property

Parameters:
newLength - The new length property value

jsxSet_selectedIndex

public void jsxSet_selectedIndex(int index)
Set the value of the "selectedIndex" property

Parameters:
index - The new value

jsxSet_value

public void jsxSet_value(java.lang.String newValue)
Selects the option with the specified value

Overrides:
jsxSet_value in class FormField
Parameters:
newValue - The value of the option to select

put

public void put(int index,
                org.mozilla.javascript.Scriptable start,
                java.lang.Object newValue)
Set the index property

Specified by:
put in interface org.mozilla.javascript.Scriptable
Overrides:
put in class org.mozilla.javascript.ScriptableObject
Parameters:
index - The index
start - The scriptable object that was originally invoked for this property
newValue - The new value


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.