com.meterware.httpunit
Class WebLink.Scriptable

java.lang.Object
  extended bycom.meterware.httpunit.scripting.ScriptableDelegate
      extended bycom.meterware.httpunit.HTMLElementScriptable
          extended bycom.meterware.httpunit.WebLink.Scriptable
All Implemented Interfaces:
DocumentElement, NamedDelegate, ScriptingEventHandler, ScriptingHandler
Enclosing class:
WebLink

public class WebLink.Scriptable
extends com.meterware.httpunit.HTMLElementScriptable
implements NamedDelegate


Field Summary
 
Fields inherited from class com.meterware.httpunit.scripting.ScriptableDelegate
NULL_SCRIPT_ENGINE
 
Constructor Summary
WebLink.Scriptable()
           
 
Method Summary
protected  HTMLElement get_element()
           
 java.lang.Object get(java.lang.String propertyName)
          get the property with the given name
 java.lang.String getAttribute(java.lang.String attributeName)
          get the content of the given attribute
 java.lang.String getName()
           
 boolean handleEvent(java.lang.String eventName)
          Executes the event Handler script for the specified event (such as onchange, onmousedown, onclick, onmouseup) if it is defined.
 void removeAttribute(java.lang.String attributeName)
          remove the given attribute
 void set(java.lang.String propertyName, java.lang.Object value)
          Sets the value of the named property.
 void setAttribute(java.lang.String attributeName, java.lang.Object value)
          set the attribute with the given attribute name to the given value
 
Methods inherited from class com.meterware.httpunit.scripting.ScriptableDelegate
clearCaches, doEvent, doEventScript, evaluateExpression, get, getDelegates, getScriptEngine, getScriptEngine, runScript, setScriptEngine, supportsScriptLanguage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebLink.Scriptable

public WebLink.Scriptable()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface NamedDelegate

get

public java.lang.Object get(java.lang.String propertyName)
Description copied from class: com.meterware.httpunit.HTMLElementScriptable
get the property with the given name

Parameters:
propertyName - - the name of the property to get

set

public void set(java.lang.String propertyName,
                java.lang.Object value)
Description copied from class: ScriptableDelegate
Sets the value of the named property. Will throw a runtime exception if the property does not exist or cannot accept the specified value.

Overrides:
set in class ScriptableDelegate

get_element

protected HTMLElement get_element()
Returns:
the _element

getAttribute

public java.lang.String getAttribute(java.lang.String attributeName)
get the content of the given attribute

Parameters:
attributeName -
Returns:
the attribute as a string

setAttribute

public void setAttribute(java.lang.String attributeName,
                         java.lang.Object value)
set the attribute with the given attribute name to the given value

Parameters:
attributeName -
value -

removeAttribute

public void removeAttribute(java.lang.String attributeName)
remove the given attribute

Parameters:
attributeName -

handleEvent

public boolean handleEvent(java.lang.String eventName)
Description copied from class: ScriptableDelegate
Executes the event Handler script for the specified event (such as onchange, onmousedown, onclick, onmouseup) if it is defined.

Specified by:
handleEvent in interface ScriptingEventHandler
Overrides:
handleEvent in class ScriptableDelegate
Parameters:
eventName - the name of the event for which a handler should be run.
Returns:
whether the event with the given name was handled

Copyright © 2000-2008 Russell Gold. See license agreement for rights granted.