Class AbstractAlignmentProcessor

    • Constructor Detail

      • AbstractAlignmentProcessor

        public AbstractAlignmentProcessor()
    • Method Detail

      • getStartOfLine

        public long getStartOfLine()
      • getPageGrid

        public PageGrid getPageGrid()
      • getElementPositions

        public long[] getElementPositions()
      • getElementDimensions

        public long[] getElementDimensions()
      • getEndOfLine

        public long getEndOfLine()
      • getPageBreak

        protected long getPageBreak​(int pageIndex)
      • getBreakableIndex

        public int getBreakableIndex()
      • setBreakableIndex

        public void setBreakableIndex​(int breakableIndex)
      • getSkipIndex

        public int getSkipIndex()
      • setSkipIndex

        public void setSkipIndex​(int skipIndex)
      • initialize

        public void initialize​(InlineSequenceElement[] sequence,
                               long start,
                               long end,
                               PageGrid breaks)
        Initializes the alignment process. The start and end parameters specify the line boundaries, and have been precomputed.
        Specified by:
        initialize in interface TextAlignmentProcessor
        Parameters:
        sequence -
        start -
        end -
        breaks -
      • handleElement

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

        protected abstract int handleLayout​(int start,
                                            int count,
                                            int contentIndex,
                                            long usedWidth)
      • computeInlineBlock

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