|
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.AbstractBaseLayoutManager
org.apache.fop.layoutmgr.AbstractLayoutManager
org.apache.fop.layoutmgr.BlockStackingLayoutManager
Base LayoutManager class for all areas which stack their child areas in the block-progression direction, such as Flow, Block, ListBlock.
Nested Class Summary | |
protected static class |
BlockStackingLayoutManager.MappingPosition
|
protected static class |
BlockStackingLayoutManager.StackingIter
|
Field Summary | |
protected int |
adjustedSpaceAfter
space-after value adjusted for block-progression-unit handling |
protected int |
adjustedSpaceBefore
space-before value adjusted for block-progression-unit handling |
protected int |
bpUnit
Value of the block-progression-unit (non-standard property) |
protected boolean |
breakBeforeServed
Indicates whether break before has been served or not |
protected int |
endIndent
the effective end-indent value |
protected boolean |
firstVisibleMarkServed
Indicates whether the first visible mark has been returned by this LM, yet |
protected MinOptMax |
foSpaceAfter
see foSpaceBefore |
protected MinOptMax |
foSpaceBefore
Holds the (one-time use) fo:block space-before and -after properties. |
protected BlockParent |
parentArea
Reference to FO whose areas it's managing or to the traits of the FO. |
protected int |
referenceIPD
Reference IPD available |
protected int |
startIndent
the effective start-indent value |
protected java.util.LinkedList |
storedList
Only used to store the original list when createUnitElements is called |
Fields inherited from class org.apache.fop.layoutmgr.AbstractLayoutManager |
childLMiter, childLMs, curChildLM, fobjIter, parentLM |
Fields inherited from class org.apache.fop.layoutmgr.AbstractBaseLayoutManager |
fobj, generatesBlockArea, generatesReferenceArea |
Fields inherited from interface org.apache.fop.layoutmgr.BlockLevelLayoutManager |
LINE_HEIGHT_ADJUSTMENT, LINE_NUMBER_ADJUSTMENT, NO_ADJUSTMENT, SPACE_AFTER_ADJUSTMENT, SPACE_BEFORE_ADJUSTMENT |
Constructor Summary | |
BlockStackingLayoutManager(FObj node)
|
Method Summary | |
void |
addBlockSpacing(double adjust,
MinOptMax minoptmax)
Add a block spacer for space before and space after a block. |
void |
addChildArea(Area childArea)
Add the childArea to the current area. |
protected void |
addChildToArea(Area childArea,
BlockParent parentArea)
Add the childArea to the passed area. |
protected void |
addKnuthElementsForBorderPaddingAfter(java.util.LinkedList returnList,
boolean isLast)
Creates Knuth elements for after border padding and adds them to the return list. |
protected void |
addKnuthElementsForBorderPaddingBefore(java.util.LinkedList returnList,
boolean isFirst)
Creates Knuth elements for before border padding and adds them to the return list. |
protected boolean |
addKnuthElementsForBreakAfter(java.util.LinkedList returnList,
LayoutContext context)
Creates Knuth elements for break-after and adds them to the return list. |
protected boolean |
addKnuthElementsForBreakBefore(java.util.LinkedList returnList,
LayoutContext context)
Creates Knuth elements for break-before and adds them to the return list. |
protected void |
addKnuthElementsForSpaceAfter(java.util.LinkedList returnList,
int alignment)
Creates Knuth elements for space-after and adds them to the return list. |
protected void |
addKnuthElementsForSpaceBefore(java.util.LinkedList returnList,
int alignment)
Creates Knuth elements for space-before and adds them to the return list. |
protected void |
addPendingMarks(LayoutContext context)
Adds the unresolved elements for border and padding to a layout context so break possibilities can be properly constructed. |
protected java.util.LinkedList |
createUnitElements(java.util.LinkedList oldList)
|
void |
discardSpace(KnuthGlue spaceGlue)
|
protected void |
flush()
Force current area to be added to parent area. |
protected Position |
getAuxiliaryPosition()
|
java.util.LinkedList |
getChangedKnuthElements(java.util.List oldList,
int alignment)
Get a sequence of KnuthElements representing the content of the node assigned to the LM, after changes have been applied In the context of line breaking, this method is called after hyphenation has been performed, in order to receive the sequence of elements representing the text together with all possibile hyphenation points. For example, if the text "representation" originates a single box element when getNextKnuthElements() is called, it will be now split in syllables (rep-re-sen-ta-tion) each one originating a box and divided by additional elements allowing a line break. In the context of page breaking, this method is called only if the pages need to be "vertically justified" modifying (also) the quantity of lines created by the paragraphs, and after a first page breaking has been performed. According to the result of the first page breaking, each paragraph now knows how many lines it must create (among the existing layout possibilities) and has to create a sequence of elements representing this layout; in particular, each box, representing a line, will contain a LineBreakPositions that will be used in the addAreas() phase. LMs having children look at the old list of elements in order to know which ones they must get the new elements from, as break conditions of preserved linefeeds can divide children into smaller groups (page sequences or paragraphs). LMs having no children can simply return the old elements if they have nothing to change. Inline LMs need to know the text alignment because it affects the elements representing feasible breaks between syllables. |
int |
getContentAreaBPD()
Returns the BPD of the content area |
int |
getContentAreaIPD()
Returns the IPD of the content area |
protected BlockParent |
getCurrentArea()
|
protected int |
getIPIndents()
|
java.util.LinkedList |
getNextKnuthElements(LayoutContext context,
int alignment)
Get a sequence of KnuthElements representing the content of the node assigned to the LM |
boolean |
mustKeepTogether()
|
boolean |
mustKeepWithNext()
|
boolean |
mustKeepWithPrevious()
|
protected int |
neededUnits(int len)
|
int |
negotiateBPDAdjustment(int adj,
KnuthElement lastElement)
|
protected void |
setContentAreaIPD(int contentAreaIPD)
Sets the IPD of the content area |
protected void |
setCurrentArea(BlockParent parentArea)
Set the current area being filled. |
protected int |
updateContentAreaIPDwithOverconstrainedAdjust()
Determines and sets the content area IPD based on available reference area IPD, start- and end-indent properties. |
protected int |
updateContentAreaIPDwithOverconstrainedAdjust(int contentIPD)
Sets the content area IPD by directly supplying the value. |
protected void |
wrapPositionElement(ListElement el,
java.util.List targetList,
boolean force)
"wrap" the Position inside the given element and add it to the target list. |
protected void |
wrapPositionElements(java.util.List sourceList,
java.util.List targetList)
"wrap" the Position inside each element moving the elements from SourceList to targetList |
protected void |
wrapPositionElements(java.util.List sourceList,
java.util.List targetList,
boolean force)
"wrap" the Position inside each element moving the elements from SourceList to targetList |
Methods inherited from class org.apache.fop.layoutmgr.AbstractLayoutManager |
addAreas, addChildLM, addChildLMs, addMarkersToPage, createChildLMs, createNextChildLMs, getChildLM, getChildLMs, getCurrentPage, getCurrentPV, getParent, getParentArea, getPSLM, hasNextChildLM, initialize, isFinished, isFirst, isLast, notifyPos, setFinished, setParent, toString, transferForeignAttributes |
Methods inherited from class org.apache.fop.layoutmgr.AbstractBaseLayoutManager |
getAncestorBlockAreaBPD, getAncestorBlockAreaIPD, getBaseLength, getFObj, getGeneratesBlockArea, 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 |
addAreas, addChildLM, addChildLMs, createNextChildLMs, getChildLMs, getFObj, getGeneratesBlockArea, getGeneratesLineArea, getGeneratesReferenceArea, getParent, getParentArea, getPSLM, initialize, isFinished, notifyPos, setFinished, setParent |
Methods inherited from interface org.apache.fop.datatypes.PercentBaseContext |
getBaseLength |
Field Detail |
protected BlockParent parentArea
protected int bpUnit
protected int adjustedSpaceBefore
protected int adjustedSpaceAfter
protected java.util.LinkedList storedList
protected boolean breakBeforeServed
protected boolean firstVisibleMarkServed
protected int referenceIPD
protected int startIndent
protected int endIndent
protected MinOptMax foSpaceBefore
protected MinOptMax foSpaceAfter
Constructor Detail |
public BlockStackingLayoutManager(FObj node)
node
- the fo this LM deals withMethod Detail |
protected BlockParent getCurrentArea()
protected void setCurrentArea(BlockParent parentArea)
parentArea
- the current area to be filledpublic void addBlockSpacing(double adjust, MinOptMax minoptmax)
adjust
- the adjustment valueminoptmax
- the min/opt/max value of the spacingprotected void addChildToArea(Area childArea, BlockParent parentArea)
childArea
- the area to add: will be some block-stacked Area.parentArea
- the area in which to add the childAreapublic void addChildArea(Area childArea)
addChildArea
in interface LayoutManager
addChildArea
in class AbstractLayoutManager
childArea
- the area to add: will be some block-stacked Area.protected void flush()
protected Position getAuxiliaryPosition()
protected int neededUnits(int len)
len
- length in millipoints to span with bp units
protected int updateContentAreaIPDwithOverconstrainedAdjust()
protected int updateContentAreaIPDwithOverconstrainedAdjust(int contentIPD)
public java.util.LinkedList getNextKnuthElements(LayoutContext context, int alignment)
getNextKnuthElements
in interface LayoutManager
getNextKnuthElements
in class AbstractLayoutManager
public int negotiateBPDAdjustment(int adj, KnuthElement lastElement)
negotiateBPDAdjustment
in interface BlockLevelLayoutManager
public void discardSpace(KnuthGlue spaceGlue)
discardSpace
in interface BlockLevelLayoutManager
public java.util.LinkedList getChangedKnuthElements(java.util.List oldList, int alignment)
getChangedKnuthElements
in interface LayoutManager
getChangedKnuthElements
in class AbstractLayoutManager
public boolean mustKeepTogether()
mustKeepTogether
in interface BlockLevelLayoutManager
public boolean mustKeepWithPrevious()
mustKeepWithPrevious
in interface BlockLevelLayoutManager
public boolean mustKeepWithNext()
mustKeepWithNext
in interface BlockLevelLayoutManager
protected void addPendingMarks(LayoutContext context)
context
- the layout contextprotected void addKnuthElementsForBorderPaddingBefore(java.util.LinkedList returnList, boolean isFirst)
returnList
- return list to add the additional elements toisFirst
- true if this is the first time a layout manager instance needs to generate
border and paddingprotected void addKnuthElementsForBorderPaddingAfter(java.util.LinkedList returnList, boolean isLast)
returnList
- return list to add the additional elements toisLast
- true if this is the last time a layout manager instance needs to generate
border and paddingprotected boolean addKnuthElementsForBreakBefore(java.util.LinkedList returnList, LayoutContext context)
returnList
- return list to add the additional elements tocontext
- the layout context
protected boolean addKnuthElementsForBreakAfter(java.util.LinkedList returnList, LayoutContext context)
returnList
- return list to add the additional elements tocontext
- the layout context
protected void addKnuthElementsForSpaceBefore(java.util.LinkedList returnList, int alignment)
returnList
- return list to add the additional elements toalignment
- vertical alignmentprotected void addKnuthElementsForSpaceAfter(java.util.LinkedList returnList, int alignment)
returnList
- return list to add the additional elements toalignment
- vertical alignmentprotected java.util.LinkedList createUnitElements(java.util.LinkedList oldList)
protected void wrapPositionElements(java.util.List sourceList, java.util.List targetList)
sourceList
- source listtargetList
- target list receiving the wrapped position elementsprotected void wrapPositionElements(java.util.List sourceList, java.util.List targetList, boolean force)
sourceList
- source listtargetList
- target list receiving the wrapped position elementsforce
- if true, every Position is wrapped regardless of its LM of originprotected void wrapPositionElement(ListElement el, java.util.List targetList, boolean force)
el
- the list elementtargetList
- target list receiving the wrapped position elementsforce
- if true, every Position is wrapped regardless of its LM of originprotected int getIPIndents()
public int getContentAreaIPD()
getContentAreaIPD
in interface LayoutManager
getContentAreaIPD
in class AbstractBaseLayoutManager
protected void setContentAreaIPD(int contentAreaIPD)
contentAreaIPD
- the IPD of the content areapublic int getContentAreaBPD()
getContentAreaBPD
in interface LayoutManager
getContentAreaBPD
in class AbstractBaseLayoutManager
|
fop 0.95 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |