|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.bridge.SVGDocumentBridge
public class SVGDocumentBridge
Bridge class for an SVGDocument node.
Field Summary | |
---|---|
protected BridgeContext |
ctx
The bridge context. |
protected Document |
document
The document node this bridge is associated with. |
protected RootGraphicsNode |
node
The graphics node constructed by this bridge. |
Fields inherited from interface org.apache.batik.dom.svg.SVGContext |
---|
PERCENTAGE_FONT_SIZE, PERCENTAGE_VIEWPORT_HEIGHT, PERCENTAGE_VIEWPORT_SIZE, PERCENTAGE_VIEWPORT_WIDTH |
Constructor Summary | |
---|---|
SVGDocumentBridge()
Constructs a new bridge the SVG document. |
Method Summary | |
---|---|
void |
buildGraphicsNode(BridgeContext ctx,
Document doc,
RootGraphicsNode node)
Builds using the specified BridgeContext and element, the specified graphics node. |
RootGraphicsNode |
createGraphicsNode(BridgeContext ctx,
Document doc)
Creates a GraphicsNode according to the specified parameters. |
void |
dispose()
Disposes this BridgeUpdateHandler and releases all resources. |
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). |
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. |
float |
getFontSize()
Returns the font-size on the associated element. |
AffineTransform |
getGlobalTransform()
Returns the global transformation matrix from the current element to the root. |
Bridge |
getInstance()
Returns a new instance of this bridge. |
String |
getLocalName()
Returns the local name of the element this Bridge is dedicated
to. |
String |
getNamespaceURI()
Returns the namespace URI of the element this Bridge is
dedicated to. |
float |
getPixelToMM()
Returns the size of a px CSS unit in millimeters. |
float |
getPixelUnitToMillimeter()
Returns the size of a px CSS unit in millimeters. |
AffineTransform |
getScreenTransform()
Returns the transform from the global transform space to pixels. |
float |
getViewportHeight()
Returns the height of the viewport which directly contains the associated element. |
float |
getViewportWidth()
Returns the width of the viewport which directly contains the associated element. |
void |
handleAnimatedAttributeChanged(AnimatedLiveAttributeValue alav)
Invoked when the animated value of an animated attribute has changed. |
void |
handleCSSEngineEvent(CSSEngineEvent evt)
Invoked when an CSSEngineEvent is fired. |
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. |
void |
handleOtherAnimationChanged(String type)
Invoked when an 'other' animation value has changed. |
void |
setScreenTransform(AffineTransform at)
Sets the transform to be used from the global transform space to pixels. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Document document
protected RootGraphicsNode node
protected BridgeContext ctx
Constructor Detail |
---|
public SVGDocumentBridge()
Method Detail |
---|
public String getNamespaceURI()
Bridge
is
dedicated to. Returns null
, as a Document node has no
namespace URI.
getNamespaceURI
in interface Bridge
public String getLocalName()
Bridge
is dedicated
to. Returns null
, as a Document node has no local name.
getLocalName
in interface Bridge
public Bridge getInstance()
getInstance
in interface Bridge
public RootGraphicsNode createGraphicsNode(BridgeContext ctx, Document doc)
GraphicsNode
according to the specified parameters.
This is called before children have been added to the
returned GraphicsNode (obviously since you construct and return it).
createGraphicsNode
in interface DocumentBridge
ctx
- the bridge context to usedoc
- the document node that describes the graphics node to build
public void buildGraphicsNode(BridgeContext ctx, Document doc, RootGraphicsNode node)
buildGraphicsNode
in interface DocumentBridge
ctx
- the bridge context to usedoc
- the document node that describes the graphics node to buildnode
- the graphics node to buildpublic void handleDOMAttrModifiedEvent(MutationEvent evt)
handleDOMAttrModifiedEvent
in interface BridgeUpdateHandler
public void handleDOMNodeInsertedEvent(MutationEvent evt)
handleDOMNodeInsertedEvent
in interface BridgeUpdateHandler
public void handleDOMNodeRemovedEvent(MutationEvent evt)
handleDOMNodeRemovedEvent
in interface BridgeUpdateHandler
public void handleDOMCharacterDataModified(MutationEvent evt)
handleDOMCharacterDataModified
in interface BridgeUpdateHandler
public void handleCSSEngineEvent(CSSEngineEvent evt)
handleCSSEngineEvent
in interface BridgeUpdateHandler
public void handleAnimatedAttributeChanged(AnimatedLiveAttributeValue alav)
handleAnimatedAttributeChanged
in interface BridgeUpdateHandler
public void handleOtherAnimationChanged(String type)
handleOtherAnimationChanged
in interface BridgeUpdateHandler
public void dispose()
dispose
in interface BridgeUpdateHandler
public float getPixelUnitToMillimeter()
getPixelUnitToMillimeter
in interface SVGContext
public float getPixelToMM()
getPixelToMM
in interface SVGContext
getPixelUnitToMillimeter()
public Rectangle2D getBBox()
SVGContext
getBBox
in interface SVGContext
public AffineTransform getScreenTransform()
SVGContext
getScreenTransform
in interface SVGContext
public void setScreenTransform(AffineTransform at)
SVGContext
setScreenTransform
in interface SVGContext
public AffineTransform getCTM()
SVGContext
getCTM
in interface SVGContext
public AffineTransform getGlobalTransform()
SVGContext
getGlobalTransform
in interface SVGContext
public float getViewportWidth()
SVGContext
getViewportWidth
in interface SVGContext
public float getViewportHeight()
SVGContext
getViewportHeight
in interface SVGContext
public float getFontSize()
SVGContext
getFontSize
in interface SVGContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |