## org.apache.batik.bridge
Class ScriptingEnvironment

    java.lang.Object
      org.apache.batik.bridge.BaseScriptingEnvironment
          org.apache.batik.bridge.ScriptingEnvironment

Direct Known Subclasses:
  SVG12ScriptingEnvironment

    public class ScriptingEnvironment

extends BaseScriptingEnvironment

This class contains the informations needed by the SVG scripting.

Nested Class Summary
`protected class` `ScriptingEnvironment.DOMAttrModifiedListener`
`protected class` `ScriptingEnvironment.DOMNodeInsertedListener` The listener class for 'DOMNodeInserted' event.
`protected class` `ScriptingEnvironment.DOMNodeRemovedListener` The listener class for 'DOMNodeRemoved' event.
`protected class` `ScriptingEnvironment.EvaluateIntervalRunnable` To interpret a script.
`protected class` `ScriptingEnvironment.EvaluateRunnable` To interpret a script.
`protected class` `ScriptingEnvironment.EvaluateRunnableRunnable` To call a Runnable.
`protected class` `ScriptingEnvironment.ScriptingEventListener` To handle a scripting event.
`protected class` `ScriptingEnvironment.Window` Represents the window object of this environment.

Field Summary
`protected EventListener` `activateListener` The activate event listener.
`protected EventListener` `beginListener` The begin event listener.
`protected EventListener` `clickListener` The click event listener.
`protected EventListener` `domAttrModifiedListener` The DOMAttrModified event listener.
`protected EventListener` `domNodeInsertedListener` The DOMNodeInserted event listener.
`protected EventListener` `domNodeRemovedListener` The DOMNodeRemoved event listener.
`protected EventListener` `endListener` The end event listener.
`protected EventListener` `focusinListener` The focusin event listener.
`protected EventListener` `focusoutListener` The focusout event listener.
`protected EventListener` `keydownListener` The keydown event listener.
`protected EventListener` `keypressListener` The keypress event listener.
`protected EventListener` `keyupListener` The keyup event listener.
`protected EventListener[]` `listeners`
`protected EventListener` `mousedownListener` The mousedown event listener.
`protected EventListener` `mousemoveListener` The mousemove event listener.
`protected EventListener` `mouseoutListener` The mouseout event listener.
`protected EventListener` `mouseoverListener` The mouseover event listener.
`protected EventListener` `mouseupListener` The mouseup event listener.
`protected EventListener` `repeatListener` The repeat event listener.
`static java.lang.String[]` `SVG_DOM_EVENT`
`static java.lang.String[]` `SVG_EVENT_ATTRS`
`protected EventListener` `svgAbortListener` The SVGAbort event listener.
`protected EventListener` `svgErrorListener` The SVGError event listener.
`protected EventListener` `svgResizeListener` The SVGResize event listener.
`protected EventListener` `svgScrollListener` The SVGScroll event listener.
`protected EventListener` `svgUnloadListener` The SVGUnload event listener.
`protected EventListener` `svgZoomListener` The SVGZoom event listener.
`protected java.util.Timer` `timer` The timer for periodic or delayed tasks.
`protected UpdateManager` `updateManager` The update manager.
`protected RunnableQueue` `updateRunnableQueue` The update runnable queue.

Fields inherited from class org.apache.batik.bridge.BaseScriptingEnvironment
`ALTERNATE_EVENT_NAME, APPLICATION_ECMASCRIPT, bridgeContext, docPURL, document, EVENT_NAME, EVENT_SCRIPT_DESCRIPTION, INLINE_SCRIPT_DESCRIPTION, interpreter, languages, userAgent`

Constructor Summary
`ScriptingEnvironment(BridgeContext ctx)` Creates a new ScriptingEnvironment.

Method Summary
`protected void` `addDocumentListeners()` Adds DOM listeners to the document.
`void` `addScriptingListeners(org.w3c.dom.Node node)` Adds the scripting listeners to the given element and all of its descendants.
`protected void` `addScriptingListenersOn(org.w3c.dom.Element elt)` Adds the scripting listeners to the given element.
`Window` `createWindow(Interpreter interp, java.lang.String lang)` Creates a new Window object.
`void` `interrupt()` Interrupts the periodic tasks and dispose this ScriptingEnvironment.
`protected void` `removeDocumentListeners()` Removes DOM listeners from the document.
`protected void` `removeScriptingListeners(org.w3c.dom.Node node)` Removes the scripting listeners from the given element and all of its descendants.
`protected void` `removeScriptingListenersOn(org.w3c.dom.Element elt)` Removes the scripting listeners from the given element.
`void` `runEventHandler(java.lang.String script, Event evt, java.lang.String lang, java.lang.String desc)` Runs an event handler.
`protected void` `updateScriptingListeners(org.w3c.dom.Element elt, java.lang.String attr)` Updates the registration of a listener on the given element.

Methods inherited from class org.apache.batik.bridge.BaseScriptingEnvironment
`checkCompatibleScriptURL, createWindow, dispatchSVGDocEvent, dispatchSVGLoad, dispatchSVGLoadEvent, dispatchSVGResizeEvent, dispatchSVGScrollEvent, dispatchSVGZoomEvent, getInterpreter, getInterpreter, handleInterpreterException, handleSecurityException, initializeEnvironment, isDynamicDocument, isDynamicElement, isDynamicElement, loadScripts`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SVG_EVENT_ATTRS

    public static final java.lang.String[] SVG_EVENT_ATTRS

### SVG_DOM_EVENT

    public static final java.lang.String[] SVG_DOM_EVENT

### timer

    protected java.util.Timer timer

  The timer for periodic or delayed tasks.

### updateManager

    protected UpdateManager updateManager

  The update manager.

### updateRunnableQueue

    protected RunnableQueue updateRunnableQueue

  The update runnable queue.

### domNodeInsertedListener

    protected EventListener domNodeInsertedListener

  The DOMNodeInserted event listener.

### domNodeRemovedListener

    protected EventListener domNodeRemovedListener

  The DOMNodeRemoved event listener.

### domAttrModifiedListener

    protected EventListener domAttrModifiedListener

  The DOMAttrModified event listener.

### svgAbortListener

    protected EventListener svgAbortListener

  The SVGAbort event listener.

### svgErrorListener

    protected EventListener svgErrorListener

  The SVGError event listener.

### svgResizeListener

    protected EventListener svgResizeListener

  The SVGResize event listener.

### svgScrollListener

    protected EventListener svgScrollListener

  The SVGScroll event listener.

### svgUnloadListener

    protected EventListener svgUnloadListener

  The SVGUnload event listener.

### svgZoomListener

    protected EventListener svgZoomListener

  The SVGZoom event listener.

### beginListener

    protected EventListener beginListener

  The begin event listener.

### endListener

    protected EventListener endListener

  The end event listener.

### repeatListener

    protected EventListener repeatListener

  The repeat event listener.

### focusinListener

    protected EventListener focusinListener

  The focusin event listener.

### focusoutListener

    protected EventListener focusoutListener

  The focusout event listener.

### activateListener

    protected EventListener activateListener

  The activate event listener.

### clickListener

    protected EventListener clickListener

  The click event listener.

### mousedownListener

    protected EventListener mousedownListener

  The mousedown event listener.

### mouseupListener

    protected EventListener mouseupListener

  The mouseup event listener.

### mouseoverListener

    protected EventListener mouseoverListener

  The mouseover event listener.

### mouseoutListener

    protected EventListener mouseoutListener

  The mouseout event listener.

### mousemoveListener

    protected EventListener mousemoveListener

  The mousemove event listener.

### keypressListener

    protected EventListener keypressListener

  The keypress event listener.

### keydownListener

    protected EventListener keydownListener

  The keydown event listener.

### keyupListener

    protected EventListener keyupListener

  The keyup event listener.

### listeners

    protected EventListener[] listeners

Constructor Detail

### ScriptingEnvironment

    public ScriptingEnvironment(BridgeContext ctx)

  Creates a new ScriptingEnvironment.

  Parameters:
    `ctx` - the bridge context

Method Detail

### addDocumentListeners

    protected void addDocumentListeners()

  Adds DOM listeners to the document.

### removeDocumentListeners

    protected void removeDocumentListeners()

  Removes DOM listeners from the document.

### createWindow

    public Window createWindow(Interpreter interp,
                               java.lang.String lang)

  Creates a new Window object.

  Overrides:
    `createWindow` in class `BaseScriptingEnvironment`

### runEventHandler

    public void runEventHandler(java.lang.String script,
                                Event evt,
                                java.lang.String lang,
                                java.lang.String desc)

  Runs an event handler.

### interrupt

    public void interrupt()

  Interrupts the periodic tasks and dispose this ScriptingEnvironment.

### addScriptingListeners

    public void addScriptingListeners(org.w3c.dom.Node node)

  Adds the scripting listeners to the given element and all of its descendants.

### addScriptingListenersOn

    protected void addScriptingListenersOn(org.w3c.dom.Element elt)

  Adds the scripting listeners to the given element.

### removeScriptingListeners

    protected void removeScriptingListeners(org.w3c.dom.Node node)

  Removes the scripting listeners from the given element and all of its descendants.

### removeScriptingListenersOn

    protected void removeScriptingListenersOn(org.w3c.dom.Element elt)

  Removes the scripting listeners from the given element.

### updateScriptingListeners

    protected void updateScriptingListeners(org.w3c.dom.Element elt,
                                            java.lang.String attr)

  Updates the registration of a listener on the given element.

Copyright © 2008 Apache Software Foundation. All Rights Reserved.