|
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.inline.InlineStackingLayoutManager
public abstract class InlineStackingLayoutManager
Class modelling the commonalities of layoutmanagers for objects which stack children in the inline direction, such as Inline or Line. It should not be instantiated directly.
Nested Class Summary | |
---|---|
protected static class |
InlineStackingLayoutManager.StackingIter
|
Field Summary | |
---|---|
protected LayoutContext |
childLC
The child layout context |
protected MinOptMax |
extraBPD
Size of border and padding in BPD (ie, before and after). |
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 |
Constructor Summary | |
---|---|
protected |
InlineStackingLayoutManager(FObj node)
Create an inline stacking layout manager. |
Method Summary | |
---|---|
java.util.List |
addALetterSpaceTo(java.util.List oldList)
Tell the LM to modify its data, adding a letter space to the word fragment represented by the given elements, and returning the corrected elements |
protected void |
addId()
This method is called by addAreas() so IDs can be added to a page for FOs that support the 'id' property. |
protected void |
addSpace(Area parentArea,
MinOptMax spaceRange,
double dSpaceAdjust)
Adds a space to the area |
boolean |
applyChanges(java.util.List oldList)
Tell the LM to apply the changes due to hyphenation |
protected void |
clearPrevIPD()
Clear the previous IPD calculation. |
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. |
protected LayoutContext |
getContext()
Current child layout context |
protected Area |
getCurrentArea()
Returns the current area. |
protected MinOptMax |
getExtraIPD(boolean bNotFirst,
boolean bNotLast)
Returns the extra IPD needed for any leading or trailing fences for the current area. |
protected MinOptMax |
getPrevIPD(LayoutManager lm)
TODO: Explain this method |
protected SpaceProperty |
getSpaceEnd()
Get the space at the end of the inline area. |
protected SpaceProperty |
getSpaceStart()
Get the space at the start of the inline area. |
void |
getWordChars(java.lang.StringBuffer sbChars,
Position pos)
Get the word chars corresponding to the given position |
protected boolean |
hasLeadingFence(boolean bNotFirst)
Indication if the current area has a leading fence. |
protected boolean |
hasTrailingFence(boolean bNotLast)
Indication if the current area has a trailing fence. |
void |
hyphenate(Position pos,
HyphContext hc)
Tell the LM to hyphenate a word |
void |
removeWordSpace(java.util.List oldList)
remove the AreaInfo object represented by the given elements, so that it won't generate any element when getChangedKnuthElements will be called |
protected void |
setChildContext(LayoutContext lc)
Set the current child layout context |
protected void |
setCurrentArea(Area area)
Set the current area. |
void |
setLMiter(java.util.ListIterator iter)
Set the iterator. |
protected void |
setTraits(boolean bNotFirst,
boolean bNotLast)
Trait setter to be overridden by subclasses. |
Methods inherited from class org.apache.fop.layoutmgr.AbstractLayoutManager |
---|
addAreas, addChildArea, addChildLM, addChildLMs, addMarkersToPage, createChildLMs, createNextChildLMs, getChildLM, getChildLMs, getCurrentPage, getCurrentPV, getNextKnuthElements, 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, getContentAreaBPD, getContentAreaIPD, 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, addChildArea, addChildLM, addChildLMs, createNextChildLMs, getChildLMs, getContentAreaBPD, getContentAreaIPD, getFObj, getGeneratesBlockArea, getGeneratesLineArea, getGeneratesReferenceArea, getNextKnuthElements, getParent, getParentArea, getPSLM, initialize, isFinished, notifyPos, setFinished, setParent |
Methods inherited from interface org.apache.fop.datatypes.PercentBaseContext |
---|
getBaseLength |
Field Detail |
---|
protected MinOptMax extraBPD
protected LayoutContext childLC
Constructor Detail |
---|
protected InlineStackingLayoutManager(FObj node)
node
- the formatting object that creates the areaMethod Detail |
---|
public void setLMiter(java.util.ListIterator iter)
iter
- the iterator for this LMprotected MinOptMax getExtraIPD(boolean bNotFirst, boolean bNotLast)
bNotFirst
- true if not the first area for this layout managerbNotLast
- true if not the last area for this layout manager
protected boolean hasLeadingFence(boolean bNotFirst)
bNotFirst
- true if not the first area for this layout manager
protected boolean hasTrailingFence(boolean bNotLast)
bNotLast
- true if not the last area for this layout manager
protected SpaceProperty getSpaceStart()
protected SpaceProperty getSpaceEnd()
protected MinOptMax getPrevIPD(LayoutManager lm)
lm
- ???
protected void clearPrevIPD()
protected void addId()
protected Area getCurrentArea()
protected void setCurrentArea(Area area)
area
- the current areaprotected void setTraits(boolean bNotFirst, boolean bNotLast)
bNotFirst
- true if this is not the first child area addedbNotLast
- true if this is not the last child area addedprotected void setChildContext(LayoutContext lc)
lc
- the child layout contextprotected LayoutContext getContext()
protected void addSpace(Area parentArea, MinOptMax spaceRange, double dSpaceAdjust)
parentArea
- the area to which to add the spacespaceRange
- the space range specifierdSpaceAdjust
- the factor by which to stretch or shrink the spacepublic java.util.List addALetterSpaceTo(java.util.List oldList)
addALetterSpaceTo
in interface InlineLevelLayoutManager
oldList
- the elements which must be given one more letter space
public void removeWordSpace(java.util.List oldList)
removeWordSpace
in interface InlineLevelLayoutManager
oldList
- the elements representing the word spacepublic void getWordChars(java.lang.StringBuffer sbChars, Position pos)
getWordChars
in interface InlineLevelLayoutManager
sbChars
- the StringBuffer used to append word charspos
- the Position referring to the needed word charspublic void hyphenate(Position pos, HyphContext hc)
hyphenate
in interface InlineLevelLayoutManager
pos
- the Position referring to the wordhc
- the HyphContext storing hyphenation informationpublic boolean applyChanges(java.util.List oldList)
applyChanges
in interface InlineLevelLayoutManager
oldList
- the list of the old elements the changes refer to
public java.util.LinkedList getChangedKnuthElements(java.util.List oldList, int alignment)
getChangedKnuthElements
in interface LayoutManager
getChangedKnuthElements
in class AbstractLayoutManager
oldList
- the elements to replacealignment
- the desired text alignment
|
fop 0.95 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |