| java.lang.Object org.apache.fop.layoutmgr.AbstractBreaker
All known Subclasses: org.apache.fop.layoutmgr.PageBreaker,
AbstractBreaker | abstract public class AbstractBreaker (Code) | | Abstract base class for breakers (page breakers, static region handlers etc.).
|
Inner Class :public static class PageBreakPosition extends LeafPosition | |
Method Summary | |
abstract protected void | addAreas(PositionIterator posIter, LayoutContext context) | protected void | addAreas(PageBreakingAlgorithm alg, int partCount, BlockSequence originalList, BlockSequence effectiveList) | protected void | addAreas(PageBreakingAlgorithm alg, int startPart, int partCount, BlockSequence originalList, BlockSequence effectiveList) | protected LayoutContext | createLayoutContext() Creates the top-level LayoutContext for the breaker operation. | public void | doLayout(int flowBPD) Starts the page breaking process. | public void | doLayout(int flowBPD, boolean autoHeight) Starts the page breaking process. | abstract protected void | doPhase3(PageBreakingAlgorithm alg, int partCount, BlockSequence originalList, BlockSequence effectiveList) | abstract protected void | finishPart(PageBreakingAlgorithm alg, PageBreakPosition pbp) | abstract protected LayoutManager | getCurrentChildLM() | abstract protected int | getCurrentDisplayAlign() | protected PageBreakingAlgorithm.PageBreakingLayoutListener | getLayoutListener() Returns a PageBreakingLayoutListener for the PageBreakingAlgorithm to notify about layout
problems. | protected int | getNextBlockList(LayoutContext childLC, int nextSequenceStartsOn) Gets the next block list (sequence) and adds it to a list of block lists if it's not empty. | abstract protected LinkedList | getNextKnuthElements(LayoutContext context, int alignment) | protected PageProvider | getPageProvider() Returns the PageProvider if any. | abstract protected LayoutManager | getTopLevelLM() | protected void | handleEmptyContent() This method is called when no content is available for a part. | protected int | handleSpanChange(LayoutContext childLC, int nextSequenceStartsOn) Handles span changes reported through the LayoutContext . | abstract protected boolean | hasMoreContent() | public boolean | isEmpty() true if there's no content that could be handled. | protected boolean | isPartOverflowRecoveryActivated() Controls the behaviour of the algorithm in cases where the first element of a part
overflows a line/page. | protected boolean | isSinglePartFavored() true if one a single part should be produced if possible (ex. | protected void | observeElementList(List elementList) Used for debugging purposes. | protected void | startPart(BlockSequence list, int breakClass) | protected void | updateLayoutContext(LayoutContext context) Used to update the LayoutContext in subclasses prior to starting a new element list. |
alignment | protected int alignment(Code) | | |
log | protected static Log log(Code) | | logging instance
|
addAreas | protected void addAreas(PageBreakingAlgorithm alg, int partCount, BlockSequence originalList, BlockSequence effectiveList)(Code) | | Phase 3 of Knuth algorithm: Adds the areas
Parameters: alg - PageBreakingAlgorithm instance which determined the breaks Parameters: partCount - number of parts (pages) to be rendered Parameters: originalList - original Knuth element list Parameters: effectiveList - effective Knuth element list (after adjustments) |
addAreas | protected void addAreas(PageBreakingAlgorithm alg, int startPart, int partCount, BlockSequence originalList, BlockSequence effectiveList)(Code) | | Phase 3 of Knuth algorithm: Adds the areas
Parameters: alg - PageBreakingAlgorithm instance which determined the breaks Parameters: startPart - index of the first part (page) to be rendered Parameters: partCount - number of parts (pages) to be rendered Parameters: originalList - original Knuth element list Parameters: effectiveList - effective Knuth element list (after adjustments) |
createLayoutContext | protected LayoutContext createLayoutContext()(Code) | | Creates the top-level LayoutContext for the breaker operation.
the top-level LayoutContext |
doLayout | public void doLayout(int flowBPD)(Code) | | Starts the page breaking process.
Parameters: flowBPD - the constant available block-progression-dimension (used for every part) |
doLayout | public void doLayout(int flowBPD, boolean autoHeight)(Code) | | Starts the page breaking process.
Parameters: flowBPD - the constant available block-progression-dimension (used for every part) Parameters: autoHeight - true if warnings about overflows should be disabled because thethe BPD is really undefined (for footnote-separators, for example) |
doPhase3 | abstract protected void doPhase3(PageBreakingAlgorithm alg, int partCount, BlockSequence originalList, BlockSequence effectiveList)(Code) | | Phase 3 of Knuth algorithm: Adds the areas
Parameters: alg - PageBreakingAlgorithm instance which determined the breaks Parameters: partCount - number of parts (pages) to be rendered Parameters: originalList - original Knuth element list Parameters: effectiveList - effective Knuth element list (after adjustments) |
getCurrentDisplayAlign | abstract protected int getCurrentDisplayAlign()(Code) | | |
getNextBlockList | protected int getNextBlockList(LayoutContext childLC, int nextSequenceStartsOn)(Code) | | Gets the next block list (sequence) and adds it to a list of block lists if it's not empty.
Parameters: childLC - LayoutContext to use Parameters: nextSequenceStartsOn - indicates on what page the next sequence should start the page on which the next content should appear after a hard break |
getPageProvider | protected PageProvider getPageProvider()(Code) | | Returns the PageProvider if any. PageBreaker overrides this method because each
page may have a different available BPD which needs to be accessible to the breaking
algorithm.
the applicable PageProvider, or null if not applicable |
handleEmptyContent | protected void handleEmptyContent()(Code) | | This method is called when no content is available for a part. Used to force empty pages.
|
handleSpanChange | protected int handleSpanChange(LayoutContext childLC, int nextSequenceStartsOn)(Code) | | Handles span changes reported through the LayoutContext .
Only used by the PSLM and called by getNextBlockList() .
Parameters: childLC - the LayoutContext Parameters: nextSequenceStartsOn - previous value for break handling effective value for break handling |
hasMoreContent | abstract protected boolean hasMoreContent()(Code) | | |
isEmpty | public boolean isEmpty()(Code) | | true if there's no content that could be handled. |
isPartOverflowRecoveryActivated | protected boolean isPartOverflowRecoveryActivated()(Code) | | Controls the behaviour of the algorithm in cases where the first element of a part
overflows a line/page.
true if the algorithm should try to send the element to the next line/page. |
isSinglePartFavored | protected boolean isSinglePartFavored()(Code) | | true if one a single part should be produced if possible (ex. for block-containers) |
observeElementList | protected void observeElementList(List elementList)(Code) | | Used for debugging purposes. Notifies all registered observers about the element list.
Override to set different parameters.
Parameters: elementList - the Knuth element list |
startPart | protected void startPart(BlockSequence list, int breakClass)(Code) | | |
updateLayoutContext | protected void updateLayoutContext(LayoutContext context)(Code) | | Used to update the LayoutContext in subclasses prior to starting a new element list.
Parameters: context - the LayoutContext to update |
|
|