Class AbstractAlignmentProcessor

    • Constructor Detail

      • AbstractAlignmentProcessor

        protected AbstractAlignmentProcessor()
    • Method Detail

      • isLastLineAlignment

        public boolean isLastLineAlignment()
      • getStartOfLine

        protected long getStartOfLine()
      • getPageGrid

        protected PageGrid getPageGrid()
      • getElementPositions

        protected long[] getElementPositions()
      • getElementDimensions

        protected long[] getElementDimensions()
      • getEndOfLine

        protected long getEndOfLine()
      • getPagebreakCount

        public int getPagebreakCount()
      • getPageBreak

        protected long getPageBreak​(int pageIndex)
      • getPageBreaks

        protected long[] getPageBreaks()
      • updatePageBreaks

        protected void updatePageBreaks​(long[] pagebreaks,
                                        int pageBreakCount)
      • getBreakableIndex

        protected int getBreakableIndex()
      • setBreakableIndex

        protected void setBreakableIndex​(int breakableIndex)
      • getSkipIndex

        protected int getSkipIndex()
      • setSkipIndex

        protected void setSkipIndex​(int skipIndex)
      • getBreakableMaxAllowedWidth

        protected long getBreakableMaxAllowedWidth()
      • setBreakableMaxAllowedWidth

        protected void setBreakableMaxAllowedWidth​(long breakableMaxAllowedWidth)
      • iterate

        protected int iterate​(InlineSequenceElement[] elements,
                              int maxPos)
        Processes the text and calls the layouting methods. This method returns the index of the last element that fits on the current line.
        elements -
        maxPos -
      • handleElement

        protected abstract int handleElement​(int start,
                                             int count)
        Handle the next input chunk.
        start - the start index
        count - the number of elements in the sequence
        the processing position. Linebreaks will be inserted, if the returned value is equal or less the start index.
      • computeInlineBlock

        protected void computeInlineBlock​(RenderBox box,
                                          long position,
                                          long itemElementWidth)
      • getSequenceFill

        protected int getSequenceFill()
      • performSkipAlignment

        public void performSkipAlignment​(int endIndex)
      • updateBreaksForLastLineAlignment

        protected void updateBreaksForLastLineAlignment()
      • isBorderMarker

        protected boolean isBorderMarker​(InlineSequenceElement element)
        Returns true if element represents border type, namely if it is either StartSequenceElement or EndSequenceElement
        element - element
        true, if element represents border type and false otherwise
      • splitBreakableIfPossible

        protected boolean splitBreakableIfPossible()
        Tries to split a breakable component if possible.

        First, checks whether each of the following conditions is true:

        1. getBreakableIndex() >= 0
        2. nodes[breakableIndex] is an instance of SplittableRenderNode
        3. getBreakableMaxAllowedWidth() > 0
        Then asks the node to split limiting the first kid's width so, that it can be put inside the bounds. The node can be unable to do the separation and return null. If the separation was successful, then the method re-initialises the processors internal fields by invoking reInitializeForHandlingComponentSplit(int, RenderNode[])
        true if the split was done or false otherwise
      • reInitializeForHandlingComponentSplit

        protected void reInitializeForHandlingComponentSplit​(int breakableIndex,
                                                             RenderNode[] replacement)