|
fop 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.layoutmgr.AbstractBaseLayoutManager
org.apache.fop.layoutmgr.AbstractLayoutManager
org.apache.fop.layoutmgr.BlockStackingLayoutManager
org.apache.fop.layoutmgr.BlockLayoutManager
public class BlockLayoutManager
LayoutManager for a block FO.
Nested Class Summary | |
---|---|
protected class |
BlockLayoutManager.ProxyLMiter
Proxy iterator for Block LM. |
Nested classes/interfaces inherited from class org.apache.fop.layoutmgr.BlockStackingLayoutManager |
---|
BlockStackingLayoutManager.MappingPosition, BlockStackingLayoutManager.StackingIter |
Field Summary | |
---|---|
protected java.util.ListIterator |
proxyLMiter
Iterator over the child layout managers. |
Fields inherited from class org.apache.fop.layoutmgr.BlockStackingLayoutManager |
---|
adjustedSpaceAfter, adjustedSpaceBefore, bpUnit, breakBeforeServed, endIndent, firstVisibleMarkServed, foSpaceAfter, foSpaceBefore, parentArea, referenceIPD, startIndent, storedList |
Fields inherited from class org.apache.fop.layoutmgr.AbstractLayoutManager |
---|
childLMiter, childLMs, curChildLM, fobjIter, parentLayoutManager |
Fields inherited from class org.apache.fop.layoutmgr.AbstractBaseLayoutManager |
---|
fobj, generatesBlockArea, generatesReferenceArea |
Constructor Summary | |
---|---|
BlockLayoutManager(Block inBlock)
Creates a new BlockLayoutManager. |
Method Summary | |
---|---|
void |
addAreas(PositionIterator parentIter,
LayoutContext layoutContext)
Tell the layout manager to add all the child areas implied by Position objects which will be returned by the Iterator. |
void |
addChildArea(Area childArea)
Add the childArea to the current area. |
boolean |
createNextChildLMs(int pos)
Create more child LMs of the parent, up to child LM index pos |
protected void |
flush()
Force current area to be added to parent area. |
protected Block |
getBlockFO()
convenience method that returns the Block node |
int |
getContentAreaBPD()
Returns the BPD of the content area |
int |
getContentAreaIPD()
Returns the IPD of the content area |
boolean |
getGeneratesBlockArea()
Returns an indication if the layout manager generates a block area. |
KeepProperty |
getKeepTogetherProperty()
Returns the keep-together property specified on the FObj. |
KeepProperty |
getKeepWithNextProperty()
Returns the keep-with-next property specified on the FObj. |
KeepProperty |
getKeepWithPreviousProperty()
Returns the keep-with-previous property specified on the FObj. |
java.util.List |
getNextKnuthElements(LayoutContext context,
int alignment)
Get a sequence of KnuthElements representing the content of the node assigned to the LM |
java.util.List |
getNextKnuthElements(LayoutContext context,
int alignment,
java.util.Stack lmStack,
Position restartPosition,
LayoutManager restartAtLM)
Returns an updated list of Knuth elements corresponding to this layout manager, after a change of IPD has been detected. |
Area |
getParentArea(Area childArea)
Return an Area which can contain the passed childArea. |
void |
initialize()
initialize the layout manager. |
boolean |
isRestartable()
Returns true if this layout manager is able to re-generate its
Knuth elements after an IPD change. |
void |
notifyBorder(RelSide side,
MinOptMax effectiveLength)
Notifies the layout manager about the effective length/width of its border. |
void |
notifyPadding(RelSide side,
MinOptMax effectiveLength)
Notifies the layout manager about the effective length/width of its padding. |
void |
notifySpace(RelSide side,
MinOptMax effectiveLength)
Notifies the layout manager about the effective length of its space. |
Methods inherited from class org.apache.fop.layoutmgr.AbstractLayoutManager |
---|
addChildLM, addChildLMs, addId, addMarkersToPage, checkEndOfLayout, createChildLMs, getChildLM, getChildLMs, getCurrentPage, getCurrentPV, getParent, getPSLM, hasNextChildLM, isFinished, isFirst, isLast, notifyPos, setCurrentChildLM, setFinished, setParent, toString, transferExtensionAttachments, transferExtensions, transferForeignAttributes |
Methods inherited from class org.apache.fop.layoutmgr.AbstractBaseLayoutManager |
---|
getAncestorBlockAreaBPD, getAncestorBlockAreaIPD, getBaseLength, getFObj, getGeneratesLineArea, getGeneratesReferenceArea, getParentAreaBPD, getParentAreaIPD, getReferenceAreaBPD, getReferenceAreaIPD, setGeneratesBlockArea, setGeneratesReferenceArea |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.fop.layoutmgr.LayoutManager |
---|
addChildLM, addChildLMs, getChildLMs, getFObj, getGeneratesLineArea, getGeneratesReferenceArea, getParent, getPSLM, isFinished, notifyPos, setFinished, setParent |
Methods inherited from interface org.apache.fop.datatypes.PercentBaseContext |
---|
getBaseLength |
Field Detail |
---|
protected java.util.ListIterator proxyLMiter
Constructor Detail |
---|
public BlockLayoutManager(Block inBlock)
inBlock
- the block FO object to create the layout manager for.Method Detail |
---|
public void initialize()
initialize
in interface LayoutManager
initialize
in class AbstractLayoutManager
public java.util.List getNextKnuthElements(LayoutContext context, int alignment)
getNextKnuthElements
in interface LayoutManager
getNextKnuthElements
in class BlockStackingLayoutManager
context
- the LayoutContext used to store layout informationalignment
- the desired text alignment
public java.util.List getNextKnuthElements(LayoutContext context, int alignment, java.util.Stack lmStack, Position restartPosition, LayoutManager restartAtLM)
getNextKnuthElements
in interface LayoutManager
getNextKnuthElements
in class BlockStackingLayoutManager
context
- the layout contextalignment
- the alignmentlmStack
- the stack of LMs that are active at the IPD changerestartPosition
- the position corresponding to the element
finishing the page before the IPD changerestartAtLM
- if not null, the layout manager from which to restart.
That is, the IPD change occurs between two block elements and not inside
a paragraph
public boolean createNextChildLMs(int pos)
createNextChildLMs
in interface LayoutManager
createNextChildLMs
in class AbstractLayoutManager
pos
- index up to which child LMs are requested
public KeepProperty getKeepTogetherProperty()
IllegalStateException
.
Must be implemented by the subclass, if applicable.
getKeepTogetherProperty
in interface BlockLevelLayoutManager
getKeepTogetherProperty
in class BlockStackingLayoutManager
public KeepProperty getKeepWithPreviousProperty()
IllegalStateException
.
Must be implemented by the subclass, if applicable.
getKeepWithPreviousProperty
in interface BlockLevelLayoutManager
getKeepWithPreviousProperty
in class BlockStackingLayoutManager
public KeepProperty getKeepWithNextProperty()
IllegalStateException
.
Must be implemented by the subclass, if applicable.
getKeepWithNextProperty
in interface BlockLevelLayoutManager
getKeepWithNextProperty
in class BlockStackingLayoutManager
public void addAreas(PositionIterator parentIter, LayoutContext layoutContext)
addAreas
in interface LayoutManager
addAreas
in class AbstractLayoutManager
parentIter
- the position iteratorlayoutContext
- the contextpublic Area getParentArea(Area childArea)
getParentArea
in interface LayoutManager
getParentArea
in class AbstractLayoutManager
childArea
- area to get the parent area for
public void addChildArea(Area childArea)
addChildArea
in interface LayoutManager
addChildArea
in class BlockStackingLayoutManager
childArea
- the area to add: will be some block-stacked Area.protected void flush()
flush
in class BlockStackingLayoutManager
protected Block getBlockFO()
public int getContentAreaIPD()
getContentAreaIPD
in interface LayoutManager
getContentAreaIPD
in class BlockStackingLayoutManager
public int getContentAreaBPD()
getContentAreaBPD
in interface LayoutManager
getContentAreaBPD
in class BlockStackingLayoutManager
public boolean getGeneratesBlockArea()
getGeneratesBlockArea
in interface LayoutManager
getGeneratesBlockArea
in class AbstractBaseLayoutManager
public void notifySpace(RelSide side, MinOptMax effectiveLength)
notifySpace
in interface ConditionalElementListener
side
- the side to which the space applieseffectiveLength
- the effective length after space-resolution (null means zero length)public void notifyBorder(RelSide side, MinOptMax effectiveLength)
notifyBorder
in interface ConditionalElementListener
side
- the side to which the border applieseffectiveLength
- the effective length in the current break situation
(null means zero length)public void notifyPadding(RelSide side, MinOptMax effectiveLength)
notifyPadding
in interface ConditionalElementListener
side
- the side to which the padding applieseffectiveLength
- the effective length in the current break situation
(null means zero length)public boolean isRestartable()
true
if this layout manager is able to re-generate its
Knuth elements after an IPD change.
isRestartable
in interface LayoutManager
isRestartable
in class AbstractBaseLayoutManager
true
if this layout manager can be restarted after an IPD
change
|
fop 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |