|
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.AbstractBaseLayoutManager
org.apache.fop.layoutmgr.AbstractLayoutManager
org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager
org.apache.fop.layoutmgr.inline.LineLayoutManager
public class LineLayoutManager
LayoutManager for lines. It builds one or more lines containing inline areas generated by its sub layout managers. A break is found for each line which may contain one of more breaks from the child layout managers. Once a break is found then it is return for the parent layout manager to handle. When the areas are being added to the page this manager creates a line area to contain the inline areas added by the child layout managers.
| Field Summary | |
|---|---|
static int |
DEFAULT_SPACE_WIDTH
this constant is used to create elements when text-align is center: every TextLM descendant of LineLM must use the same value, otherwise the line breaking algorithm does not find the right break point |
| Fields inherited from class org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager |
|---|
childLC, extraBPD |
| Fields inherited from class org.apache.fop.layoutmgr.AbstractLayoutManager |
|---|
childLMiter, childLMs, curChildLM, fobjIter, parentLayoutManager |
| Fields inherited from class org.apache.fop.layoutmgr.AbstractBaseLayoutManager |
|---|
generatesBlockArea, generatesReferenceArea |
| Constructor Summary | |
|---|---|
LineLayoutManager(Block block,
Length lh,
int l,
int f)
Create a new Line Layout Manager. |
|
| Method Summary | |
|---|---|
void |
addAreas(PositionIterator parentIter,
LayoutContext context)
Add the areas with the break points. |
void |
addChildArea(Area childArea)
Add a child area to the current area. |
void |
discardSpace(KnuthGlue spaceGlue)
Discard space. |
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 |
boolean |
getGeneratesBlockArea()
Returns an indication if the layout manager generates a block area. |
boolean |
getGeneratesLineArea()
Returns an indication if the layout manager generates a line area. |
Keep |
getKeepTogether()
Returns the keep-together strength for this element. |
KeepProperty |
getKeepTogetherProperty()
Returns the keep-together property specified on the FObj. |
Keep |
getKeepWithNext()
Returns the keep-with-next strength for this element. |
KeepProperty |
getKeepWithNextProperty()
Returns the keep-with-next property specified on the FObj. |
Keep |
getKeepWithPrevious()
Returns the keep-with-previous strength for this element. |
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,
LeafPosition restartPosition)
Get a sequence of KnuthElements representing the content of the node assigned to the LM. |
boolean |
handleOverflow(int milliPoints)
Whether this LM can handle horizontal overflow error messages (only a BlockContainerLayoutManager can). |
protected boolean |
hasLeadingFence(boolean isNotFirst)
Line area is always considered to act as a fence. |
protected boolean |
hasTrailingFence(boolean isNotLast)
Line area is always considered to act as a fence. |
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. |
boolean |
mustKeepTogether()
|
boolean |
mustKeepWithNext()
|
boolean |
mustKeepWithPrevious()
|
int |
negotiateBPDAdjustment(int adj,
KnuthElement lastElement)
Negotiate BPD adjustment. |
| Methods inherited from class org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager |
|---|
addALetterSpaceTo, addALetterSpaceTo, addSpace, applyChanges, applyChanges, getBreakBefore, getContext, getCurrentArea, getExtraIPD, getSpaceEnd, getSpaceStart, getWordChars, hyphenate, setChildContext, setCurrentArea, setLMiter, setTraits |
| Methods inherited from class org.apache.fop.layoutmgr.AbstractLayoutManager |
|---|
addChildLM, addChildLMs, addId, addMarkersToPage, checkEndOfLayout, createChildLMs, createNextChildLMs, getChildLM, getChildLMs, getCurrentPage, getCurrentPV, getParent, getParentArea, getPSLM, hasNextChildLM, isFinished, isFirst, isLast, notifyEndOfLayout, notifyPos, reset, setCurrentChildLM, setFinished, setParent, toString, transferExtensionAttachments, transferExtensions, transferForeignAttributes |
| Methods inherited from class org.apache.fop.layoutmgr.AbstractBaseLayoutManager |
|---|
getAncestorBlockAreaBPD, getAncestorBlockAreaIPD, getBaseLength, getContentAreaBPD, getContentAreaIPD, getFObj, getGeneratesReferenceArea, getNextKnuthElements, 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, createNextChildLMs, getChildLMs, getContentAreaBPD, getContentAreaIPD, getFObj, getGeneratesReferenceArea, getNextKnuthElements, getParent, getParentArea, getPSLM, isFinished, notifyPos, reset, setFinished, setParent |
| Methods inherited from interface org.apache.fop.datatypes.PercentBaseContext |
|---|
getBaseLength |
| Field Detail |
|---|
public static final int DEFAULT_SPACE_WIDTH
| Constructor Detail |
|---|
public LineLayoutManager(Block block,
Length lh,
int l,
int f)
block - the block formatting objectlh - the default line heightl - the default lead, from top to baselinef - the default follow, from baseline to bottom| Method Detail |
|---|
public void initialize()
initialize in interface LayoutManagerinitialize in class AbstractLayoutManager
public java.util.List getNextKnuthElements(LayoutContext context,
int alignment)
getNextKnuthElements in interface LayoutManagergetNextKnuthElements in class AbstractLayoutManagercontext - the LayoutContext used to store layout informationalignment - the desired text alignment
public java.util.List getNextKnuthElements(LayoutContext context,
int alignment,
LeafPosition restartPosition)
context - the LayoutContext used to store layout informationalignment - the desired text alignmentrestartPosition - position at restart
LayoutManager.getNextKnuthElements(LayoutContext,int)public boolean mustKeepTogether()
mustKeepTogether in interface BlockLevelLayoutManagerpublic KeepProperty getKeepTogetherProperty()
getKeepTogetherProperty in interface BlockLevelLayoutManagerpublic KeepProperty getKeepWithPreviousProperty()
getKeepWithPreviousProperty in interface BlockLevelLayoutManagerpublic KeepProperty getKeepWithNextProperty()
getKeepWithNextProperty in interface BlockLevelLayoutManagerpublic Keep getKeepTogether()
getKeepTogether in interface BlockLevelLayoutManagerpublic boolean mustKeepWithPrevious()
mustKeepWithPrevious in interface BlockLevelLayoutManagerpublic boolean mustKeepWithNext()
mustKeepWithNext in interface BlockLevelLayoutManagerpublic Keep getKeepWithNext()
getKeepWithNext in interface BlockLevelLayoutManagerpublic Keep getKeepWithPrevious()
getKeepWithPrevious in interface BlockLevelLayoutManager
public int negotiateBPDAdjustment(int adj,
KnuthElement lastElement)
negotiateBPDAdjustment in interface BlockLevelLayoutManageradj - amount to adjustlastElement - the last knuth element
public void discardSpace(KnuthGlue spaceGlue)
discardSpace in interface BlockLevelLayoutManagerspaceGlue - the space
public java.util.List getChangedKnuthElements(java.util.List oldList,
int alignment,
int depth)
getChangedKnuthElements in interface InlineLevelLayoutManagergetChangedKnuthElements in class InlineStackingLayoutManageroldList - the elements to replacealignment - the desired text alignmentdepth - 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 LayoutManagergetChangedKnuthElements in class InlineStackingLayoutManageroldList - the elements to replacealignment - the desired text alignment
protected boolean hasLeadingFence(boolean isNotFirst)
hasLeadingFence in class InlineStackingLayoutManagerisNotFirst - ignored
protected boolean hasTrailingFence(boolean isNotLast)
hasTrailingFence in class InlineStackingLayoutManagerisNotLast - ignored
public void addAreas(PositionIterator parentIter,
LayoutContext context)
addAreas in interface LayoutManageraddAreas in class AbstractLayoutManagerparentIter - the iterator of break positionscontext - the context for adding areaspublic void addChildArea(Area childArea)
addChildArea in interface LayoutManageraddChildArea in class AbstractLayoutManagerchildArea - the child area to be addedpublic boolean getGeneratesBlockArea()
getGeneratesBlockArea in interface LayoutManagergetGeneratesBlockArea in class AbstractBaseLayoutManagerpublic boolean getGeneratesLineArea()
getGeneratesLineArea in interface LayoutManagergetGeneratesLineArea in class AbstractBaseLayoutManagerpublic boolean isRestartable()
true if this layout manager is able to re-generate its
Knuth elements after an IPD change.
isRestartable in interface LayoutManagerisRestartable in class AbstractBaseLayoutManagertrue if this layout manager can be restarted after an IPD
changepublic boolean handleOverflow(int milliPoints)
milliPoints - horizontal overflow
|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||