|
||||||||||
| 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
|
+--org.apache.batik.bridge.SVGTextElementBridge
Bridge class for the <text> element.
| Inner Class Summary | |
protected class |
SVGTextElementBridge.AbstractTextChildBridgeUpdateHandler
Implementation for the BridgeUpdateHandler
for the child elements of <text>. |
protected class |
SVGTextElementBridge.AbstractTextChildSVGContext
Implementation of |
protected static class |
SVGTextElementBridge.AttributedStringBuffer
This class is used to build an AttributedString. |
protected class |
SVGTextElementBridge.DOMChildNodeRemovedEventListener
The DOM EventListener invoked when a node is removed. |
protected class |
SVGTextElementBridge.DOMSubtreeModifiedEventListener
The DOM EventListener invoked when the subtree is modified. |
protected static class |
SVGTextElementBridge.TextDecoration
To store the text decorations of a text element. |
protected class |
SVGTextElementBridge.TextPathBridge
BridgeUpdateHandle for <textPath> element. |
protected class |
SVGTextElementBridge.TRefBridge
BridgeUpdateHandle for <tref> element. |
protected class |
SVGTextElementBridge.TspanBridge
BridgeUpdateHandle for <tspan> element. |
| Field Summary | |
protected SVGTextElementBridge.DOMChildNodeRemovedEventListener |
childNodeRemovedEventListener
The DOM EventListener to receive 'DOMNodeRemoved' event. |
protected java.text.AttributedString |
layoutedText
|
protected SVGTextElementBridge.DOMSubtreeModifiedEventListener |
subtreeModifiedEventListener
The DOM EventListener to receive 'DOMSubtreeModified' event. |
protected static java.lang.Integer |
ZERO
|
| Fields inherited from class org.apache.batik.bridge.AbstractGraphicsNodeBridge |
ctx, e, node |
| 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 | |
SVGTextElementBridge()
Constructs a new bridge for the <text> element. |
|
| Method Summary | |
protected void |
addChildGlyphPositionAttributes(java.text.AttributedString as,
Element element,
BridgeContext ctx)
|
protected void |
addChildPaintAttributes(java.text.AttributedString as,
Element element,
TextNode node,
SVGTextElementBridge.TextDecoration textDecoration,
BridgeContext ctx)
|
protected void |
addContextToChild(BridgeContext ctx,
Element e)
Add to the element children of the node, a SVGContext to support dynamic updated . |
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. |
protected java.text.AttributedString |
buildAttributedString(BridgeContext ctx,
Element element)
Creates the attributed string which represents 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 void |
computeLayoutedText()
Recompute the layout of the <text> node. |
GraphicsNode |
createGraphicsNode(BridgeContext ctx,
Element e)
Creates a GraphicsNode according to the specified parameters. |
protected void |
fillAttributedStringBuffer(BridgeContext ctx,
Element element,
boolean top,
TextPath textPath,
SVGTextElementBridge.AttributedStringBuffer asb)
Fills the given AttributedStringBuffer. |
protected java.util.Map |
getAttributeMap(BridgeContext ctx,
Element element,
TextPath textPath)
Returns the map to pass to the current characters. |
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 SVGTextElementBridge.TextDecoration |
getParentTextDecoration(java.text.AttributedCharacterIterator aci,
Element child)
Retrieve in the AttributeString the closest parent of the node 'child' and extract the text decorations of the parent. |
protected SVGTextElementBridge.TextDecoration |
getTextDecoration(Element element,
GraphicsNode node,
SVGTextElementBridge.TextDecoration parent,
BridgeContext ctx)
Constructs a TextDecoration object for the specified element. |
void |
handleCSSEngineEvent(CSSEngineEvent evt)
Invoked when CSS properties have changed on an element. |
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 |
handleDOMChildNodeRemovedEvent(MutationEvent evt)
Invoked when an MutationEvent of type 'DOMNodeRemoved' 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 'DOMNodeInserted' is fired. |
void |
handleDOMSubtreeModifiedEvent(MutationEvent evt)
Invoked when an MutationEvent of type 'DOMSubtree' is fired. |
protected void |
initializeDynamicSupport(BridgeContext ctx,
Element e,
GraphicsNode node)
This method insures that any modification to a text element and its children is going to be reflected into the GVT tree. |
protected GraphicsNode |
instantiateGraphicsNode()
Creates the GraphicsNode depending on the GraphicsNodeBridge implementation. |
boolean |
isComposite()
Returns false as text is not a container. |
protected boolean |
isParentDisplayed(Node childNode)
Indicate of the parent of a node is a displayed element. |
protected boolean |
nodeAncestorOf(Node node1,
Node node2)
Returns true if node1 is an ancestor of node2 |
protected java.lang.String |
normalizeString(java.lang.String s,
boolean preserve,
boolean stripfirst,
boolean striplast)
Normalizes the given string. |
| Methods inherited from class org.apache.batik.bridge.AbstractGraphicsNodeBridge |
dispose, getBBox, getCTM, getDisplay, getFontSize, getGlobalTransform, getPixelToMM, getPixelUnitToMillimeter, getViewportHeight, getViewportWidth, handleGeometryChanged |
| Methods inherited from class org.apache.batik.bridge.AbstractSVGBridge |
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.Bridge |
getNamespaceURI |
| Field Detail |
protected static final java.lang.Integer ZERO
protected java.text.AttributedString layoutedText
protected SVGTextElementBridge.DOMChildNodeRemovedEventListener childNodeRemovedEventListener
protected SVGTextElementBridge.DOMSubtreeModifiedEventListener subtreeModifiedEventListener
| Constructor Detail |
public SVGTextElementBridge()
| Method Detail |
public java.lang.String getLocalName()
public Bridge getInstance()
getInstance in class AbstractSVGBridge
public GraphicsNode createGraphicsNode(BridgeContext ctx,
Element e)
createGraphicsNode in class AbstractGraphicsNodeBridgectx - the bridge context to usee - the element that describes the graphics node to buildprotected GraphicsNode instantiateGraphicsNode()
instantiateGraphicsNode in class AbstractGraphicsNodeBridge
protected java.awt.geom.Point2D getLocation(BridgeContext ctx,
Element e)
ctx - the bridge context to usee - the text element
public void buildGraphicsNode(BridgeContext ctx,
Element e,
GraphicsNode node)
buildGraphicsNode in class AbstractGraphicsNodeBridgectx - the bridge context to usee - the element that describes the graphics node to buildnode - the graphics node to buildpublic boolean isComposite()
protected void initializeDynamicSupport(BridgeContext ctx,
Element e,
GraphicsNode node)
initializeDynamicSupport in class AbstractGraphicsNodeBridge
protected void addContextToChild(BridgeContext ctx,
Element e)
SVGContext to support dynamic updated . This is
recurssive, the children of the nodes are also traversed to add
to the support elements their contextctx - a BridgeContext valuee - an Element valueSVGContext,
BridgeUpdateHandlerpublic void handleDOMNodeInsertedEvent(MutationEvent evt)
handleDOMNodeInsertedEvent in class AbstractGraphicsNodeBridgepublic void handleDOMNodeRemovedEvent(MutationEvent evt)
handleDOMNodeRemovedEvent in class AbstractGraphicsNodeBridgepublic void handleDOMChildNodeRemovedEvent(MutationEvent evt)
public void handleDOMSubtreeModifiedEvent(MutationEvent evt)
public void handleDOMCharacterDataModified(MutationEvent evt)
handleDOMCharacterDataModified in class AbstractGraphicsNodeBridgeprotected boolean isParentDisplayed(Node childNode)
protected void computeLayoutedText()
layoutedText with the new
value.public void handleDOMAttrModifiedEvent(MutationEvent evt)
handleDOMAttrModifiedEvent in class AbstractGraphicsNodeBridgepublic void handleCSSEngineEvent(CSSEngineEvent evt)
handleCSSEngineEvent in class AbstractGraphicsNodeBridgeevt - the CSSEngine event that describes the updateprotected void handleCSSPropertyChanged(int property)
handleCSSPropertyChanged in class AbstractGraphicsNodeBridge
protected java.text.AttributedString buildAttributedString(BridgeContext ctx,
Element element)
ctx - the bridge context to useelement - the text element
protected void fillAttributedStringBuffer(BridgeContext ctx,
Element element,
boolean top,
TextPath textPath,
SVGTextElementBridge.AttributedStringBuffer asb)
protected java.lang.String normalizeString(java.lang.String s,
boolean preserve,
boolean stripfirst,
boolean striplast)
protected boolean nodeAncestorOf(Node node1,
Node node2)
protected void addGlyphPositionAttributes(java.text.AttributedString as,
Element element,
BridgeContext ctx)
protected void addChildGlyphPositionAttributes(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 void addChildPaintAttributes(java.text.AttributedString as,
Element element,
TextNode node,
SVGTextElementBridge.TextDecoration textDecoration,
BridgeContext ctx)
protected java.util.Map getAttributeMap(BridgeContext ctx,
Element element,
TextPath textPath)
protected SVGTextElementBridge.TextDecoration getParentTextDecoration(java.text.AttributedCharacterIterator aci,
Element child)
aci - an AttributedCharacterIterator valuechild - an Element valueTextDecoration value
protected SVGTextElementBridge.TextDecoration getTextDecoration(Element element,
GraphicsNode node,
SVGTextElementBridge.TextDecoration parent,
BridgeContext ctx)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||