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.NativeJavaObject
A class that wraps anEventTarget
instance to expose it in the Rhino engine. Then callingaddEventListener
with a Rhino function as parameter should redirect the call toaddEventListener
with 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 ahandleEvent
method.- 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 class
EventTargetWrapper.FunctionAddNSProxy
(package private) static class
EventTargetWrapper.FunctionAddProxy
This function proxy is delegating most of the job to the underlying NativeJavaMethod object through the FunctionProxy.(package private) static class
EventTargetWrapper.FunctionEventListener
The Java function object calling the Rhino function.(package private) static class
EventTargetWrapper.FunctionProxy
(package private) static class
EventTargetWrapper.FunctionRemoveNSProxy
(package private) static class
EventTargetWrapper.FunctionRemoveProxy
(package private) static class
EventTargetWrapper.HandleEventListener
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ADD_NAME
static java.lang.String
ADDNS_NAME
protected RhinoInterpreter
interpreter
protected static java.util.WeakHashMap
mapOfListenerMap
static java.lang.String
REMOVE_NAME
static java.lang.String
REMOVENS_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.Object
get(java.lang.String name, org.mozilla.javascript.Scriptable start)
Overriden Rhino method.java.util.Map
initMap()
-
-
-
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:
get
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
get
in classorg.mozilla.javascript.NativeJavaObject
-
initMap
public java.util.Map initMap()
-
-