org.apache.batik.bridge.svg12

Class SVG12BridgeContext

public class SVG12BridgeContext extends BridgeContext

Bridge context for SVG 1.2 documents. This is primarily for dispatching XBL events to bridges and for handling resource documents.
Nested Class Summary
protected classSVG12BridgeContext.EventListenerWrapper
Wrapper for DOM event listeners so that they will see only original events (i.e., not retargetted).
protected static classSVG12BridgeContext.ImplementationEventListenerMememto
A class used to store an implementation EventListener added to the DOM.
protected classSVG12BridgeContext.XBLBindingListener
The BindingListener.
protected classSVG12BridgeContext.XBLContentListener
The ContentSelectionChangedListener.
Field Summary
protected SVG12BridgeContext.XBLBindingListenerbindingListener
The BindingListener for XBL binding events.
protected SVG12BridgeContext.XBLContentListenercontentListener
The ContentSelectionChangedListener for xbl:content element events.
protected booleanmouseCaptureAutoRelease
Whether the mouse capture will be released on mouse up.
protected booleanmouseCaptureSendAll
Whether the mouse capture event target will receive events that do not intersect with its geometry.
protected EventTargetmouseCaptureTarget
The EventTarget that has the mouse capture.
Constructor Summary
SVG12BridgeContext(UserAgent userAgent)
Constructs a new bridge context.
SVG12BridgeContext(UserAgent userAgent, DocumentLoader loader)
Constructs a new bridge context.
SVG12BridgeContext(UserAgent userAgent, InterpreterPool interpreterPool, DocumentLoader documentLoader)
Constructs a new bridge context.
Method Summary
voidaddBindingListener()
Adds a BindingListener to the XBLManager for the document, so that XBL binding events can be passed on to the BridgeUpdateHandlers.
voidaddDOMListeners()
Adds EventListeners to the DOM and CSSEngineListener to the CSSEngine to handle any modifications on the DOM tree or style properties and update the GVT tree in response.
voidaddGVTListener(Document doc)
Adds the GVT listener for AWT event support.
voidaddUIEventListeners(Document doc)
Adds EventListeners to the input document to handle the cursor property.
BridgeContextcreateSubBridgeContext(SVGOMDocument newDoc)
URIResolvercreateURIResolver(SVGDocument doc, DocumentLoader dl)
Returns a new URIResolver object.
voiddispose()
Disposes this BridgeContext.
voidremoveBindingListener()
Removes the BindingListener from the XBLManager.
protected voidremoveDOMListeners()
Removes event listeners from the DOM and CSS engine.
voidremoveUIEventListeners(Document doc)
voidstartMouseCapture(EventTarget target, boolean sendAll, boolean autoRelease)
Starts mouse capture.
voidstopMouseCapture()
Stops mouse capture.
protected voidstoreImplementationEventListenerNS(EventTarget t, String ns, String s, EventListener l, boolean b)
Adds to the eventListenerSet the specified implementation event listener registration.

Field Detail

bindingListener

protected SVG12BridgeContext.XBLBindingListener bindingListener
The BindingListener for XBL binding events.

contentListener

protected SVG12BridgeContext.XBLContentListener contentListener
The ContentSelectionChangedListener for xbl:content element events.

mouseCaptureAutoRelease

protected boolean mouseCaptureAutoRelease
Whether the mouse capture will be released on mouse up.

mouseCaptureSendAll

protected boolean mouseCaptureSendAll
Whether the mouse capture event target will receive events that do not intersect with its geometry.

mouseCaptureTarget

protected EventTarget mouseCaptureTarget
The EventTarget that has the mouse capture.

Constructor Detail

SVG12BridgeContext

public SVG12BridgeContext(UserAgent userAgent)
Constructs a new bridge context.

Parameters: userAgent the user agent

SVG12BridgeContext

public SVG12BridgeContext(UserAgent userAgent, DocumentLoader loader)
Constructs a new bridge context.

Parameters: userAgent the user agent loader document loader

SVG12BridgeContext

public SVG12BridgeContext(UserAgent userAgent, InterpreterPool interpreterPool, DocumentLoader documentLoader)
Constructs a new bridge context.

Parameters: userAgent the user agent interpreterPool the interpreter pool documentLoader document loader

Method Detail

addBindingListener

public void addBindingListener()
Adds a BindingListener to the XBLManager for the document, so that XBL binding events can be passed on to the BridgeUpdateHandlers.

addDOMListeners

public void addDOMListeners()
Adds EventListeners to the DOM and CSSEngineListener to the CSSEngine to handle any modifications on the DOM tree or style properties and update the GVT tree in response. This overriden method adds implementation event listeners, so that mutations in shadow trees can be caught.

addGVTListener

public void addGVTListener(Document doc)
Adds the GVT listener for AWT event support.

addUIEventListeners

public void addUIEventListeners(Document doc)
Adds EventListeners to the input document to handle the cursor property. This is not done in the addDOMListeners method because addDOMListeners is only used for dynamic content whereas cursor support is provided for all content. Also note that it is very important that the listeners be registered for the capture phase as the 'default' behavior for cursors is handled by the BridgeContext during the capture phase and the 'custom' behavior (handling of 'auto' on anchors, for example), is handled during the bubbling phase.

createSubBridgeContext

public BridgeContext createSubBridgeContext(SVGOMDocument newDoc)

createURIResolver

public URIResolver createURIResolver(SVGDocument doc, DocumentLoader dl)
Returns a new URIResolver object.

dispose

public void dispose()
Disposes this BridgeContext.

removeBindingListener

public void removeBindingListener()
Removes the BindingListener from the XBLManager.

removeDOMListeners

protected void removeDOMListeners()
Removes event listeners from the DOM and CSS engine.

removeUIEventListeners

public void removeUIEventListeners(Document doc)

startMouseCapture

public void startMouseCapture(EventTarget target, boolean sendAll, boolean autoRelease)
Starts mouse capture.

stopMouseCapture

public void stopMouseCapture()
Stops mouse capture.

storeImplementationEventListenerNS

protected void storeImplementationEventListenerNS(EventTarget t, String ns, String s, EventListener l, boolean b)
Adds to the eventListenerSet the specified implementation event listener registration.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.