com.gargoylesoftware.htmlunit.javascript.host
Class EventNode

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.Node
              extended by com.gargoylesoftware.htmlunit.javascript.host.EventNode
All Implemented Interfaces:
Serializable, Cloneable, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable
Direct Known Subclasses:
Document, Element

public class EventNode
extends Node

A node which supports all of the onXXX event handlers and other event-related functions. Basically contains any event-related features that both elements and the document support.

Version:
$Revision: 7429 $
Author:
Daniel Gredler, Ahmed Ashour
See Also:
Serialized Form

Field Summary
 
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
EventNode()
           
 
Method Summary
 boolean fireEvent(String type, Event event)
          Fires a specified event on this element (IE only).
 Object getOnblur()
          Returns the onblur event handler for this element.
 Object getOnclick()
          Returns the onclick event handler for this element.
 Object getOncontextmenu()
          Returns the oncontextmenu event handler for this element.
 Object getOndblclick()
          Returns the ondblclick event handler for this element.
 Object getOnerror()
          Returns the onerror event handler for this element.
 Object getOnfocus()
          Returns the onfocus event handler for this element.
 Object getOnfocusin()
          Returns the onfocusin event handler for this element.
 Object getOnfocusout()
          Returns the onfocusout event handler for this element.
 Object getOnkeydown()
          Returns the onkeydown event handler for this element.
 Object getOnkeypress()
          Returns the onkeypress event handler for this element.
 Object getOnkeyup()
          Returns the onkeyup event handler for this element.
 Object getOnmousedown()
          Returns the onmousedown event handler for this element.
 Object getOnmousemove()
          Returns the onmousemove event handler for this element.
 Object getOnmouseout()
          Returns the onmouseout event handler for this element.
 Object getOnmouseover()
          Returns the onmouseover event handler for this element.
 Object getOnmouseup()
          Returns the onmouseup event handler for this element.
 Object getOnpropertychange()
          Returns the onpropertychange event handler for this element.
 Object getOnresize()
          Returns the onresize event handler for this element.
 void setOnblur(Object handler)
          Sets the onblur event handler for this element.
 void setOnclick(Object handler)
          Sets the onclick event handler for this element.
 void setOncontextmenu(Object handler)
          Sets the oncontextmenu event handler for this element.
 void setOndblclick(Object handler)
          Sets the ondblclick event handler for this element.
 void setOnerror(Object handler)
          Sets the onerror event handler for this element.
 void setOnfocus(Object handler)
          Sets the onfocus event handler for this element.
 void setOnfocusin(Object handler)
          Sets the onfocusin event handler for this element.
 void setOnfocusout(Object handler)
          Sets the onfocusout event handler for this element.
 void setOnkeydown(Object handler)
          Sets the onkeydown event handler for this element.
 void setOnkeypress(Object handler)
          Sets the onkeypress event handler for this element.
 void setOnkeyup(Object handler)
          Sets the onkeyup event handler for this element.
 void setOnmousedown(Object handler)
          Sets the onmousedown event handler for this element.
 void setOnmousemove(Object handler)
          Sets the onmousemove event handler for this element.
 void setOnmouseout(Object handler)
          Sets the onmouseout event handler for this element.
 void setOnmouseover(Object handler)
          Sets the onmouseover event handler for this element.
 void setOnmouseup(Object handler)
          Sets the onmouseup event handler for this element.
 void setOnpropertychange(Object handler)
          Sets the onpropertychange event handler for this element.
 void setOnresize(Object handler)
          Sets the onresize event handler for this element.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Node
addEventListener, appendChild, attachEvent, cloneNode, compareDocumentPosition, detachEvent, executeEvent, fireEvent, fireEvent, getAttributes, getChildNodes, getEventHandler, getEventHandlerProp, getFirstChild, getJavaScriptNode, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, getTextContent, getXml, hasChildNodes, hasEventHandlers, insertBefore, insertBeforeImpl, isSameNode, normalize, removeChild, removeEventListener, replaceChild, setDomNode, setEventHandler, setEventHandlerProp, setNodeValue, setTextContent
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setHtmlElement
 
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, 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, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventNode

public EventNode()
Method Detail

setOnclick

public void setOnclick(Object handler)
Sets the onclick event handler for this element.

Parameters:
handler - the onclick event handler for this element

getOnclick

public Object getOnclick()
Returns the onclick event handler for this element.

Returns:
the onclick event handler for this element

setOndblclick

public void setOndblclick(Object handler)
Sets the ondblclick event handler for this element.

Parameters:
handler - the ondblclick event handler for this element

getOndblclick

public Object getOndblclick()
Returns the ondblclick event handler for this element.

Returns:
the ondblclick event handler for this element

setOnblur

public void setOnblur(Object handler)
Sets the onblur event handler for this element.

Parameters:
handler - the onblur event handler for this element

getOnblur

public Object getOnblur()
Returns the onblur event handler for this element.

Returns:
the onblur event handler for this element

setOnfocus

public void setOnfocus(Object handler)
Sets the onfocus event handler for this element.

Parameters:
handler - the onfocus event handler for this element

getOnfocus

public Object getOnfocus()
Returns the onfocus event handler for this element.

Returns:
the onfocus event handler for this element

setOnfocusin

public void setOnfocusin(Object handler)
Sets the onfocusin event handler for this element.

Parameters:
handler - the onfocusin event handler for this element

getOnfocusin

public Object getOnfocusin()
Returns the onfocusin event handler for this element.

Returns:
the onfocusin event handler for this element

setOnfocusout

public void setOnfocusout(Object handler)
Sets the onfocusout event handler for this element.

Parameters:
handler - the onfocusout event handler for this element

getOnfocusout

public Object getOnfocusout()
Returns the onfocusout event handler for this element.

Returns:
the onfocusout event handler for this element

setOnkeydown

public void setOnkeydown(Object handler)
Sets the onkeydown event handler for this element.

Parameters:
handler - the onkeydown event handler for this element

getOnkeydown

public Object getOnkeydown()
Returns the onkeydown event handler for this element.

Returns:
the onkeydown event handler for this element

setOnkeypress

public void setOnkeypress(Object handler)
Sets the onkeypress event handler for this element.

Parameters:
handler - the onkeypress event handler for this element

getOnkeypress

public Object getOnkeypress()
Returns the onkeypress event handler for this element.

Returns:
the onkeypress event handler for this element

setOnkeyup

public void setOnkeyup(Object handler)
Sets the onkeyup event handler for this element.

Parameters:
handler - the onkeyup event handler for this element

getOnkeyup

public Object getOnkeyup()
Returns the onkeyup event handler for this element.

Returns:
the onkeyup event handler for this element

setOnmousedown

public void setOnmousedown(Object handler)
Sets the onmousedown event handler for this element.

Parameters:
handler - the onmousedown event handler for this element

getOnmousedown

public Object getOnmousedown()
Returns the onmousedown event handler for this element.

Returns:
the onmousedown event handler for this element

setOnmousemove

public void setOnmousemove(Object handler)
Sets the onmousemove event handler for this element.

Parameters:
handler - the onmousemove event handler for this element

getOnmousemove

public Object getOnmousemove()
Returns the onmousemove event handler for this element.

Returns:
the onmousemove event handler for this element

setOnmouseout

public void setOnmouseout(Object handler)
Sets the onmouseout event handler for this element.

Parameters:
handler - the onmouseout event handler for this element

getOnmouseout

public Object getOnmouseout()
Returns the onmouseout event handler for this element.

Returns:
the onmouseout event handler for this element

setOnmouseover

public void setOnmouseover(Object handler)
Sets the onmouseover event handler for this element.

Parameters:
handler - the onmouseover event handler for this element

getOnmouseover

public Object getOnmouseover()
Returns the onmouseover event handler for this element.

Returns:
the onmouseover event handler for this element

setOnmouseup

public void setOnmouseup(Object handler)
Sets the onmouseup event handler for this element.

Parameters:
handler - the onmouseup event handler for this element

getOnmouseup

public Object getOnmouseup()
Returns the onmouseup event handler for this element.

Returns:
the onmouseup event handler for this element

setOncontextmenu

public void setOncontextmenu(Object handler)
Sets the oncontextmenu event handler for this element.

Parameters:
handler - the oncontextmenu event handler for this element

getOncontextmenu

public Object getOncontextmenu()
Returns the oncontextmenu event handler for this element.

Returns:
the oncontextmenu event handler for this element

setOnresize

public void setOnresize(Object handler)
Sets the onresize event handler for this element.

Parameters:
handler - the onresize event handler for this element

getOnresize

public Object getOnresize()
Returns the onresize event handler for this element.

Returns:
the onresize event handler for this element

setOnpropertychange

public void setOnpropertychange(Object handler)
Sets the onpropertychange event handler for this element.

Parameters:
handler - the onpropertychange event handler for this element

getOnpropertychange

public Object getOnpropertychange()
Returns the onpropertychange event handler for this element.

Returns:
the onpropertychange event handler for this element

setOnerror

public void setOnerror(Object handler)
Sets the onerror event handler for this element.

Parameters:
handler - the onerror event handler for this element

getOnerror

public Object getOnerror()
Returns the onerror event handler for this element.

Returns:
the onerror event handler for this element

fireEvent

public boolean fireEvent(String type,
                         Event event)
Fires a specified event on this element (IE only). See the MSDN documentation for more information.

Parameters:
type - specifies the name of the event to fire.
event - specifies the event object from which to obtain event object properties.
Returns:
true if the event fired successfully, false if it was canceled


Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.