Package org.apache.fop.layoutmgr
Class BlockContainerLayoutManager.BlockContainerBreaker
- java.lang.Object
-
- org.apache.fop.layoutmgr.AbstractBreaker
-
- org.apache.fop.layoutmgr.BlockContainerLayoutManager.BlockContainerBreaker
-
- Enclosing class:
- BlockContainerLayoutManager
private class BlockContainerLayoutManager.BlockContainerBreaker extends AbstractBreaker
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.fop.layoutmgr.AbstractBreaker
AbstractBreaker.BlockSequence, AbstractBreaker.FloatPosition, AbstractBreaker.PageBreakPosition
-
-
Field Summary
Fields Modifier and Type Field Description private BlockContainerLayoutManager
bclm
private PageBreakingAlgorithm
deferredAlg
private AbstractBreaker.BlockSequence
deferredEffectiveList
private AbstractBreaker.BlockSequence
deferredOriginalList
private MinOptMax
ipd
-
Fields inherited from class org.apache.fop.layoutmgr.AbstractBreaker
alignment, blockListIndex, blockLists, firstElementsForRestart, footnoteSeparatorLength, log, originalRestartAtLM, positionAtBreak, pslm
-
-
Constructor Summary
Constructors Constructor Description BlockContainerBreaker(BlockContainerLayoutManager bclm, MinOptMax ipd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAreas(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.void
addContainedAreas(LayoutContext layoutContext)
protected LayoutContext
createLayoutContext()
Creates the top-level LayoutContext for the breaker operation.protected void
doPhase3(PageBreakingAlgorithm alg, int partCount, AbstractBreaker.BlockSequence originalList, AbstractBreaker.BlockSequence effectiveList)
Phase 3 of Knuth algorithm: Adds the areasprotected void
finishPart(PageBreakingAlgorithm alg, AbstractBreaker.PageBreakPosition pbp)
Finish part.protected LayoutManager
getCurrentChildLM()
protected int
getCurrentDisplayAlign()
int
getDifferenceOfFirstPart()
protected java.util.List
getNextKnuthElements(LayoutContext context, int alignment)
Get a sequence of KnuthElements representing the content of the node assigned to the LMint
getOverflowAmount()
protected LayoutManager
getTopLevelLM()
protected boolean
hasMoreContent()
boolean
isOverflow()
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()
protected void
observeElementList(java.util.List elementList)
Used for debugging purposes.-
Methods inherited from class org.apache.fop.layoutmgr.AbstractBreaker
addAreas, addAreas, addAreas, addAreasForFloats, containsNonRestartableLM, createLayoutListener, doLayout, getBreakClassName, getNextBlockList, getNextBlockList, getNextKnuthElements, getPageProvider, handleEmptyContent, handleFloatLayout, handleSpanChange, isEmpty, lastPageHasIPDChange, prepareToRedoLayout, shouldRedoLayout, startPart, updateLayoutContext, wasLayoutRedone
-
-
-
-
Field Detail
-
bclm
private BlockContainerLayoutManager bclm
-
ipd
private MinOptMax ipd
-
deferredAlg
private PageBreakingAlgorithm deferredAlg
-
deferredOriginalList
private AbstractBreaker.BlockSequence deferredOriginalList
-
deferredEffectiveList
private AbstractBreaker.BlockSequence deferredEffectiveList
-
-
Constructor Detail
-
BlockContainerBreaker
public BlockContainerBreaker(BlockContainerLayoutManager bclm, MinOptMax ipd)
-
-
Method Detail
-
observeElementList
protected void observeElementList(java.util.List elementList)
Used for debugging purposes. Notifies all registered observers about the element list. Override to set different parameters.- Overrides:
observeElementList
in classAbstractBreaker
- Parameters:
elementList
- the Knuth element list
-
isPartOverflowRecoveryActivated
protected boolean isPartOverflowRecoveryActivated()
Controls the behaviour of the algorithm in cases where the first element of a part overflows a line/page.- Overrides:
isPartOverflowRecoveryActivated
in classAbstractBreaker
- Returns:
- true if the algorithm should try to send the element to the next line/page.
-
isSinglePartFavored
protected boolean isSinglePartFavored()
- Overrides:
isSinglePartFavored
in classAbstractBreaker
- Returns:
- true if one a single part should be produced if possible (ex. for block-containers)
-
getDifferenceOfFirstPart
public int getDifferenceOfFirstPart()
-
isOverflow
public boolean isOverflow()
-
getOverflowAmount
public int getOverflowAmount()
-
getTopLevelLM
protected LayoutManager getTopLevelLM()
- Specified by:
getTopLevelLM
in classAbstractBreaker
- Returns:
- top level layout manager
-
createLayoutContext
protected LayoutContext createLayoutContext()
Description copied from class:AbstractBreaker
Creates the top-level LayoutContext for the breaker operation.- Overrides:
createLayoutContext
in classAbstractBreaker
- Returns:
- the top-level LayoutContext
-
getNextKnuthElements
protected java.util.List getNextKnuthElements(LayoutContext context, int alignment)
Description copied from class:AbstractBreaker
Get a sequence of KnuthElements representing the content of the node assigned to the LM- Specified by:
getNextKnuthElements
in 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:
getCurrentDisplayAlign
in classAbstractBreaker
- Returns:
- current display alignment
-
hasMoreContent
protected boolean hasMoreContent()
- Specified by:
hasMoreContent
in classAbstractBreaker
- Returns:
- true if content not exhausted
-
addAreas
protected void addAreas(PositionIterator posIter, LayoutContext context)
Description copied from class:AbstractBreaker
Tell the layout manager to add all the child areas implied by Position objects which will be returned by the Iterator.- Specified by:
addAreas
in 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:AbstractBreaker
Phase 3 of Knuth algorithm: Adds the areas- Specified by:
doPhase3
in 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
protected void finishPart(PageBreakingAlgorithm alg, AbstractBreaker.PageBreakPosition pbp)
Description copied from class:AbstractBreaker
Finish part.- Specified by:
finishPart
in classAbstractBreaker
- Parameters:
alg
- a page breaking algorithmpbp
- a page break posittion
-
getCurrentChildLM
protected LayoutManager getCurrentChildLM()
- Specified by:
getCurrentChildLM
in classAbstractBreaker
- Returns:
- current child layout manager
-
addContainedAreas
public void addContainedAreas(LayoutContext layoutContext)
-
-