|
fop 0.95 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.layoutmgr.AbstractBreaker
public abstract class AbstractBreaker
Abstract base class for breakers (page breakers, static region handlers etc.).
Nested Class Summary | |
---|---|
class |
AbstractBreaker.BlockSequence
|
static class |
AbstractBreaker.PageBreakPosition
|
Field Summary | |
---|---|
protected int |
alignment
|
protected MinOptMax |
footnoteSeparatorLength
|
protected static org.apache.commons.logging.Log |
log
logging instance |
Constructor Summary | |
---|---|
AbstractBreaker()
|
Method Summary | |
---|---|
protected void |
addAreas(org.apache.fop.layoutmgr.PageBreakingAlgorithm alg,
int partCount,
AbstractBreaker.BlockSequence originalList,
AbstractBreaker.BlockSequence effectiveList)
Phase 3 of Knuth algorithm: Adds the areas |
protected void |
addAreas(org.apache.fop.layoutmgr.PageBreakingAlgorithm alg,
int startPart,
int partCount,
AbstractBreaker.BlockSequence originalList,
AbstractBreaker.BlockSequence effectiveList)
Phase 3 of Knuth algorithm: Adds the areas |
protected abstract void |
addAreas(PositionIterator posIter,
LayoutContext context)
|
protected LayoutContext |
createLayoutContext()
Creates the top-level LayoutContext for the breaker operation. |
void |
doLayout(int flowBPD)
Starts the page breaking process. |
void |
doLayout(int flowBPD,
boolean autoHeight)
Starts the page breaking process. |
protected abstract void |
doPhase3(org.apache.fop.layoutmgr.PageBreakingAlgorithm alg,
int partCount,
AbstractBreaker.BlockSequence originalList,
AbstractBreaker.BlockSequence effectiveList)
Phase 3 of Knuth algorithm: Adds the areas |
protected abstract void |
finishPart(org.apache.fop.layoutmgr.PageBreakingAlgorithm alg,
AbstractBreaker.PageBreakPosition pbp)
|
protected abstract LayoutManager |
getCurrentChildLM()
|
protected abstract 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. |
protected abstract java.util.LinkedList |
getNextKnuthElements(LayoutContext context,
int alignment)
|
protected PageProvider |
getPageProvider()
Returns the PageProvider if any. |
protected abstract 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 . |
protected abstract boolean |
hasMoreContent()
|
boolean |
isEmpty()
|
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. |
protected void |
startPart(AbstractBreaker.BlockSequence list,
int breakClass)
|
protected void |
updateLayoutContext(LayoutContext context)
Used to update the LayoutContext in subclasses prior to starting a new element list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
protected int alignment
protected MinOptMax footnoteSeparatorLength
Constructor Detail |
---|
public AbstractBreaker()
Method Detail |
---|
protected abstract int getCurrentDisplayAlign()
protected abstract boolean hasMoreContent()
protected abstract void addAreas(PositionIterator posIter, LayoutContext context)
protected abstract LayoutManager getTopLevelLM()
protected abstract LayoutManager getCurrentChildLM()
protected boolean isPartOverflowRecoveryActivated()
protected boolean isSinglePartFavored()
protected PageProvider getPageProvider()
protected PageBreakingAlgorithm.PageBreakingLayoutListener getLayoutListener()
protected abstract java.util.LinkedList getNextKnuthElements(LayoutContext context, int alignment)
public boolean isEmpty()
protected void startPart(AbstractBreaker.BlockSequence list, int breakClass)
protected void handleEmptyContent()
protected abstract void finishPart(org.apache.fop.layoutmgr.PageBreakingAlgorithm alg, AbstractBreaker.PageBreakPosition pbp)
protected LayoutContext createLayoutContext()
protected void updateLayoutContext(LayoutContext context)
context
- the LayoutContext to updateprotected void observeElementList(java.util.List elementList)
elementList
- the Knuth element listpublic void doLayout(int flowBPD)
flowBPD
- the constant available block-progression-dimension (used for every part)public void doLayout(int flowBPD, boolean autoHeight)
flowBPD
- the constant available block-progression-dimension (used for every part)autoHeight
- true if warnings about overflows should be disabled because the
the BPD is really undefined (for footnote-separators, for example)protected abstract void doPhase3(org.apache.fop.layoutmgr.PageBreakingAlgorithm alg, int partCount, AbstractBreaker.BlockSequence originalList, AbstractBreaker.BlockSequence effectiveList)
alg
- PageBreakingAlgorithm instance which determined the breakspartCount
- number of parts (pages) to be renderedoriginalList
- original Knuth element listeffectiveList
- effective Knuth element list (after adjustments)protected void addAreas(org.apache.fop.layoutmgr.PageBreakingAlgorithm alg, int partCount, AbstractBreaker.BlockSequence originalList, AbstractBreaker.BlockSequence effectiveList)
alg
- PageBreakingAlgorithm instance which determined the breakspartCount
- number of parts (pages) to be renderedoriginalList
- original Knuth element listeffectiveList
- effective Knuth element list (after adjustments)protected void addAreas(org.apache.fop.layoutmgr.PageBreakingAlgorithm alg, int startPart, int partCount, AbstractBreaker.BlockSequence originalList, AbstractBreaker.BlockSequence effectiveList)
alg
- PageBreakingAlgorithm instance which determined the breaksstartPart
- index of the first part (page) to be renderedpartCount
- number of parts (pages) to be renderedoriginalList
- original Knuth element listeffectiveList
- effective Knuth element list (after adjustments)protected int handleSpanChange(LayoutContext childLC, int nextSequenceStartsOn)
LayoutContext
.
Only used by the PSLM and called by getNextBlockList()
.
childLC
- the LayoutContextnextSequenceStartsOn
- previous value for break handling
protected int getNextBlockList(LayoutContext childLC, int nextSequenceStartsOn)
childLC
- LayoutContext to usenextSequenceStartsOn
- indicates on what page the next sequence should start
|
fop 0.95 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |