|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.batik.bridge.AbstractSVGBridge
org.apache.batik.bridge.AnimatableSVGBridge
org.apache.batik.bridge.AbstractGraphicsNodeBridge
org.apache.batik.bridge.SVGTextElementBridge
org.apache.batik.bridge.svg12.SVG12TextElementBridge
org.apache.batik.bridge.svg12.SVGFlowRootElementBridge
public class SVGFlowRootElementBridge
Bridge class for the <flowRoot> element.
| Nested Class Summary | |
|---|---|
protected class |
SVGFlowRootElementBridge.FlowContentBridge
Bridge class for flow text children that contain text. |
protected class |
SVGFlowRootElementBridge.RegionChangeListener
svg:shapechange listener for flowRegion elements. |
| Nested classes/interfaces inherited from class org.apache.batik.bridge.svg12.SVG12TextElementBridge |
|---|
SVG12TextElementBridge.DOMChildNodeRemovedEventListener, SVG12TextElementBridge.DOMSubtreeModifiedEventListener |
| Field Summary | |
|---|---|
static GVTAttributedCharacterIterator.TextAttribute |
ANCHOR_TYPE
|
static AttributedCharacterIterator.Attribute |
FLOW_EMPTY_PARAGRAPH
|
static AttributedCharacterIterator.Attribute |
FLOW_LINE_BREAK
|
static AttributedCharacterIterator.Attribute |
FLOW_PARAGRAPH
|
static AttributedCharacterIterator.Attribute |
FLOW_REGIONS
|
protected Map |
flowRegionNodes
Map of flowRegion elements to their graphics nodes. |
static GVTAttributedCharacterIterator.TextAttribute |
KERNING
|
static GVTAttributedCharacterIterator.TextAttribute |
LETTER_SPACING
|
static AttributedCharacterIterator.Attribute |
LINE_HEIGHT
|
protected SVGFlowRootElementBridge.RegionChangeListener |
regionChangeListener
Listener for flowRegion changes. |
protected int |
startLen
|
protected TextNode |
textNode
|
static GVTAttributedCharacterIterator.TextAttribute |
TEXTPATH
|
static GVTAttributedCharacterIterator.TextAttribute |
WORD_SPACING
|
| Fields inherited from class org.apache.batik.bridge.SVGTextElementBridge |
|---|
ALT_GLYPH_HANDLER, BASELINE_SHIFT, childNodeRemovedEventListener, elemTPI, endLimit, GVT_FONT_FAMILIES, GVT_FONTS, laidoutText, PAINT_INFO, subtreeModifiedEventListener, TEXT_COMPOUND_DELIMITER, TEXT_COMPOUND_ID, usingComplexSVGFont, ZERO |
| Fields inherited from class org.apache.batik.bridge.AbstractGraphicsNodeBridge |
|---|
bbox, bboxShape, isSVG12, node, unitContext |
| Fields inherited from class org.apache.batik.bridge.AnimatableSVGBridge |
|---|
ctx, e, targetListeners |
| Fields inherited from interface org.apache.batik.dom.svg.SVGContext |
|---|
PERCENTAGE_FONT_SIZE, PERCENTAGE_VIEWPORT_HEIGHT, PERCENTAGE_VIEWPORT_SIZE, PERCENTAGE_VIEWPORT_WIDTH |
| 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_BROKEN, ERR_URI_IMAGE_INVALID, ERR_URI_IO, ERR_URI_MALFORMED, ERR_URI_REFERENCE_A_DOCUMENT, ERR_URI_UNSECURE, ERR_XLINK_HREF_CIRCULAR_DEPENDENCIES, URI_IMAGE_ERROR |
| Constructor Summary | |
|---|---|
SVGFlowRootElementBridge()
Constructs a new bridge for the <flowRoot> element. |
|
| Method Summary | |
|---|---|
protected void |
addContextToChild(BridgeContext ctx,
Element e)
Add to the element children of the node, a SVGContext to support dynamic update. |
protected 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 |
checkMap(Map attrs)
|
protected void |
computeLaidoutText(BridgeContext ctx,
Element e,
GraphicsNode node)
Recompute the layout of the <text> node. |
GraphicsNode |
createGraphicsNode(BridgeContext ctx,
Element e)
Creates a GraphicsNode according to the specified parameters. |
protected void |
dumpACIWord(AttributedString as)
|
protected void |
fillAttributedStringBuffer(BridgeContext ctx,
Element element,
boolean top,
Integer bidiLevel,
Map initialAttributes,
SVGTextElementBridge.AttributedStringBuffer asb,
List lnLocs)
Fills the given AttributedStringBuffer. |
protected AttributedString |
gatherFlowPara(BridgeContext ctx,
Element div)
|
protected void |
gatherRegionInfo(BridgeContext ctx,
Element rgn,
float verticalAlign,
List regions)
|
protected Map |
getAttributeMap(BridgeContext ctx,
Element element,
TextPath textPath,
Integer bidiLevel,
Map result)
Returns the map to pass to the current characters. |
protected AttributedString |
getFlowDiv(BridgeContext ctx,
Element element)
|
protected Element |
getFlowDivElement(Element elem)
|
Bridge |
getInstance()
Returns a new instance of this bridge. |
protected float |
getLineHeight(BridgeContext ctx,
Element element,
float fontSize)
|
String |
getLocalName()
Returns 'flowRoot'. |
protected Point2D |
getLocation(BridgeContext ctx,
Element e)
Returns the text node location In this case the text node may have serveral effective locations (one for each flow region). |
String |
getNamespaceURI()
Returns the SVG namespace URI. |
protected List |
getRegions(BridgeContext ctx,
Element element)
Returns a list of Shapes that define the flow regions. |
protected TextNode |
getTextNode()
|
protected void |
initCSSPropertyIndexes(Element e)
|
protected GraphicsNode |
instantiateGraphicsNode()
Creates the graphics node for this element. |
boolean |
isComposite()
Returns false as text is not a container. |
protected boolean |
isTextChild(Element e)
|
protected boolean |
isTextElement(Element e)
|
BlockInfo |
makeBlockInfo(BridgeContext ctx,
Element element)
|
protected void |
removeContextFromChild(BridgeContext ctx,
Element e)
From the SVGContext from the element children of the node. |
| Methods inherited from class org.apache.batik.bridge.svg12.SVG12TextElementBridge |
|---|
addTextEventListeners, getFirstChild, getNextSibling, getParentNode, handleBindingEvent, handleContentSelectionChangedEvent, handleDOMCharacterDataModified, removeTextEventListeners |
| Methods inherited from class org.apache.batik.bridge.AnimatableSVGBridge |
|---|
addTargetListener, fireBaseAttributeListeners, removeTargetListener |
| 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.BridgeUpdateHandler |
|---|
dispose, handleAnimatedAttributeChanged, handleCSSEngineEvent, handleDOMAttrModifiedEvent, handleDOMNodeInsertedEvent, handleDOMNodeRemovedEvent, handleOtherAnimationChanged |
| Field Detail |
|---|
public static final AttributedCharacterIterator.Attribute FLOW_PARAGRAPH
public static final AttributedCharacterIterator.Attribute FLOW_EMPTY_PARAGRAPH
public static final AttributedCharacterIterator.Attribute FLOW_LINE_BREAK
public static final AttributedCharacterIterator.Attribute FLOW_REGIONS
public static final AttributedCharacterIterator.Attribute LINE_HEIGHT
public static final GVTAttributedCharacterIterator.TextAttribute TEXTPATH
public static final GVTAttributedCharacterIterator.TextAttribute ANCHOR_TYPE
public static final GVTAttributedCharacterIterator.TextAttribute LETTER_SPACING
public static final GVTAttributedCharacterIterator.TextAttribute WORD_SPACING
public static final GVTAttributedCharacterIterator.TextAttribute KERNING
protected Map flowRegionNodes
protected TextNode textNode
protected SVGFlowRootElementBridge.RegionChangeListener regionChangeListener
protected int startLen
| Constructor Detail |
|---|
public SVGFlowRootElementBridge()
| Method Detail |
|---|
protected TextNode getTextNode()
getTextNode in class SVGTextElementBridgepublic String getNamespaceURI()
getNamespaceURI in interface BridgegetNamespaceURI in class AbstractSVGBridgepublic String getLocalName()
getLocalName in interface BridgegetLocalName in class SVGTextElementBridgepublic Bridge getInstance()
getInstance in interface BridgegetInstance in interface GraphicsNodeBridgegetInstance in class SVG12TextElementBridgepublic boolean isComposite()
isComposite in interface GraphicsNodeBridgeisComposite in class SVGTextElementBridge
public GraphicsNode createGraphicsNode(BridgeContext ctx,
Element e)
GraphicsNode according to the specified parameters.
createGraphicsNode in interface GraphicsNodeBridgecreateGraphicsNode in class SVGTextElementBridgectx - the bridge context to usee - the element that describes the graphics node to build
protected GraphicsNode instantiateGraphicsNode()
instantiateGraphicsNode in class SVGTextElementBridge
protected Point2D getLocation(BridgeContext ctx,
Element e)
getLocation in class SVGTextElementBridgectx - the bridge context to usee - the text elementprotected boolean isTextElement(Element e)
isTextElement in class SVGTextElementBridgeprotected boolean isTextChild(Element e)
isTextChild in class SVGTextElementBridge
public void buildGraphicsNode(BridgeContext ctx,
Element e,
GraphicsNode node)
buildGraphicsNode in interface GraphicsNodeBridgebuildGraphicsNode in class SVGTextElementBridgectx - the bridge context to usee - the element that describes the graphics node to buildnode - the graphics node to build
protected void computeLaidoutText(BridgeContext ctx,
Element e,
GraphicsNode node)
SVGTextElementBridgelaidoutText with the new
value.
computeLaidoutText in class SVGTextElementBridge
protected void addContextToChild(BridgeContext ctx,
Element e)
SVGContext to support dynamic update. This is
recursive, the children of the nodes are also traversed to add
to the support elements their context
addContextToChild in class SVGTextElementBridgectx - a BridgeContext valuee - an Element valueSVGContext,
BridgeUpdateHandler
protected void removeContextFromChild(BridgeContext ctx,
Element e)
SVGContext from the element children of the node.
removeContextFromChild in class SVGTextElementBridgectx - the BridgeContext for the documente - the Element whose subtree's elements will have
threir SVGContexts removedSVGContext,
BridgeUpdateHandler
protected AttributedString buildAttributedString(BridgeContext ctx,
Element element)
buildAttributedString in class SVGTextElementBridgectx - the bridge context to useelement - the text elementprotected void dumpACIWord(AttributedString as)
protected Element getFlowDivElement(Element elem)
protected AttributedString getFlowDiv(BridgeContext ctx,
Element element)
protected AttributedString gatherFlowPara(BridgeContext ctx,
Element div)
protected List getRegions(BridgeContext ctx,
Element element)
protected void gatherRegionInfo(BridgeContext ctx,
Element rgn,
float verticalAlign,
List regions)
protected void fillAttributedStringBuffer(BridgeContext ctx,
Element element,
boolean top,
Integer bidiLevel,
Map initialAttributes,
SVGTextElementBridge.AttributedStringBuffer asb,
List lnLocs)
protected Map getAttributeMap(BridgeContext ctx,
Element element,
TextPath textPath,
Integer bidiLevel,
Map result)
SVGTextElementBridge
getAttributeMap in class SVGTextElementBridgectx - the BridgeContext to use for throwing exceptionselement - the text element whose attributes are being collectedtextPath - the text path that the characters of element
will be placed alongbidiLevel - the bidi level of elementresult - a Map into which the attributes of element's
characters will be stored
protected void checkMap(Map attrs)
protected void initCSSPropertyIndexes(Element e)
public BlockInfo makeBlockInfo(BridgeContext ctx,
Element element)
protected float getLineHeight(BridgeContext ctx,
Element element,
float fontSize)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||