Class SVGFlowRootElementBridge

    • Field Detail

      • FLOW_PARAGRAPH

        public static final java.text.AttributedCharacterIterator.Attribute FLOW_PARAGRAPH
      • FLOW_EMPTY_PARAGRAPH

        public static final java.text.AttributedCharacterIterator.Attribute FLOW_EMPTY_PARAGRAPH
      • FLOW_LINE_BREAK

        public static final java.text.AttributedCharacterIterator.Attribute FLOW_LINE_BREAK
      • FLOW_REGIONS

        public static final java.text.AttributedCharacterIterator.Attribute FLOW_REGIONS
      • LINE_HEIGHT

        public static final java.text.AttributedCharacterIterator.Attribute LINE_HEIGHT
      • flowRegionNodes

        protected java.util.Map flowRegionNodes
        Map of flowRegion elements to their graphics nodes.
      • startLen

        protected int startLen
      • marginTopIndex

        int marginTopIndex
      • marginRightIndex

        int marginRightIndex
      • marginBottomIndex

        int marginBottomIndex
      • marginLeftIndex

        int marginLeftIndex
      • indentIndex

        int indentIndex
      • textAlignIndex

        int textAlignIndex
      • lineHeightIndex

        int lineHeightIndex
    • Constructor Detail

      • SVGFlowRootElementBridge

        public SVGFlowRootElementBridge()
        Constructs a new bridge for the <flowRoot> element.
    • Method Detail

      • getLocation

        protected java.awt.geom.Point2D getLocation​(BridgeContext ctx,
                                                    org.w3c.dom.Element e)
        Returns the text node location In this case the text node may have serveral effective locations (one for each flow region). So it always returns 0,0.
        Overrides:
        getLocation in class SVGTextElementBridge
        Parameters:
        ctx - the bridge context to use
        e - the text element
      • addContextToChild

        protected void addContextToChild​(BridgeContext ctx,
                                         org.w3c.dom.Element e)
        Add to the element children of the node, a SVGContext to support dynamic update. This is recursive, the children of the nodes are also traversed to add to the support elements their context
        Overrides:
        addContextToChild in class SVGTextElementBridge
        Parameters:
        ctx - a BridgeContext value
        e - an Element value
        See Also:
        SVGContext, BridgeUpdateHandler
      • buildAttributedString

        protected java.text.AttributedString buildAttributedString​(BridgeContext ctx,
                                                                   org.w3c.dom.Element element)
        Creates the attributed string which represents the given text element children.
        Overrides:
        buildAttributedString in class SVGTextElementBridge
        Parameters:
        ctx - the bridge context to use
        element - the text element
      • dumpACIWord

        protected void dumpACIWord​(java.text.AttributedString as)
      • getFlowDivElement

        protected org.w3c.dom.Element getFlowDivElement​(org.w3c.dom.Element elem)
      • getFlowDiv

        protected java.text.AttributedString getFlowDiv​(BridgeContext ctx,
                                                        org.w3c.dom.Element element)
      • gatherFlowPara

        protected java.text.AttributedString gatherFlowPara​(BridgeContext ctx,
                                                            org.w3c.dom.Element div)
      • getRegions

        protected java.util.List getRegions​(BridgeContext ctx,
                                            org.w3c.dom.Element element)
        Returns a list of Shapes that define the flow regions.
      • gatherRegionInfo

        protected void gatherRegionInfo​(BridgeContext ctx,
                                        org.w3c.dom.Element rgn,
                                        float verticalAlign,
                                        java.util.List regions)
      • fillAttributedStringBuffer

        protected void fillAttributedStringBuffer​(BridgeContext ctx,
                                                  org.w3c.dom.Element element,
                                                  boolean top,
                                                  java.lang.Integer bidiLevel,
                                                  java.util.Map initialAttributes,
                                                  SVGTextElementBridge.AttributedStringBuffer asb,
                                                  java.util.List lnLocs)
        Fills the given AttributedStringBuffer.
      • getAttributeMap

        protected java.util.Map getAttributeMap​(BridgeContext ctx,
                                                org.w3c.dom.Element element,
                                                TextPath textPath,
                                                java.lang.Integer bidiLevel,
                                                java.util.Map result)
        Description copied from class: SVGTextElementBridge
        Returns the map to pass to the current characters.
        Overrides:
        getAttributeMap in class SVGTextElementBridge
        Parameters:
        ctx - the BridgeContext to use for throwing exceptions
        element - the text element whose attributes are being collected
        textPath - the text path that the characters of element will be placed along
        bidiLevel - the bidi level of element
        result - a Map into which the attributes of element's characters will be stored
        Returns:
        a new Map that contains the attributes that must be inherited into a child element if the given element has no characters before the child element
      • checkMap

        protected void checkMap​(java.util.Map attrs)
      • initCSSPropertyIndexes

        protected void initCSSPropertyIndexes​(org.w3c.dom.Element e)
      • getLineHeight

        protected float getLineHeight​(BridgeContext ctx,
                                      org.w3c.dom.Element element,
                                      float fontSize)