Class LocalBreaker
java.lang.Object
org.apache.fop.layoutmgr.AbstractBreaker
org.apache.fop.layoutmgr.LocalBreaker
- Direct Known Subclasses:
StaticContentLayoutManager.StaticContentBreaker, TableCellLayoutManager.TableCellBreaker
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractBreaker
AbstractBreaker.BlockSequence, AbstractBreaker.FloatPosition, AbstractBreaker.PageBreakPosition, AbstractBreaker.PagePositionOnlyException -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate intprivate booleanprotected BlockStackingLayoutManagerprivate intprivate booleanprivate booleanFields inherited from class AbstractBreaker
alignment, blockListIndex, blockLists, firstElementsForRestart, footnoteSeparatorLength, log, originalRestartAtLM, positionAtBreak, pslm -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAreas(PositionIterator posIter, LayoutContext context) Tell the layout manager to add all the child areas implied by Position objects which will be returned by the Iterator.protected LayoutContextCreates the top-level LayoutContext for the breaker operation.Creates and returns a PageBreakingLayoutListener for the PageBreakingAlgorithm to notify about layout problems.protected voiddoPhase3(PageBreakingAlgorithm alg, int partCount, AbstractBreaker.BlockSequence originalList, AbstractBreaker.BlockSequence effectiveList) Phase 3 of Knuth algorithm: Adds the areasprotected voidFinish part.protected LayoutManagerprotected intprotected List<ListElement> getNextKnuthElements(LayoutContext context, int alignment) Get a sequence of KnuthElements representing the content of the node assigned to the LMintprotected LayoutManagerprotected booleanbooleanprotected booleanControls the behaviour of the algorithm in cases where the first element of a part overflows a line/page.voidsetDescendantOfTableFooter(boolean isDescendantOfTableFooter) voidsetRepeatedFooter(boolean repeatedFooter) voidsetRepeatedHeader(boolean repeatedHeader) Methods inherited from class AbstractBreaker
addAreas, addAreas, addAreas, addAreasForFloats, containsNonRestartableLM, doLayout, getBreakClassName, getNextBlockList, getNextBlockList, getNextKnuthElements, getPageProvider, handleEmptyContent, handleFloatLayout, handleSpanChange, isEmpty, isSinglePartFavored, lastPageHasIPDChange, observeElementList, prepareToRedoLayout, shouldRedoLayout, startPart, updateLayoutContext, wasLayoutRedone
-
Field Details
-
lm
-
displayAlign
private int displayAlign -
ipd
private int ipd -
overflow
private int overflow -
repeatedHeader
private boolean repeatedHeader
-
-
Constructor Details
-
LocalBreaker
-
-
Method Details
-
setRepeatedHeader
public void setRepeatedHeader(boolean repeatedHeader) -
isPartOverflowRecoveryActivated
protected boolean isPartOverflowRecoveryActivated()Controls the behaviour of the algorithm in cases where the first element of a part overflows a line/page.- Overrides:
isPartOverflowRecoveryActivatedin classAbstractBreaker- Returns:
- true if the algorithm should try to send the element to the next line/page.
-
isOverflow
public boolean isOverflow() -
getOverflowAmount
public int getOverflowAmount() -
createLayoutListener
Creates and returns a PageBreakingLayoutListener for the PageBreakingAlgorithm to notify about layout problems.- Overrides:
createLayoutListenerin classAbstractBreaker- Returns:
- the listener instance or null if no notifications are needed
-
getTopLevelLM
- Specified by:
getTopLevelLMin classAbstractBreaker- Returns:
- top level layout manager
-
createLayoutContext
Description copied from class:AbstractBreakerCreates the top-level LayoutContext for the breaker operation.- Overrides:
createLayoutContextin classAbstractBreaker- Returns:
- the top-level LayoutContext
-
getNextKnuthElements
Description copied from class:AbstractBreakerGet a sequence of KnuthElements representing the content of the node assigned to the LM- Specified by:
getNextKnuthElementsin classAbstractBreaker- Parameters:
context- the LayoutContext used to store layout informationalignment- the desired text alignment- Returns:
- the list of KnuthElements
-
getCurrentDisplayAlign
protected int getCurrentDisplayAlign()- Specified by:
getCurrentDisplayAlignin classAbstractBreaker- Returns:
- current display alignment
-
hasMoreContent
protected boolean hasMoreContent()- Specified by:
hasMoreContentin classAbstractBreaker- Returns:
- true if content not exhausted
-
addAreas
Description copied from class:AbstractBreakerTell the layout manager to add all the child areas implied by Position objects which will be returned by the Iterator.- Specified by:
addAreasin classAbstractBreaker- Parameters:
posIter- the position iteratorcontext- the context
-
doPhase3
protected void doPhase3(PageBreakingAlgorithm alg, int partCount, AbstractBreaker.BlockSequence originalList, AbstractBreaker.BlockSequence effectiveList) Description copied from class:AbstractBreakerPhase 3 of Knuth algorithm: Adds the areas- Specified by:
doPhase3in classAbstractBreaker- Parameters:
alg- PageBreakingAlgorithm instance which determined the breakspartCount- number of parts (pages) to be renderedoriginalList- original Knuth element listeffectiveList- effective Knuth element list (after adjustments)
-
finishPart
Description copied from class:AbstractBreakerFinish part.- Specified by:
finishPartin classAbstractBreaker- Parameters:
alg- a page breaking algorithmpbp- a page break posittion
-
getCurrentChildLM
- Specified by:
getCurrentChildLMin classAbstractBreaker- Returns:
- current child layout manager