|
fop 1.1 | |||||||||
| 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
Helper class, extending the functionality of the basic BlockKnuthSequence. |
static class |
AbstractBreaker.PageBreakPosition
A page break position. |
| Field Summary | |
|---|---|
protected int |
alignment
desired text alignment |
protected MinOptMax |
footnoteSeparatorLength
footnote separator length |
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)
Tell the layout manager to add all the child areas implied by Position objects which will be returned by the Iterator. |
protected LayoutContext |
createLayoutContext()
Creates the top-level LayoutContext for the breaker operation. |
protected PageBreakingAlgorithm.PageBreakingLayoutListener |
createLayoutListener()
Creates and returns a PageBreakingLayoutListener for the PageBreakingAlgorithm to notify about layout problems. |
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)
Finish part. |
protected abstract LayoutManager |
getCurrentChildLM()
|
protected abstract int |
getCurrentDisplayAlign()
|
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 int |
getNextBlockList(LayoutContext childLC,
int nextSequenceStartsOn,
Position positionAtIPDChange,
LayoutManager restartAtLM,
java.util.List<KnuthElement> firstElements)
Gets the next block list (sequence) and adds it to a list of block lists if it's not empty. |
protected abstract java.util.List<KnuthElement> |
getNextKnuthElements(LayoutContext context,
int alignment)
Get a sequence of KnuthElements representing the content of the node assigned to the LM |
protected java.util.List<KnuthElement> |
getNextKnuthElements(LayoutContext context,
int alignment,
Position positionAtIPDChange,
LayoutManager restartAtLM)
Get a sequence of KnuthElements representing the content of the node assigned to the LM |
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)
Start part. |
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 final 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)
posIter - the position iteratorcontext - the contextprotected abstract LayoutManager getTopLevelLM()
protected abstract LayoutManager getCurrentChildLM()
protected boolean isPartOverflowRecoveryActivated()
protected boolean isSinglePartFavored()
protected PageProvider getPageProvider()
protected PageBreakingAlgorithm.PageBreakingLayoutListener createLayoutListener()
protected abstract java.util.List<KnuthElement> getNextKnuthElements(LayoutContext context,
int alignment)
context - the LayoutContext used to store layout informationalignment - the desired text alignment
protected java.util.List<KnuthElement> getNextKnuthElements(LayoutContext context,
int alignment,
Position positionAtIPDChange,
LayoutManager restartAtLM)
context - the LayoutContext used to store layout informationalignment - the desired text alignmentpositionAtIPDChange - last element on the part before an IPD changerestartAtLM - the layout manager from which to restart, if IPD
change occurs between two LMs
public boolean isEmpty()
protected void startPart(AbstractBreaker.BlockSequence list,
int breakClass)
list - a block sequencebreakClass - a break classprotected void handleEmptyContent()
protected abstract void finishPart(org.apache.fop.layoutmgr.PageBreakingAlgorithm alg,
AbstractBreaker.PageBreakPosition pbp)
alg - a page breaking algorithmpbp - a page break posittionprotected LayoutContext createLayoutContext()
protected void updateLayoutContext(LayoutContext context)
context - the LayoutContext to updateprotected void observeElementList(java.util.List elementList)
elementList - the Knuth element list
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
protected int getNextBlockList(LayoutContext childLC,
int nextSequenceStartsOn,
Position positionAtIPDChange,
LayoutManager restartAtLM,
java.util.List<KnuthElement> firstElements)
childLC - LayoutContext to usenextSequenceStartsOn - indicates on what page the next sequence
should startpositionAtIPDChange - last element on the part before an IPD changerestartAtLM - the layout manager from which to restart, if IPD
change occurs between two LMsfirstElements - elements from non-restartable LMs on the new page
|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||