Class SVG12BridgeContext
java.lang.Object
org.apache.batik.bridge.BridgeContext
org.apache.batik.bridge.svg12.SVG12BridgeContext
- All Implemented Interfaces:
ErrorConstants, CSSContext
Bridge context for SVG 1.2 documents. This is primarily for dispatching
XBL events to bridges and for handling resource documents.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classWrapper for DOM event listeners so that they will see only original events (i.e., not retargetted).protected static classA class used to store an implementation EventListener added to the DOM.protected classThe BindingListener.protected classThe ContentSelectionChangedListener.Nested classes/interfaces inherited from class BridgeContext
BridgeContext.AnimatedAttrListener, BridgeContext.CSSEngineUserAgentWrapper, BridgeContext.CSSPropertiesChangedListener, BridgeContext.DOMAttrModifiedEventListener, BridgeContext.DOMCharacterDataModifiedEventListener, BridgeContext.DOMMouseOutEventListener, BridgeContext.DOMMouseOverEventListener, BridgeContext.DOMNodeInsertedEventListener, BridgeContext.DOMNodeRemovedEventListener, BridgeContext.EventListenerMememto, BridgeContext.SoftReferenceMememto -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SVG12BridgeContext.XBLBindingListenerThe BindingListener for XBL binding events.protected SVG12BridgeContext.XBLContentListenerThe ContentSelectionChangedListener for xbl:content element events.protected booleanWhether the mouse capture will be released on mouse up.protected booleanWhether the mouse capture event target will receive events that do not intersect with its geometry.protected EventTargetThe EventTarget that has the mouse capture.Fields inherited from class BridgeContext
animatedAttributeListener, animationEngine, animationLimitingAmount, animationLimitingMode, childContexts, cssPropertiesChangedListener, cursorManager, defaultBridge, document, documentLoader, documentSize, domAttrModifiedEventListener, domCharacterDataModifiedEventListener, domNodeInsertedEventListener, domNodeRemovedEventListener, DYNAMIC, dynamicStatus, elementDataMap, elementNodeMap, eventListenerSet, extensions, focusManager, globalExtensions, gvtBuilder, INTERACTIVE, interpreterMap, interpreterPool, isSVG12, namespaceURIMap, nodeElementMap, primaryContext, reservedNamespaceSet, STATIC, textPainter, updateManager, userAgent, viewportMap, viewportStack, xblManagerFields inherited from interface ErrorConstants
ERR_ATTRIBUTE_MISSING, ERR_ATTRIBUTE_VALUE_MALFORMED, ERR_CSS_LENGTH_NEGATIVE, ERR_CSS_URI_BAD_TARGET, ERR_LENGTH_NEGATIVE, ERR_URI_BAD_TARGET, ERR_URI_IMAGE_BROKEN, ERR_URI_IMAGE_INVALID, ERR_URI_IO, ERR_URI_MALFORMED, ERR_URI_REFERENCE_A_DOCUMENT, ERR_URI_UNSECURE, ERR_XLINK_HREF_CIRCULAR_DEPENDENCIES, URI_IMAGE_ERROR -
Constructor Summary
ConstructorsConstructorDescriptionSVG12BridgeContext(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
Modifier and TypeMethodDescriptionvoidAdds a BindingListener to the XBLManager for the document, so that XBL binding events can be passed on to the BridgeUpdateHandlers.voidAdds 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.voidAdds EventListeners to the input document to handle the cursor property.createSubBridgeContext(SVGOMDocument newDoc) 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.createURIResolver(org.w3c.dom.svg.SVGDocument doc, DocumentLoader dl) Returns a new URIResolver object.voiddispose()Disposes this BridgeContext.voidRemoves the BindingListener from the XBLManager.protected voidRemoves event listeners from the DOM and CSS engine.voidvoidstartMouseCapture(EventTarget target, boolean sendAll, boolean autoRelease) Starts mouse capture.voidStops mouse capture.protected voidstoreImplementationEventListenerNS(EventTarget t, String ns, String s, EventListener l, boolean b) Adds to the eventListenerSet the specified implementation event listener registration.Methods inherited from class BridgeContext
bind, checkInteractiveElement, checkInteractiveElement, checkLoadExternalResource, clearChildContexts, closeViewport, createBridgeContext, finalize, getAnimationEngine, getBlockHeight, getBlockWidth, getBolderFontWeight, getBridge, getBridge, getBridgeExtensions, getBridgeUpdateHandler, getChildContexts, getCSSEngineForElement, getCursorManager, getDefaultFontFamily, getDocument, getDocumentBridge, getDocumentLoader, getDocumentSize, getElement, getElementData, getFocusManager, getFontFamilyMap, getFontFamilyResolver, getGlobalBridgeExtensions, getGraphicsNode, getGVTBuilder, getInterpreter, getInterpreterPool, getLighterFontWeight, getMediumFontSize, getPixelToMillimeter, getPixelUnitToMillimeter, getPrimaryBridgeContext, getReferencedElement, getReferencedNode, getSVGContext, getSystemColor, getTextPainter, getUpdateManager, getUserAgent, getViewport, hasGraphicsNodeBridge, initializeDocument, isDynamic, isDynamicDocument, isInteractive, isInteractiveDocument, isSVG12, openViewport, putBridge, putBridge, putReservedNamespaceURI, registerSVGBridges, removeBridge, removeReservedNamespaceURI, removeViewport, setAnimationLimitingCPU, setAnimationLimitingFPS, setAnimationLimitingMode, setAnimationLimitingNone, setDefaultBridge, setDocument, setDocumentLoader, setDocumentSize, setDynamic, setDynamicState, setElementData, setFontFamilyMap, setGVTBuilder, setInteractive, setInterpreterPool, setTextPainter, setUpdateManager, setUpdateManager, setUserAgent, setXBLManager, storeEventListener, storeEventListenerNS, unbind
-
Field Details
-
bindingListener
The BindingListener for XBL binding events. -
contentListener
The ContentSelectionChangedListener for xbl:content element events. -
mouseCaptureTarget
The EventTarget that has the mouse capture. -
mouseCaptureSendAll
protected boolean mouseCaptureSendAllWhether the mouse capture event target will receive events that do not intersect with its geometry. -
mouseCaptureAutoRelease
protected boolean mouseCaptureAutoReleaseWhether the mouse capture will be released on mouse up.
-
-
Constructor Details
-
SVG12BridgeContext
Constructs a new bridge context.- Parameters:
userAgent- the user agent
-
SVG12BridgeContext
Constructs a new bridge context.- Parameters:
userAgent- the user agentloader- document loader
-
SVG12BridgeContext
public SVG12BridgeContext(UserAgent userAgent, InterpreterPool interpreterPool, DocumentLoader documentLoader) Constructs a new bridge context.- Parameters:
userAgent- the user agentinterpreterPool- the interpreter pooldocumentLoader- document loader
-
-
Method Details
-
createURIResolver
Returns a new URIResolver object.- Overrides:
createURIResolverin classBridgeContext
-
addGVTListener
Adds the GVT listener for AWT event support.- Overrides:
addGVTListenerin classBridgeContext
-
dispose
-
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:
addDOMListenersin classBridgeContext
-
addUIEventListeners
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:
addUIEventListenersin classBridgeContext
-
removeUIEventListeners
- Overrides:
removeUIEventListenersin classBridgeContext
-
removeDOMListeners
protected void removeDOMListeners()Removes event listeners from the DOM and CSS engine.- Overrides:
removeDOMListenersin classBridgeContext
-
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
Description copied from class:BridgeContextThis 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:
createSubBridgeContextin classBridgeContext- Parameters:
newDoc- The document to get/create a BridgeContext for.
-
startMouseCapture
Starts mouse capture. -
stopMouseCapture
public void stopMouseCapture()Stops mouse capture.
-