org.apache.batik.bridge

Class BaseScriptingEnvironment

public class BaseScriptingEnvironment extends Object

This class is the base class for SVG scripting.
Nested Class Summary
protected classBaseScriptingEnvironment.Window
Represents the window object of this environment.
Field Summary
protected static StringALTERNATE_EVENT_NAME
protected static StringAPPLICATION_ECMASCRIPT
The 'application/ecmascript' MIME type.
protected BridgeContextbridgeContext
The bridge context.
protected ParsedURLdocPURL
The URL of the document ot manage
protected Documentdocument
The document to manage.
protected static StringEVENT_NAME
static StringEVENT_SCRIPT_DESCRIPTION
Constant used to describe inline scripts.
protected Interpreterinterpreter
The default Interpreter for the document
static StringINLINE_SCRIPT_DESCRIPTION
Constant used to describe inline scripts.
protected Setlanguages
protected UserAgentuserAgent
The user-agent.
Constructor Summary
BaseScriptingEnvironment(BridgeContext ctx)
Creates a new BaseScriptingEnvironment.
Method Summary
protected voidcheckCompatibleScriptURL(String scriptType, ParsedURL scriptPURL)
Checks that the script URLs and the document url are compatible.
WindowcreateWindow(Interpreter interp, String lang)
Creates a new Window object.
WindowcreateWindow()
Creates a new Window object.
protected voiddispatchSVGDocEvent(String eventType)
protected voiddispatchSVGLoad(Element elt, boolean checkCanRun, String lang)
Auxiliary method for dispatchSVGLoad.
voiddispatchSVGLoadEvent()
Recursively dispatch the SVG 'onload' event.
protected voiddispatchSVGResizeEvent()
Method to dispatch SVG Resize event.
protected voiddispatchSVGScrollEvent()
Method to dispatch SVG Scroll event.
protected voiddispatchSVGZoomEvent()
Method to dispatch SVG Zoom event.
InterpretergetInterpreter()
Returns the default Interpreter for this document.
InterpretergetInterpreter(String lang)
protected voidhandleInterpreterException(InterpreterException ie)
Handles the given exception.
protected voidhandleSecurityException(SecurityException se)
Handles the given exception.
voidinitializeEnvironment(Interpreter interp, String lang)
Initializes the environment of the given interpreter.
static booleanisDynamicDocument(BridgeContext ctx, Document doc)
Tells whether the given SVG document is dynamic.
static booleanisDynamicElement(BridgeContext ctx, Element elt)
static booleanisDynamicElement(Element elt, BridgeContext ctx, List bridgeExtensions)
Tells whether the given SVG element is dynamic.
voidloadScripts()
Loads the scripts contained in the