Class ScriptingEnvironment
java.lang.Object
org.apache.batik.bridge.BaseScriptingEnvironment
org.apache.batik.bridge.ScriptingEnvironment
- Direct Known Subclasses:
SVG12ScriptingEnvironment
This class contains the informations needed by the SVG scripting.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classThe listener class for 'DOMNodeInserted' event.protected classThe listener class for 'DOMNodeRemoved' event.protected classTo interpret a script.protected classTo interpret a script.protected classTo call a Runnable.protected classTo handle a scripting event.protected classRepresents the window object of this environment. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EventListenerThe activate event listener.protected EventListenerThe begin event listener.protected EventListenerThe click event listener.protected EventListenerThe DOMAttrModified event listener.protected EventListenerThe DOMNodeInserted event listener.protected EventListenerThe DOMNodeRemoved event listener.protected EventListenerThe end event listener.protected EventListenerThe focusin event listener.protected EventListenerThe focusout event listener.protected EventListenerThe keydown event listener.protected EventListenerThe keypress event listener.protected EventListenerThe keyup event listener.protected EventListener[]protected EventListenerThe mousedown event listener.protected EventListenerThe mousemove event listener.protected EventListenerThe mouseout event listener.protected EventListenerThe mouseover event listener.protected EventListenerThe mouseup event listener.protected EventListenerThe repeat event listener.static final String[]static final String[]protected EventListenerThe SVGAbort event listener.protected EventListenerThe SVGError event listener.protected EventListenerThe SVGResize event listener.protected EventListenerThe SVGScroll event listener.protected EventListenerThe SVGUnload event listener.protected EventListenerThe SVGZoom event listener.protected TimerThe timer for periodic or delayed tasks.protected UpdateManagerThe update manager.protected RunnableQueueThe update runnable queue.Fields inherited from class BaseScriptingEnvironment
ALTERNATE_EVENT_NAME, APPLICATION_ECMASCRIPT, bridgeContext, docPURL, document, EVENT_NAME, EVENT_SCRIPT_DESCRIPTION, executedScripts, INLINE_SCRIPT_DESCRIPTION, interpreter, languages, userAgent, windowObjects -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds DOM listeners to the document.voidaddScriptingListeners(Node node) Adds the scripting listeners to the given element and all of its descendants.protected voidAdds the scripting listeners to the given element.protected WindowcreateWindow(Interpreter interp, String lang) Creates a new Window object.voidInterrupts the periodic tasks and dispose this ScriptingEnvironment.protected voidRemoves DOM listeners from the document.protected voidremoveScriptingListeners(Node node) Removes the scripting listeners from the given element and all of its descendants.protected voidRemoves the scripting listeners from the given element.voidrunEventHandler(String script, Event evt, String lang, String desc) Runs an event handler.protected voidupdateScriptingListeners(Element elt, String attr) Updates the registration of a listener on the given element.Methods inherited from class BaseScriptingEnvironment
checkCompatibleScriptURL, dispatchSVGDocEvent, dispatchSVGLoad, dispatchSVGLoadEvent, dispatchSVGResizeEvent, dispatchSVGScrollEvent, dispatchSVGZoomEvent, getInterpreter, getInterpreter, getWindow, getWindow, handleInterpreterException, handleSecurityException, initializeEnvironment, isDynamicDocument, isDynamicElement, isDynamicElement, loadScript, loadScripts
-
Field Details
-
SVG_EVENT_ATTRS
-
SVG_DOM_EVENT
-
timer
The timer for periodic or delayed tasks. -
updateManager
The update manager. -
updateRunnableQueue
The update runnable queue. -
domNodeInsertedListener
The DOMNodeInserted event listener. -
domNodeRemovedListener
The DOMNodeRemoved event listener. -
domAttrModifiedListener
The DOMAttrModified event listener. -
svgAbortListener
The SVGAbort event listener. -
svgErrorListener
The SVGError event listener. -
svgResizeListener
The SVGResize event listener. -
svgScrollListener
The SVGScroll event listener. -
svgUnloadListener
The SVGUnload event listener. -
svgZoomListener
The SVGZoom event listener. -
beginListener
The begin event listener. -
endListener
The end event listener. -
repeatListener
The repeat event listener. -
focusinListener
The focusin event listener. -
focusoutListener
The focusout event listener. -
activateListener
The activate event listener. -
clickListener
The click event listener. -
mousedownListener
The mousedown event listener. -
mouseupListener
The mouseup event listener. -
mouseoverListener
The mouseover event listener. -
mouseoutListener
The mouseout event listener. -
mousemoveListener
The mousemove event listener. -
keypressListener
The keypress event listener. -
keydownListener
The keydown event listener. -
keyupListener
The keyup event listener. -
listeners
-
-
Constructor Details
-
ScriptingEnvironment
Creates a new ScriptingEnvironment.- Parameters:
ctx- the bridge context
-
-
Method Details
-
addDocumentListeners
protected void addDocumentListeners()Adds DOM listeners to the document. -
removeDocumentListeners
protected void removeDocumentListeners()Removes DOM listeners from the document. -
createWindow
Creates a new Window object.- Overrides:
createWindowin classBaseScriptingEnvironment
-
runEventHandler
-
interrupt
public void interrupt()Interrupts the periodic tasks and dispose this ScriptingEnvironment. -
addScriptingListeners
Adds the scripting listeners to the given element and all of its descendants. -
addScriptingListenersOn
Adds the scripting listeners to the given element. -
removeScriptingListeners
Removes the scripting listeners from the given element and all of its descendants. -
removeScriptingListenersOn
Removes the scripting listeners from the given element. -
updateScriptingListeners
-