com.meterware.httpunit.javascript
Class JavaScript.Option

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by com.meterware.httpunit.javascript.ScriptingEngineImpl
          extended by com.meterware.httpunit.javascript.JavaScript.Option
All Implemented Interfaces:
ScriptingEngine, ScriptingEventHandler, ScriptingHandler, java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable
Enclosing class:
JavaScript

public static class JavaScript.Option
extends ScriptingEngineImpl

See Also:
Serialized Form

Field Summary
protected  com.meterware.httpunit.javascript.JavaScript.JavaScriptEngine _parent
           
protected  ScriptableDelegate _scriptable
           
 
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
JavaScript.Option()
           
 
Method Summary
 void clearCaches()
          Clears any cached values, permitting them to be recomputed as needed.
 java.lang.Object get(int i, org.mozilla.javascript.Scriptable scriptable)
           
 java.lang.Object get(java.lang.String propertyName, org.mozilla.javascript.Scriptable scriptable)
           
 java.lang.String getClassName()
           
 boolean handleEvent(java.lang.String eventName)
          get the event Handler script for the event e.g.
 boolean has(java.lang.String propertyName, org.mozilla.javascript.Scriptable scriptable)
           
 void jsConstructor(java.lang.String text, java.lang.String value, boolean defaultSelected, boolean selected)
           
 boolean jsGet_defaultSelected()
           
 int jsGet_index()
           
 boolean jsGet_selected()
           
 java.lang.String jsGet_text()
           
 java.lang.String jsGet_value()
           
 void jsSet_selected(boolean selected)
           
 void jsSet_text(java.lang.String text)
           
 void jsSet_value(java.lang.String value)
           
 ScriptingEngine newScriptingEngine(ScriptableDelegate child)
          Returns a new scripting engine for the specified delegate.
 void put(java.lang.String propertyName, org.mozilla.javascript.Scriptable scriptable, java.lang.Object value)
           
protected  JavaScript.ElementArray toElementArray(ScriptingHandler[] scriptables)
           
 java.lang.String toString()
           
protected static java.lang.String toStringIfNotUndefined(java.lang.Object object)
           
 
Methods inherited from class com.meterware.httpunit.javascript.ScriptingEngineImpl
clearErrorMessages, discardDocumentWriteBuffer, doEvent, doEventScript, evaluateExpression, getDocumentWriteBuffer, getErrorMessages, handleScriptException, runScript, supportsScriptLanguage
 
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, equivalentValues, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, hasInstance, hasProperty, hasProperty, isConst, isGetterOrSetter, isSealed, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_scriptable

protected ScriptableDelegate _scriptable

_parent

protected com.meterware.httpunit.javascript.JavaScript.JavaScriptEngine _parent
Constructor Detail

JavaScript.Option

public JavaScript.Option()
Method Detail

getClassName

public java.lang.String getClassName()
Specified by:
getClassName in interface org.mozilla.javascript.Scriptable
Specified by:
getClassName in class org.mozilla.javascript.ScriptableObject

jsConstructor

public void jsConstructor(java.lang.String text,
                          java.lang.String value,
                          boolean defaultSelected,
                          boolean selected)

jsGet_index

public int jsGet_index()

jsGet_text

public java.lang.String jsGet_text()

jsSet_text

public void jsSet_text(java.lang.String text)

jsGet_value

public java.lang.String jsGet_value()

jsSet_value

public void jsSet_value(java.lang.String value)

jsGet_selected

public boolean jsGet_selected()

jsSet_selected

public void jsSet_selected(boolean selected)

jsGet_defaultSelected

public boolean jsGet_defaultSelected()

handleEvent

public boolean handleEvent(java.lang.String eventName)
get the event Handler script for the event e.g. onchange, onmousedown, onclick, onmouseup execute the script if it's assigned by calling doEvent for the script

Specified by:
handleEvent in interface ScriptingEventHandler
Overrides:
handleEvent in class ScriptingEngineImpl
Parameters:
eventName -
Returns:

has

public boolean has(java.lang.String propertyName,
                   org.mozilla.javascript.Scriptable scriptable)
Specified by:
has in interface org.mozilla.javascript.Scriptable
Overrides:
has in class org.mozilla.javascript.ScriptableObject

get

public java.lang.Object get(java.lang.String propertyName,
                            org.mozilla.javascript.Scriptable scriptable)
Specified by:
get in interface org.mozilla.javascript.Scriptable
Overrides:
get in class org.mozilla.javascript.ScriptableObject

get

public java.lang.Object get(int i,
                            org.mozilla.javascript.Scriptable scriptable)
Specified by:
get in interface org.mozilla.javascript.Scriptable
Overrides:
get in class org.mozilla.javascript.ScriptableObject

put

public void put(java.lang.String propertyName,
                org.mozilla.javascript.Scriptable scriptable,
                java.lang.Object value)
Specified by:
put in interface org.mozilla.javascript.Scriptable
Overrides:
put in class org.mozilla.javascript.ScriptableObject

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

newScriptingEngine

public ScriptingEngine newScriptingEngine(ScriptableDelegate child)
Description copied from interface: ScriptingEngine
Returns a new scripting engine for the specified delegate.


clearCaches

public void clearCaches()
Description copied from interface: ScriptingEngine
Clears any cached values, permitting them to be recomputed as needed.


toStringIfNotUndefined

protected static java.lang.String toStringIfNotUndefined(java.lang.Object object)

toElementArray

protected JavaScript.ElementArray toElementArray(ScriptingHandler[] scriptables)


Copyright © 2011. All Rights Reserved.