|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.javascript.ScriptableObject
com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
com.gargoylesoftware.htmlunit.javascript.host.Event
public class Event
JavaScript object representing an Event that is passed into Event Handlers when they are invoked. For general information on which properties and functions should be supported, see the mozilla docs or the W3C DOM Level 2 Event Documentation.
Field Summary | |
---|---|
static java.lang.String |
TYPE_BLUR
The blur event type, triggered by "onblur" event handlers. |
static java.lang.String |
TYPE_CHANGE
The change event type, triggered by "onchange" event handlers. |
static java.lang.String |
TYPE_FOCUS
The focus event type, triggered by "onfocus" event handlers. |
static java.lang.String |
TYPE_KEY_DOWN
The key down event type, triggered by "onkeydown" event handlers. |
static java.lang.String |
TYPE_LOAD
The load event type, triggered by "onload" event handlers. |
static java.lang.String |
TYPE_RESET
The submit event type, triggered by "onreset" event handlers. |
static java.lang.String |
TYPE_SUBMIT
The submit event type, triggered by "onsubmit" event handlers. |
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 | |
---|---|
Event()
Used to build the prototype |
|
Event(DomNode domNode,
java.lang.String type)
Creates a new event instance. |
|
Event(DomNode domNode,
java.lang.String type,
boolean shiftKey,
boolean ctrlKey,
boolean altKey)
Creates a new event instance. |
|
Event(DomNode domNode,
java.lang.String type,
int keyCode,
boolean shiftKey,
boolean ctrlKey,
boolean altKey)
Creates a new event instance for a keypress event. |
Method Summary | |
---|---|
boolean |
isPropagationStopped()
Indicates if event propagation is stopped. |
void |
jsxFunction_stopPropagation()
Stops the event from propagating. |
boolean |
jsxGet_altKey()
|
boolean |
jsxGet_cancelBubble()
|
boolean |
jsxGet_ctrlKey()
|
java.lang.Object |
jsxGet_currentTarget()
Returns the event target whose event listeners are currently being processed. |
java.lang.Object |
jsxGet_keyCode()
Returns the key code associated with the event. |
boolean |
jsxGet_shiftKey()
|
java.lang.Object |
jsxGet_srcElement()
Returns the object that fired the event. |
java.lang.Object |
jsxGet_target()
Returns the event target to which the event was originally dispatched. |
java.lang.String |
jsxGet_type()
Returns the event type. |
void |
jsxSet_cancelBubble(boolean newValue)
|
void |
jsxSet_srcElement(java.lang.Object srcElement)
Sets the object that fired the event. |
void |
setCurrentTarget(org.mozilla.javascript.Scriptable target)
Sets the current target |
void |
setEventType(java.lang.String eventType)
Sets the event type. |
java.lang.String |
toString()
|
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable |
---|
get, getBooleanArg, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getHtmlElementOrDie, getHtmlElementOrNull, getIntArg, getObjectArg, getStringArg, makeScriptableFor, setDomNode, 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, get, 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, 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 |
Field Detail |
---|
public static final java.lang.String TYPE_BLUR
public static final java.lang.String TYPE_CHANGE
public static final java.lang.String TYPE_FOCUS
public static final java.lang.String TYPE_KEY_DOWN
public static final java.lang.String TYPE_LOAD
public static final java.lang.String TYPE_RESET
public static final java.lang.String TYPE_SUBMIT
Constructor Detail |
---|
public Event()
public Event(DomNode domNode, java.lang.String type)
domNode
- The DOM node that triggered the event.type
- The event type.public Event(DomNode domNode, java.lang.String type, boolean shiftKey, boolean ctrlKey, boolean altKey)
domNode
- The DOM node that triggered the event.type
- The event type.shiftKey
- true if SHIFT is pressedctrlKey
- true if CTRL is pressedaltKey
- true if ALT is pressedpublic Event(DomNode domNode, java.lang.String type, int keyCode, boolean shiftKey, boolean ctrlKey, boolean altKey)
domNode
- the DOM node that triggered the event.type
- The event type.keyCode
- The key code associated with the event.shiftKey
- true if SHIFT is pressedctrlKey
- true if CTRL is pressedaltKey
- true if ALT is pressedMethod Detail |
---|
public boolean isPropagationStopped()
public void jsxFunction_stopPropagation()
public boolean jsxGet_altKey()
public boolean jsxGet_cancelBubble()
public boolean jsxGet_ctrlKey()
public java.lang.Object jsxGet_currentTarget()
public java.lang.Object jsxGet_keyCode()
public boolean jsxGet_shiftKey()
public java.lang.Object jsxGet_srcElement()
public java.lang.Object jsxGet_target()
public java.lang.String jsxGet_type()
public void jsxSet_cancelBubble(boolean newValue)
newValue
- indicates if event propagation is stopped.public void jsxSet_srcElement(java.lang.Object srcElement)
srcElement
- The object that fired the event.public void setCurrentTarget(org.mozilla.javascript.Scriptable target)
target
- the new valuepublic void setEventType(java.lang.String eventType)
eventType
- The event type.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |