|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.apache.batik.bridge.AbstractSVGBridge
|
+--org.apache.batik.bridge.AbstractGraphicsNodeBridge
The base bridge class for SVG graphics node. By default, the namespace URI is the SVG namespace. Override the getNamespaceURI if you want to add custom GraphicsNode with a custom namespace.
This class handles various attributes that are defined on most of the SVG graphic elements as described in the SVG specification.
| Field Summary | |
protected BridgeContext |
ctx
The bridge context to use for dynamic updates. |
protected Element |
e
The element that has been handled by this bridge. |
protected GraphicsNode |
node
The graphics node constructed by this bridge. |
| Fields inherited from interface org.apache.batik.bridge.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_INVALID, ERR_URI_IO, ERR_URI_MALFORMED, ERR_URI_REFERENCE_A_DOCUMENT, ERR_URI_UNSECURE, ERR_XLINK_HREF_CIRCULAR_DEPENDENCIES, MSG_BROKEN_LINK_TITLE |
| Constructor Summary | |
protected |
AbstractGraphicsNodeBridge()
Constructs a new abstract bridge. |
| Method Summary | |
void |
buildGraphicsNode(BridgeContext ctx,
Element e,
GraphicsNode node)
Builds using the specified BridgeContext and element, the specified graphics node. |
GraphicsNode |
createGraphicsNode(BridgeContext ctx,
Element e)
Creates a GraphicsNode according to the specified parameters. |
void |
dispose()
Disposes this BridgeUpdateHandler and releases all resources. |
java.awt.geom.Rectangle2D |
getBBox()
Returns the tight bounding box in current user space (i.e., after application of the transform attribute, if any) on the geometry of all contained graphics elements, exclusive of stroke-width and filter effects). |
java.awt.geom.AffineTransform |
getCTM()
Returns the transformation matrix from current user units (i.e., after application of the transform attribute, if any) to the viewport coordinate system for the nearestViewportElement. |
boolean |
getDisplay(Element e)
Returns true if the graphics node has to be displayed, false otherwise. |
float |
getFontSize()
Returns the font-size on the associated element. |
java.awt.geom.AffineTransform |
getGlobalTransform()
Returns the global transformation matrix from the current element to the root. |
float |
getPixelToMM()
Returns the size of a px CSS unit in millimeters. |
float |
getPixelUnitToMillimeter()
Returns the size of a px CSS unit in millimeters. |
float |
getViewportHeight()
Returns the height of the viewport which directly contains the given element. |
float |
getViewportWidth()
Returns the width of the viewport which directly contains the given element. |
void |
handleCSSEngineEvent(CSSEngineEvent evt)
Invoked when an CSSEngineEvent is fired. |
protected void |
handleCSSPropertyChanged(int property)
Invoked for each CSS property that has changed. |
void |
handleDOMAttrModifiedEvent(MutationEvent evt)
Invoked when an MutationEvent of type 'DOMAttrModified' is fired. |
void |
handleDOMCharacterDataModified(MutationEvent evt)
Invoked when an MutationEvent of type 'DOMCharacterDataModified' is fired. |
void |
handleDOMNodeInsertedEvent(MutationEvent evt)
Invoked when an MutationEvent of type 'DOMNodeInserted' is fired. |
void |
handleDOMNodeRemovedEvent(MutationEvent evt)
Invoked when an MutationEvent of type 'DOMNodeRemoved' is fired. |
protected void |
handleGeometryChanged()
Invoked when the geometry of an graphical element has changed. |
protected void |
initializeDynamicSupport(BridgeContext ctx,
Element e,
GraphicsNode node)
This method is invoked during the build phase if the document is dynamic. |
protected abstract GraphicsNode |
instantiateGraphicsNode()
Creates the GraphicsNode depending on the GraphicsNodeBridge implementation. |
| Methods inherited from class org.apache.batik.bridge.AbstractSVGBridge |
getInstance, getNamespaceURI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.batik.bridge.GraphicsNodeBridge |
getInstance, isComposite |
| Methods inherited from interface org.apache.batik.bridge.Bridge |
getLocalName, getNamespaceURI |
| Field Detail |
protected Element e
protected GraphicsNode node
protected BridgeContext ctx
| Constructor Detail |
protected AbstractGraphicsNodeBridge()
| Method Detail |
public GraphicsNode createGraphicsNode(BridgeContext ctx,
Element e)
createGraphicsNode in interface GraphicsNodeBridgectx - the bridge context to usee - the element that describes the graphics node to buildprotected abstract GraphicsNode instantiateGraphicsNode()
public void buildGraphicsNode(BridgeContext ctx,
Element e,
GraphicsNode node)
buildGraphicsNode in interface GraphicsNodeBridgectx - the bridge context to usee - the element that describes the graphics node to buildnode - the graphics node to buildpublic boolean getDisplay(Element e)
getDisplay in interface GraphicsNodeBridge
protected void initializeDynamicSupport(BridgeContext ctx,
Element e,
GraphicsNode node)
public void handleDOMAttrModifiedEvent(MutationEvent evt)
handleDOMAttrModifiedEvent in interface BridgeUpdateHandlerprotected void handleGeometryChanged()
public void handleDOMNodeInsertedEvent(MutationEvent evt)
handleDOMNodeInsertedEvent in interface BridgeUpdateHandlerpublic void handleDOMNodeRemovedEvent(MutationEvent evt)
handleDOMNodeRemovedEvent in interface BridgeUpdateHandlerpublic void handleDOMCharacterDataModified(MutationEvent evt)
handleDOMCharacterDataModified in interface BridgeUpdateHandlerpublic void dispose()
dispose in interface BridgeUpdateHandlerpublic void handleCSSEngineEvent(CSSEngineEvent evt)
handleCSSEngineEvent in interface BridgeUpdateHandlerprotected void handleCSSPropertyChanged(int property)
public float getPixelUnitToMillimeter()
getPixelUnitToMillimeter in interface SVGContextpublic float getPixelToMM()
getPixelToMM in interface SVGContextpublic java.awt.geom.Rectangle2D getBBox()
getBBox in interface SVGContextpublic java.awt.geom.AffineTransform getCTM()
getCTM in interface SVGContextpublic java.awt.geom.AffineTransform getGlobalTransform()
getGlobalTransform in interface SVGContextpublic float getViewportWidth()
getViewportWidth in interface SVGContextpublic float getViewportHeight()
getViewportHeight in interface SVGContextpublic float getFontSize()
getFontSize in interface SVGContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||