| java.lang.Object org.apache.batik.bridge.AbstractSVGBridge org.apache.batik.bridge.AnimatableSVGBridge org.apache.batik.bridge.AbstractGraphicsNodeBridge org.apache.batik.bridge.SVGTextElementBridge
All known Subclasses: org.apache.batik.bridge.svg12.SVG12TextElementBridge, org.apache.batik.extension.svg.BatikFlowTextElementBridge,
Inner Class :protected class DOMChildNodeRemovedEventListener implements EventListener | |
Inner Class :protected class DOMSubtreeModifiedEventListener implements EventListener | |
Inner Class :protected static class AttributedStringBuffer | |
Inner Class :abstract protected class AbstractTextChildBridgeUpdateHandler extends AbstractTextChildSVGContext implements BridgeUpdateHandler | |
Inner Class :protected class AbstractTextChildTextContent extends AbstractTextChildBridgeUpdateHandler implements SVGTextContent | |
Inner Class :protected class TRefBridge extends AbstractTextChildTextContent | |
Inner Class :protected class TextPathBridge extends AbstractTextChildTextContent | |
Inner Class :protected class TspanBridge extends AbstractTextChildTextContent | |
Inner Class :protected static class CharacterInformation | |
Method Summary | |
protected void | addChildGlyphPositionAttributes(AttributedString as, Element element, BridgeContext ctx) | protected void | addChildPaintAttributes(AttributedString as, Element element, TextNode node, TextPaintInfo parentPI, BridgeContext ctx) | protected void | addContextToChild(BridgeContext ctx, Element e) Add to the element children of the node, a
SVGContext to support dynamic update. | protected void | addGlyphPositionAttributes(AttributedString as, Element element, BridgeContext ctx) Adds glyph position attributes to an AttributedString. | protected void | addPaintAttributes(AttributedString as, Element element, TextNode node, TextPaintInfo pi, BridgeContext ctx) Adds painting attributes to an AttributedString. | protected void | addTextEventListeners(BridgeContext ctx, NodeEventTarget e) Adds the DOM listeners for this text bridge. | protected AttributedString | buildAttributedString(BridgeContext ctx, Element element) Creates the attributed string which represents the given text
element children. | public void | buildGraphicsNode(BridgeContext ctx, Element e, GraphicsNode node) Builds using the specified BridgeContext and element, the
specified graphics node. | protected void | computeLaidoutText(BridgeContext ctx, Element e, GraphicsNode node) Recompute the layout of the <text> node.
Assign onto the TextNode pending to the element
the new recomputed AttributedString. | public GraphicsNode | createGraphicsNode(BridgeContext ctx, Element e) Creates a GraphicsNode according to the specified parameters. | protected float | distanceBetweenRun(CharacterInformation last, CharacterInformation first) | protected float | distanceFirstLastCharacterInRun(CharacterInformation first, CharacterInformation last) | protected void | fillAttributedStringBuffer(BridgeContext ctx, Element element, boolean top, TextPath textPath, Integer bidiLevel, AttributedStringBuffer asb) Fills the given AttributedStringBuffer. | protected Map | getAttributeMap(BridgeContext ctx, Element element, TextPath textPath, Integer bidiLevel) Returns the map to pass to the current characters. | public int | getCharNumAtPosition(float x, float y) | protected int | getCharNumAtPosition(Element e, float x, float y) | protected CharacterInformation | getCharacterInformation(List list, int startIndex, int charnum, AttributedCharacterIterator aci) Retrieve the information about a character
of en element. | public float | getComputedTextLength() | protected float | getComputedTextLength(Element e) Implementation of
org.w3c.dom.svg.SVGTextContentElement.getComputedTextLength . | int | getElementEndIndex(Element element) | int | getElementStartIndex(Element element) | protected Point2D | getEndPoint(CharacterInformation info) | public Point2D | getEndPositionOfChar(int charnum) | protected Point2D | getEndPositionOfChar(Element element, int charnum) Implementation of
org.w3c.dom.svg.SVGTextContentElement.getEndPositionOfChar(int charnum) . | public Rectangle2D | getExtentOfChar(int charnum) | protected Rectangle2D | getExtentOfChar(Element element, int charnum) Implementation of
org.w3c.dom.svg.SVGTextContentElement.getExtentOfChar(int charnum) . | protected Node | getFirstChild(Node n) Returns the first child node of the given node that should be
processed by the text bridge. | protected List | getFontList(BridgeContext ctx, Element element, Map result) This method adds all the font related properties to result
It also builds a List of the GVTFonts and returns it. | public Bridge | getInstance() Returns a new instance of this bridge. | public String | getLocalName() Returns 'text'. | protected Point2D | getLocation(BridgeContext ctx, Element e) Returns the text node location according to the 'x' and 'y'
attributes of the specified text element. | protected Node | getNextSibling(Node n) Returns the next sibling node of the given node that should be
processed by the text bridge. | public int | getNumberOfChars() | protected int | getNumberOfChars(Element element) Implementation of
org.w3c.dom.svg.SVGTextContentElement.getNumberOfChars . | protected Node | getParentNode(Node n) Returns the parent node of the given node that should be
processed by the text bridge. | protected TextPaintInfo | getParentTextPaintInfo(Element child) Retrieve in the AttributeString the closest parent
of the node 'child' and extract the text decorations
of the parent. | public float | getRotationOfChar(int charnum) | protected float | getRotationOfChar(Element element, int charnum) Implementation of
org.w3c.dom.svg.SVGTextContentElement.getRotationOfChar(int charnum) . | protected Point2D | getStartPoint(CharacterInformation info) | public Point2D | getStartPositionOfChar(int charnum) | protected Point2D | getStartPositionOfChar(Element element, int charnum) Implementation of
org.w3c.dom.svg.SVGTextContentElement.getStartPositionOfChar(int charnum) . | public float | getSubStringLength(int charnum, int nchars) | protected float | getSubStringLength(Element element, int charnum, int nchars) Implementation of
org.w3c.dom.svg.SVGTextContentElement.getSubStringLength(int charnumint nchars) . | public static Rectangle2D | getTextBounds(BridgeContext ctx, Element elem, boolean checkSensitivity) | public Set | getTextEnclosureSet(AffineTransform at, Rectangle2D rect) | public static boolean | getTextIntersection(BridgeContext ctx, Element elem, AffineTransform ati, Rectangle2D rect, boolean checkSensitivity) | public Set | getTextIntersectionSet(AffineTransform at, Rectangle2D rect) | protected TextNode | getTextNode() | protected TextPaintInfo | getTextPaintInfo(Element element, GraphicsNode node, TextPaintInfo parentTPI, BridgeContext ctx) Constructs a TextDecoration object for the specified element. | protected List | getTextRuns(TextNode node) Retrieve the list of layout for the
text node. | public void | handleAnimatedAttributeChanged(AnimatedLiveAttributeValue alav) Invoked when the animated value of an animatable attribute has changed. | public 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. | public void | handleDOMCharacterDataModified(MutationEvent evt) Invoked when an MutationEvent of type 'DOMCharacterDataModified'
is fired. | public void | handleDOMChildNodeRemovedEvent(MutationEvent evt) Invoked when an MutationEvent of type 'DOMNodeRemoved' is fired. | public void | handleDOMNodeInsertedEvent(MutationEvent evt) Invoked when an MutationEvent of type 'DOMNodeInserted' is fired. | public void | handleDOMNodeRemovedEvent(MutationEvent evt) Invoked when an MutationEvent of type 'DOMNodeRemoved' is fired. | public void | handleDOMSubtreeModifiedEvent(MutationEvent evt) Invoked when an MutationEvent of type 'DOMSubtree' is fired. | protected void | initializeDynamicSupport(BridgeContext ctx, Element e, GraphicsNode node) This method ensures 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. | public 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 | isTextChild(Element e) | protected boolean | isTextElement(Element e) | public static boolean | isTextSensitive(Element e) | protected boolean | nodeAncestorOf(Node node1, Node node2) | protected String | normalizeString(String s, boolean preserve, boolean stripfirst) Normalizes the given string. | protected void | rebuildACI() | protected void | removeTextEventListeners(BridgeContext ctx, NodeEventTarget e) Removes the DOM listeners for this text bridge. | public void | selectSubString(int charnum, int nchars) | protected void | selectSubString(Element element, int charnum, int nchars) Select an ensemble of characters for that element. | public void | setBaseTextPaintInfo(TextPaintInfo pi, Element element, GraphicsNode node, BridgeContext ctx) | public void | setDecorationTextPaintInfo(TextPaintInfo pi, Element element) |
childNodeRemovedEventListener | protected DOMChildNodeRemovedEventListener childNodeRemovedEventListener(Code) | | The DOM EventListener to receive 'DOMNodeRemoved' event.
|
endLimit | protected int endLimit(Code) | | This is used to store the end of the last piece of text
content from an element with xml:space="preserve". When
we are stripping trailing spaces we need to make sure
we don't strip anything before this point.
|
subtreeModifiedEventListener | protected DOMSubtreeModifiedEventListener subtreeModifiedEventListener(Code) | | The DOM EventListener to receive 'DOMSubtreeModified' event.
|
usingComplexSVGFont | protected boolean usingComplexSVGFont(Code) | | |
SVGTextElementBridge | public SVGTextElementBridge()(Code) | | Constructs a new bridge for the <text> element.
|
buildAttributedString | protected AttributedString buildAttributedString(BridgeContext ctx, Element element)(Code) | | Creates the attributed string which represents the given text
element children.
Parameters: ctx - the bridge context to use Parameters: element - the text element |
buildGraphicsNode | public void buildGraphicsNode(BridgeContext ctx, Element e, GraphicsNode node)(Code) | | Builds using the specified BridgeContext and element, the
specified graphics node.
Parameters: ctx - the bridge context to use Parameters: e - the element that describes the graphics node to build Parameters: node - the graphics node to build |
computeLaidoutText | protected void computeLaidoutText(BridgeContext ctx, Element e, GraphicsNode node)(Code) | | Recompute the layout of the <text> node.
Assign onto the TextNode pending to the element
the new recomputed AttributedString. Also
update laidoutText with the new
value.
|
createGraphicsNode | public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e)(Code) | | Creates a GraphicsNode according to the specified parameters.
Parameters: ctx - the bridge context to use Parameters: e - the element that describes the graphics node to build a graphics node that represents the specified element |
distanceBetweenRun | protected float distanceBetweenRun(CharacterInformation last, CharacterInformation first)(Code) | | |
distanceFirstLastCharacterInRun | protected float distanceFirstLastCharacterInRun(CharacterInformation first, CharacterInformation last)(Code) | | |
fillAttributedStringBuffer | protected void fillAttributedStringBuffer(BridgeContext ctx, Element element, boolean top, TextPath textPath, Integer bidiLevel, AttributedStringBuffer asb)(Code) | | Fills the given AttributedStringBuffer.
|
getCharNumAtPosition | public int getCharNumAtPosition(float x, float y)(Code) | | |
getCharNumAtPosition | protected int getCharNumAtPosition(Element e, float x, float y)(Code) | | |
getCharacterInformation | protected CharacterInformation getCharacterInformation(List list, int startIndex, int charnum, AttributedCharacterIterator aci)(Code) | | Retrieve the information about a character
of en element. The element first character in
the ACI is 'firstChar' and the character
look for is the charnum th character in the
element
Parameters: list - list of the layouts Parameters: startIndex - index in the ACI of the firstcharacter for the element Parameters: charnum - index of the character (among thecharacters of the element) looked for. information about the glyph representing thecharacter |
getComputedTextLength | public float getComputedTextLength()(Code) | | |
getComputedTextLength | protected float getComputedTextLength(Element e)(Code) | | Implementation of
org.w3c.dom.svg.SVGTextContentElement.getComputedTextLength .
|
getElementStartIndex | int getElementStartIndex(Element element)(Code) | | |
getEndPoint | protected Point2D getEndPoint(CharacterInformation info)(Code) | | |
getEndPositionOfChar | public Point2D getEndPositionOfChar(int charnum)(Code) | | |
getEndPositionOfChar | protected Point2D getEndPositionOfChar(Element element, int charnum)(Code) | | Implementation of
org.w3c.dom.svg.SVGTextContentElement.getEndPositionOfChar(int charnum) .
|
getExtentOfChar | protected Rectangle2D getExtentOfChar(Element element, int charnum)(Code) | | Implementation of
org.w3c.dom.svg.SVGTextContentElement.getExtentOfChar(int charnum) .
|
getFirstChild | protected Node getFirstChild(Node n)(Code) | | Returns the first child node of the given node that should be
processed by the text bridge.
|
getFontList | protected List getFontList(BridgeContext ctx, Element element, Map result)(Code) | | This method adds all the font related properties to result
It also builds a List of the GVTFonts and returns it.
|
getInstance | public Bridge getInstance()(Code) | | Returns a new instance of this bridge.
|
getLocalName | public String getLocalName()(Code) | | Returns 'text'.
|
getLocation | protected Point2D getLocation(BridgeContext ctx, Element e)(Code) | | Returns the text node location according to the 'x' and 'y'
attributes of the specified text element.
Parameters: ctx - the bridge context to use Parameters: e - the text element |
getNextSibling | protected Node getNextSibling(Node n)(Code) | | Returns the next sibling node of the given node that should be
processed by the text bridge.
|
getNumberOfChars | public int getNumberOfChars()(Code) | | |
getNumberOfChars | protected int getNumberOfChars(Element element)(Code) | | Implementation of
org.w3c.dom.svg.SVGTextContentElement.getNumberOfChars .
|
getParentNode | protected Node getParentNode(Node n)(Code) | | Returns the parent node of the given node that should be
processed by the text bridge.
|
getParentTextPaintInfo | protected TextPaintInfo getParentTextPaintInfo(Element child)(Code) | | Retrieve in the AttributeString the closest parent
of the node 'child' and extract the text decorations
of the parent.
Parameters: child - an Element value a TextDecoration value |
getRotationOfChar | public float getRotationOfChar(int charnum)(Code) | | |
getRotationOfChar | protected float getRotationOfChar(Element element, int charnum)(Code) | | Implementation of
org.w3c.dom.svg.SVGTextContentElement.getRotationOfChar(int charnum) .
|
getStartPoint | protected Point2D getStartPoint(CharacterInformation info)(Code) | | |
getStartPositionOfChar | public Point2D getStartPositionOfChar(int charnum)(Code) | | |
getStartPositionOfChar | protected Point2D getStartPositionOfChar(Element element, int charnum)(Code) | | Implementation of
org.w3c.dom.svg.SVGTextContentElement.getStartPositionOfChar(int charnum) .
|
getSubStringLength | public float getSubStringLength(int charnum, int nchars)(Code) | | |
getSubStringLength | protected float getSubStringLength(Element element, int charnum, int nchars)(Code) | | Implementation of
org.w3c.dom.svg.SVGTextContentElement.getSubStringLength(int charnumint nchars) .
|
getTextRuns | protected List getTextRuns(TextNode node)(Code) | | Retrieve the list of layout for the
text node.
|
handleAnimatedAttributeChanged | public void handleAnimatedAttributeChanged(AnimatedLiveAttributeValue alav)(Code) | | Invoked when the animated value of an animatable attribute has changed.
|
handleCSSEngineEvent | public void handleCSSEngineEvent(CSSEngineEvent evt)(Code) | | Invoked when CSS properties have changed on an element.
Parameters: evt - the CSSEngine event that describes the update |
handleCSSPropertyChanged | protected void handleCSSPropertyChanged(int property)(Code) | | Invoked for each CSS property that has changed.
|
handleDOMCharacterDataModified | public void handleDOMCharacterDataModified(MutationEvent evt)(Code) | | Invoked when an MutationEvent of type 'DOMCharacterDataModified'
is fired.
|
handleDOMChildNodeRemovedEvent | public void handleDOMChildNodeRemovedEvent(MutationEvent evt)(Code) | | Invoked when an MutationEvent of type 'DOMNodeRemoved' is fired.
|
handleDOMNodeInsertedEvent | public void handleDOMNodeInsertedEvent(MutationEvent evt)(Code) | | Invoked when an MutationEvent of type 'DOMNodeInserted' is fired.
|
handleDOMNodeRemovedEvent | public void handleDOMNodeRemovedEvent(MutationEvent evt)(Code) | | Invoked when an MutationEvent of type 'DOMNodeRemoved' is fired.
|
handleDOMSubtreeModifiedEvent | public void handleDOMSubtreeModifiedEvent(MutationEvent evt)(Code) | | Invoked when an MutationEvent of type 'DOMSubtree' is fired.
|
initializeDynamicSupport | protected void initializeDynamicSupport(BridgeContext ctx, Element e, GraphicsNode node)(Code) | | This method ensures that any modification to a text
element and its children is going to be reflected
into the GVT tree.
|
instantiateGraphicsNode | protected GraphicsNode instantiateGraphicsNode()(Code) | | Creates the GraphicsNode depending on the GraphicsNodeBridge
implementation.
|
isComposite | public boolean isComposite()(Code) | | Returns false as text is not a container.
|
isParentDisplayed | protected boolean isParentDisplayed(Node childNode)(Code) | | Indicate of the parent of a node is
a displayed element.
<title>, <desc> and <metadata>
are non displayable elements.
true if the parent of the node is <text>,<tspan>, <tref>, <textPath>, <a>,<altGlyph> |
isTextSensitive | public static boolean isTextSensitive(Element e)(Code) | | |
nodeAncestorOf | protected boolean nodeAncestorOf(Node node1, Node node2)(Code) | | Returns true if node1 is an ancestor of node2
|
normalizeString | protected String normalizeString(String s, boolean preserve, boolean stripfirst)(Code) | | Normalizes the given string.
|
rebuildACI | protected void rebuildACI()(Code) | | |
selectSubString | public void selectSubString(int charnum, int nchars)(Code) | | |
selectSubString | protected void selectSubString(Element element, int charnum, int nchars)(Code) | | Select an ensemble of characters for that element.
TODO : report the selection to the selection
manager in JSVGComponent.
|
Methods inherited from org.apache.batik.bridge.AbstractGraphicsNodeBridge | protected void associateSVGContext(BridgeContext ctx, Element e, GraphicsNode node)(Code)(Java Doc) public void buildGraphicsNode(BridgeContext ctx, Element e, GraphicsNode node)(Code)(Java Doc) protected void checkBBoxChange()(Code)(Java Doc) protected AffineTransform computeTransform(SVGTransformable te, BridgeContext ctx)(Code)(Java Doc) public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e)(Code)(Java Doc) public void dispose()(Code)(Java Doc) protected void disposeTree(Node node)(Code)(Java Doc) protected void disposeTree(Node node, boolean removeContext)(Code)(Java Doc) protected void fireBBoxChangeEvent()(Code)(Java Doc) protected void fireShapeChangeEvent()(Code)(Java Doc) public Rectangle2D getBBox()(Code)(Java Doc) public AffineTransform getCTM()(Code)(Java Doc) public boolean getDisplay(Element e)(Code)(Java Doc) public float getFontSize()(Code)(Java Doc) public AffineTransform getGlobalTransform()(Code)(Java Doc) public float getPixelToMM()(Code)(Java Doc) public float getPixelUnitToMillimeter()(Code)(Java Doc) public AffineTransform getScreenTransform()(Code)(Java Doc) public float getViewportHeight()(Code)(Java Doc) public float getViewportWidth()(Code)(Java Doc) public void handleAnimatedAttributeChanged(AnimatedLiveAttributeValue alav)(Code)(Java Doc) public void handleCSSEngineEvent(CSSEngineEvent evt)(Code)(Java Doc) protected void handleCSSPropertyChanged(int property)(Code)(Java Doc) public void handleDOMAttrModifiedEvent(MutationEvent evt)(Code)(Java Doc) public void handleDOMCharacterDataModified(MutationEvent evt)(Code)(Java Doc) public void handleDOMNodeInsertedEvent(MutationEvent evt)(Code)(Java Doc) public void handleDOMNodeRemovedEvent(MutationEvent evt)(Code)(Java Doc) protected void handleGeometryChanged()(Code)(Java Doc) public void handleOtherAnimationChanged(String type)(Code)(Java Doc) protected void initializeDynamicSupport(BridgeContext ctx, Element e, GraphicsNode node)(Code)(Java Doc) abstract protected GraphicsNode instantiateGraphicsNode()(Code)(Java Doc) public void setScreenTransform(AffineTransform at)(Code)(Java Doc) protected void setTransform(GraphicsNode n, Element e, BridgeContext ctx)(Code)(Java Doc)
|
|
|