|
fop 2.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.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.
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, parentLayoutManager |
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 |
java.util.List |
addALetterSpaceTo(java.util.List oldList,
int thisDepth)
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 |
addSpace(Area parentArea,
MinOptMax spaceRange,
double spaceAdjust)
Adds a space to the area. |
boolean |
applyChanges(java.util.List oldList)
Tell the LM to apply the changes due to hyphenation |
boolean |
applyChanges(java.util.List oldList,
int depth)
Tell the LM to apply the changes due to hyphenation |
int |
getBreakBefore()
Returns the highest priority break-before value on this layout manager or its relevant descendants. |
java.util.List |
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 possible hyphenation points. |
java.util.List |
getChangedKnuthElements(java.util.List oldList,
int alignment,
int depth)
Get a sequence of KnuthElements representing the content of the node assigned to the LM, after changes have been applied |
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 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. |
java.lang.String |
getWordChars(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 |
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.AbstractBaseLayoutManager |
---|
getAncestorBlockAreaBPD, getAncestorBlockAreaIPD, getBaseLength, getContentAreaBPD, getContentAreaIPD, getFObj, getGeneratesBlockArea, getGeneratesLineArea, getGeneratesReferenceArea, getNextKnuthElements, getParentAreaBPD, getParentAreaIPD, getReferenceAreaBPD, getReferenceAreaIPD, isRestartable, 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, getBaselineOffset, getChildLMs, getContentAreaBPD, getContentAreaIPD, getFObj, getGeneratesBlockArea, getGeneratesLineArea, getGeneratesReferenceArea, getNextKnuthElements, getNextKnuthElements, getParent, getParentArea, getPSLM, hasLineAreaDescendant, initialize, isFinished, isRestartable, notifyPos, reset, 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 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 spaceAdjust)
parentArea
- the area to which to add the spacespaceRange
- the space range specifierspaceAdjust
- 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 java.util.List addALetterSpaceTo(java.util.List oldList, int thisDepth)
addALetterSpaceTo
in interface InlineLevelLayoutManager
oldList
- the elements which must be given one more letter spacethisDepth
- the depth at which the Positions for this LM in oldList are found
public java.lang.String getWordChars(Position pos)
getWordChars
in interface InlineLevelLayoutManager
pos
- the position referring to the needed word chars.
public 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 boolean applyChanges(java.util.List oldList, int depth)
applyChanges
in interface InlineLevelLayoutManager
oldList
- the list of the old elements the changes refer todepth
- the depth at which the Positions for this LM in oldList are found
public java.util.List getChangedKnuthElements(java.util.List oldList, int alignment)
getChangedKnuthElements
in interface LayoutManager
getChangedKnuthElements
in class AbstractLayoutManager
oldList
- the elements to replacealignment
- the desired text alignment
public java.util.List getChangedKnuthElements(java.util.List oldList, int alignment, int depth)
getChangedKnuthElements
in interface InlineLevelLayoutManager
oldList
- the elements to replacealignment
- the desired text alignmentdepth
- the depth at which the Positions for this LM in oldList are found
public int getBreakBefore()
BreakOpportunity
getBreakBefore
in interface BreakOpportunity
|
fop 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |