Package org.apache.batik.bridge
Class EventTargetWrapper
- java.lang.Object
-
- org.mozilla.javascript.NativeJavaObject
-
- org.apache.batik.bridge.EventTargetWrapper
-
- All Implemented Interfaces:
java.io.Serializable,org.mozilla.javascript.Scriptable,org.mozilla.javascript.Wrapper
class EventTargetWrapper extends org.mozilla.javascript.NativeJavaObjectA class that wraps anEventTargetinstance to expose it in the Rhino engine. Then callingaddEventListenerwith a Rhino function as parameter should redirect the call toaddEventListenerwith a Java function object calling the Rhino function. This class also allows to pass an ECMAScript (Rhino) object as a parameter instead of a function provided the fact that this object has ahandleEventmethod.- Version:
- $Id: EventTargetWrapper.java 1803263 2017-07-28 10:51:01Z ssteiner $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classEventTargetWrapper.FunctionAddNSProxy(package private) static classEventTargetWrapper.FunctionAddProxyThis function proxy is delegating most of the job to the underlying NativeJavaMethod object through the FunctionProxy.(package private) static classEventTargetWrapper.FunctionEventListenerThe Java function object calling the Rhino function.(package private) static classEventTargetWrapper.FunctionProxy(package private) static classEventTargetWrapper.FunctionRemoveNSProxy(package private) static classEventTargetWrapper.FunctionRemoveProxy(package private) static classEventTargetWrapper.HandleEventListener
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringADD_NAMEstatic java.lang.StringADDNS_NAMEprotected RhinoInterpreterinterpreterprotected static java.util.WeakHashMapmapOfListenerMapstatic java.lang.StringREMOVE_NAMEstatic java.lang.StringREMOVENS_NAME
-
Constructor Summary
Constructors Constructor Description EventTargetWrapper(org.mozilla.javascript.Scriptable scope, org.w3c.dom.events.EventTarget object, RhinoInterpreter interpreter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectget(java.lang.String name, org.mozilla.javascript.Scriptable start)Overriden Rhino method.java.util.MapinitMap()
-
-
-
Field Detail
-
mapOfListenerMap
protected static java.util.WeakHashMap mapOfListenerMap
-
ADD_NAME
public static final java.lang.String ADD_NAME
- See Also:
- Constant Field Values
-
ADDNS_NAME
public static final java.lang.String ADDNS_NAME
- See Also:
- Constant Field Values
-
REMOVE_NAME
public static final java.lang.String REMOVE_NAME
- See Also:
- Constant Field Values
-
REMOVENS_NAME
public static final java.lang.String REMOVENS_NAME
- See Also:
- Constant Field Values
-
interpreter
protected RhinoInterpreter interpreter
-
-
Constructor Detail
-
EventTargetWrapper
EventTargetWrapper(org.mozilla.javascript.Scriptable scope, org.w3c.dom.events.EventTarget object, RhinoInterpreter interpreter)
-
-
Method Detail
-
get
public java.lang.Object get(java.lang.String name, org.mozilla.javascript.Scriptable start)Overriden Rhino method.- Specified by:
getin interfaceorg.mozilla.javascript.Scriptable- Overrides:
getin classorg.mozilla.javascript.NativeJavaObject
-
initMap
public java.util.Map initMap()
-
-