Class SVG12BridgeContext

java.lang.Object
org.apache.batik.bridge.BridgeContext
org.apache.batik.bridge.svg12.SVG12BridgeContext
All Implemented Interfaces:
ErrorConstants, CSSContext

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.
  • Field Details

    • bindingListener

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

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

      protected EventTarget mouseCaptureTarget
      The EventTarget that has the mouse capture.
    • mouseCaptureSendAll

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

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

    • 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 Details

    • createURIResolver

      public URIResolver createURIResolver(org.w3c.dom.svg.SVGDocument doc, DocumentLoader dl)
      Returns a new URIResolver object.
      Overrides:
      createURIResolver in class BridgeContext
    • addGVTListener

      public void addGVTListener(Document doc)
      Adds the GVT listener for AWT event support.
      Overrides:
      addGVTListener in class BridgeContext
    • dispose

      public void dispose()
      Disposes this BridgeContext.
      Overrides:
      dispose in class BridgeContext
    • 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.
    • removeBindingListener

      public void removeBindingListener()
      Removes the BindingListener from the XBLManager.
    • 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.
      Overrides:
      addDOMListeners in class BridgeContext
    • 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.
      Overrides:
      addUIEventListeners in class BridgeContext
    • removeUIEventListeners

      public void removeUIEventListeners(Document doc)
      Overrides:
      removeUIEventListeners in class BridgeContext
    • removeDOMListeners

      protected void removeDOMListeners()
      Removes event listeners from the DOM and CSS engine.
      Overrides:
      removeDOMListeners in class BridgeContext
    • storeImplementationEventListenerNS

      protected void storeImplementationEventListenerNS(EventTarget t, String ns, String s, EventListener l, boolean b)
      Adds to the eventListenerSet the specified implementation event listener registration.
    • createSubBridgeContext

      public BridgeContext createSubBridgeContext(SVGOMDocument newDoc)
      Description copied from class: BridgeContext
      This function creates a new 'sub' BridgeContext to associated with 'newDoc' if one currently doesn't exist, otherwise it returns the BridgeContext currently associated with the document.
      Overrides:
      createSubBridgeContext in class BridgeContext
      Parameters:
      newDoc - The document to get/create a BridgeContext for.
    • startMouseCapture

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

      public void stopMouseCapture()
      Stops mouse capture.