|
||||||||||
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.SVGTextElementBridge
Bridge class for the <text> element.
Inner Class Summary | |
protected class |
SVGTextElementBridge.DOMAttrModifiedEventListener
The listener class for 'DOMAttrModified' event. |
protected static class |
SVGTextElementBridge.TextDecoration
|
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 class org.apache.batik.bridge.AbstractSVGBridge |
handler, handlerKey |
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_XLINK_HREF_CIRCULAR_DEPENDENCIES, MSG_BROKEN_LINK_TITLE |
Constructor Summary | |
SVGTextElementBridge()
Constructs a new bridge for the <text> element. |
Method Summary | |
protected void |
addGlyphPositionAttributes(java.text.AttributedString as,
Element element,
BridgeContext ctx)
Adds glyph position attributes to an AttributedString. |
protected void |
addPaintAttributes(java.text.AttributedString as,
Element element,
TextNode node,
SVGTextElementBridge.TextDecoration textDecoration,
BridgeContext ctx)
Adds painting attributes to an AttributedString. |
void |
bridgeUpdateCompleted(BridgeUpdateEvent evt)
Invoked when a bridge update is completed. |
void |
bridgeUpdateStarting(BridgeUpdateEvent evt)
Invoked when a bridge update is starting. |
protected java.text.AttributedString |
buildAttributedString(BridgeContext ctx,
Element element,
GraphicsNode node)
Creates the attributed string which represents the given text element children. |
protected java.util.List |
buildAttributedStrings(BridgeContext ctx,
Element element,
GraphicsNode node,
boolean top,
TextPath textPath,
java.util.LinkedList result)
Creates the attributed strings which represent the given text element children. |
void |
buildGraphicsNode(BridgeContext ctx,
Element e,
GraphicsNode node)
Builds using the specified BridgeContext and element, the specified graphics node. |
protected java.text.AttributedString |
createAttributedString(java.lang.String s,
java.util.Map m,
int[] indexMap,
boolean preserve,
boolean stripfirst,
boolean striplast)
Creates an attributes string from the content of the given string. |
GraphicsNode |
createGraphicsNode(BridgeContext ctx,
Element e)
Creates a GraphicsNode according to the specified parameters. |
protected java.util.Map |
getAttributeMap(BridgeContext ctx,
Element element,
GraphicsNode node,
TextPath textPath)
Returns the map to pass to the current characters. |
protected java.lang.String |
getElementContent(Element e)
Returns the content of the given element. |
Bridge |
getInstance()
Returns a new instance of this bridge. |
java.lang.String |
getLocalName()
Returns 'text'. |
protected java.awt.geom.Point2D |
getLocation(BridgeContext ctx,
Element e)
Returns the text node location according to the 'x' and 'y' attributes of the specified text element. |
protected void |
handleDOMAttrModifiedEvent(MutationEvent evt)
Handles DOMAttrModified events. |
protected void |
initializeDynamicSupport()
This method is invoked during the build phase if the document is dynamic. |
boolean |
isComposite()
Returns false as text is not a container. |
Methods inherited from class org.apache.batik.bridge.AbstractSVGBridge |
fireBridgeUpdateCompleted, fireBridgeUpdateStarting, getBridgeUpdateHandler, getNamespaceURI, setBridgeUpdateHandler |
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.Bridge |
getBridgeUpdateHandler, getNamespaceURI, setBridgeUpdateHandler |
Field Detail |
protected Element e
protected GraphicsNode node
protected BridgeContext ctx
Constructor Detail |
public SVGTextElementBridge()
Method Detail |
public java.lang.String getLocalName()
getLocalName
in interface Bridge
public Bridge getInstance()
getInstance
in interface GraphicsNodeBridge
getInstance
in class AbstractSVGBridge
public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e)
createGraphicsNode
in interface GraphicsNodeBridge
ctx
- the bridge context to usee
- the element that describes the graphics node to buildprotected java.awt.geom.Point2D getLocation(BridgeContext ctx, Element e)
ctx
- the bridge context to usee
- the text elementpublic void buildGraphicsNode(BridgeContext ctx, Element e, GraphicsNode node)
buildGraphicsNode
in interface GraphicsNodeBridge
ctx
- the bridge context to usee
- the element that describes the graphics node to buildnode
- the graphics node to buildpublic boolean isComposite()
isComposite
in interface GraphicsNodeBridge
protected void initializeDynamicSupport()
public void bridgeUpdateStarting(BridgeUpdateEvent evt)
bridgeUpdateStarting
in interface BridgeUpdateHandler
evt
- the evt that describes the incoming updatepublic void bridgeUpdateCompleted(BridgeUpdateEvent evt)
bridgeUpdateCompleted
in interface BridgeUpdateHandler
evt
- the evt that describes the updateprotected void handleDOMAttrModifiedEvent(MutationEvent evt)
evt
- the DOM mutation eventprotected java.text.AttributedString buildAttributedString(BridgeContext ctx, Element element, GraphicsNode node)
ctx
- the bridge context to useelement
- the text elementtextNode
- the textNode that will be used to paint the textprotected java.util.List buildAttributedStrings(BridgeContext ctx, Element element, GraphicsNode node, boolean top, TextPath textPath, java.util.LinkedList result)
protected java.lang.String getElementContent(Element e)
protected java.text.AttributedString createAttributedString(java.lang.String s, java.util.Map m, int[] indexMap, boolean preserve, boolean stripfirst, boolean striplast)
protected void addGlyphPositionAttributes(java.text.AttributedString as, Element element, BridgeContext ctx)
protected void addPaintAttributes(java.text.AttributedString as, Element element, TextNode node, SVGTextElementBridge.TextDecoration textDecoration, BridgeContext ctx)
protected java.util.Map getAttributeMap(BridgeContext ctx, Element element, GraphicsNode node, TextPath textPath)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |