public abstract class AbstractAlignmentProcessor extends Object implements TextAlignmentProcessor, LastLineTextAlignmentProcessor
Modifier | Constructor and Description |
---|---|
protected |
AbstractAlignmentProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
computeInlineBlock(RenderBox box,
long position,
long itemElementWidth) |
void |
deinitialize() |
protected int |
getBreakableIndex() |
protected long |
getBreakableMaxAllowedWidth() |
protected long[] |
getElementDimensions() |
protected long[] |
getElementPositions() |
protected long |
getEndOfLine() |
protected RenderNode[] |
getNodes() |
protected long |
getPageBreak(int pageIndex) |
int |
getPagebreakCount() |
protected long[] |
getPageBreaks() |
protected PageGrid |
getPageGrid() |
protected InlineSequenceElement[] |
getSequenceElements() |
protected int |
getSequenceFill() |
protected int |
getSkipIndex() |
protected long |
getStartOfLine() |
protected abstract int |
handleElement(int start,
int count)
Handle the next input chunk.
|
boolean |
hasNext() |
void |
initialize(OutputProcessorMetaData metaData,
SequenceList sequence,
long start,
long end,
PageGrid breaks,
boolean overflowX)
Initializes the alignment process.
|
protected void |
initializeForLastLineAlignment(AbstractAlignmentProcessor proc) |
protected void |
initializeForSkipAlignment(AbstractAlignmentProcessor proc,
int endIndex) |
protected boolean |
isBorderMarker(InlineSequenceElement element)
Returns
true if element represents border type, namely if it is either
StartSequenceElement or EndSequenceElement |
boolean |
isLastLineAlignment() |
protected int |
iterate(InlineSequenceElement[] elements,
int maxPos)
Processes the text and calls the layouting methods.
|
RenderBox |
next() |
void |
performLastLineAlignment() |
void |
performSkipAlignment(int endIndex) |
protected void |
reInitializeForHandlingComponentSplit(int breakableIndex,
RenderNode[] replacement) |
protected void |
setBreakableIndex(int breakableIndex) |
protected void |
setBreakableMaxAllowedWidth(long breakableMaxAllowedWidth) |
protected void |
setSkipIndex(int skipIndex) |
protected boolean |
splitBreakableIfPossible()
Tries to split a breakable component if possible.
|
protected void |
updateBreaksForLastLineAlignment() |
void |
updateLineSize(long start,
long end) |
protected void |
updatePageBreaks(long[] pagebreaks,
int pageBreakCount) |
public boolean isLastLineAlignment()
protected long getStartOfLine()
protected PageGrid getPageGrid()
protected InlineSequenceElement[] getSequenceElements()
protected RenderNode[] getNodes()
protected long[] getElementPositions()
protected long[] getElementDimensions()
protected long getEndOfLine()
public int getPagebreakCount()
protected long getPageBreak(int pageIndex)
protected long[] getPageBreaks()
protected void updatePageBreaks(long[] pagebreaks, int pageBreakCount)
protected int getBreakableIndex()
protected void setBreakableIndex(int breakableIndex)
protected int getSkipIndex()
protected void setSkipIndex(int skipIndex)
protected long getBreakableMaxAllowedWidth()
protected void setBreakableMaxAllowedWidth(long breakableMaxAllowedWidth)
protected int iterate(InlineSequenceElement[] elements, int maxPos)
elements
- maxPos
- public void initialize(OutputProcessorMetaData metaData, SequenceList sequence, long start, long end, PageGrid breaks, boolean overflowX)
initialize
in interface LastLineTextAlignmentProcessor
initialize
in interface TextAlignmentProcessor
sequence
- start
- end
- breaks
- public void updateLineSize(long start, long end)
updateLineSize
in interface LastLineTextAlignmentProcessor
updateLineSize
in interface TextAlignmentProcessor
public void deinitialize()
deinitialize
in interface LastLineTextAlignmentProcessor
deinitialize
in interface TextAlignmentProcessor
public boolean hasNext()
hasNext
in interface TextAlignmentProcessor
public RenderBox next()
next
in interface TextAlignmentProcessor
protected abstract int handleElement(int start, int count)
start
- the start indexcount
- the number of elements in the sequenceprotected void computeInlineBlock(RenderBox box, long position, long itemElementWidth)
protected int getSequenceFill()
public void performLastLineAlignment()
performLastLineAlignment
in interface LastLineTextAlignmentProcessor
public void performSkipAlignment(int endIndex)
protected void initializeForSkipAlignment(AbstractAlignmentProcessor proc, int endIndex)
protected void initializeForLastLineAlignment(AbstractAlignmentProcessor proc)
protected void updateBreaksForLastLineAlignment()
protected boolean isBorderMarker(InlineSequenceElement element)
true
if element
represents border type, namely if it is either
StartSequenceElement or EndSequenceElementelement
- elementtrue
, if element represents border type and false
otherwiseprotected boolean splitBreakableIfPossible()
getBreakableIndex() >= 0
nodes[breakableIndex]
is an instance of SplittableRenderNodegetBreakableMaxAllowedWidth() > 0
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
otherwiseprotected void reInitializeForHandlingComponentSplit(int breakableIndex, RenderNode[] replacement)
Copyright © 2002–2017 Pentaho Corporation. All rights reserved.