|
fop svn-trunk | |||||||||
| 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager |
|---|
InlineStackingLayoutManager.StackingIter |
| 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, parentLM |
| Fields inherited from class org.apache.fop.layoutmgr.AbstractBaseLayoutManager |
|---|
generatesBlockArea, generatesReferenceArea |
| Fields inherited from interface org.apache.fop.layoutmgr.BlockLevelLayoutManager |
|---|
KEEP_ALWAYS, KEEP_AUTO, LINE_HEIGHT_ADJUSTMENT, LINE_NUMBER_ADJUSTMENT, NO_ADJUSTMENT, SPACE_AFTER_ADJUSTMENT, SPACE_BEFORE_ADJUSTMENT |
| 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)
|
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. |
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. |
int |
getKeepTogetherStrength()
Returns the keep-together strength for this element. |
int |
getKeepWithNextStrength()
Returns the keep-with-next strength for this element. |
int |
getKeepWithPreviousStrength()
Returns the keep-with-previous strength for this element. |
java.util.List |
getNextKnuthElements(LayoutContext context,
int alignment)
Get a sequence of KnuthElements representing the content of the node assigned to the LM |
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 |
mustKeepTogether()
|
boolean |
mustKeepWithNext()
|
boolean |
mustKeepWithPrevious()
|
int |
negotiateBPDAdjustment(int adj,
KnuthElement lastElement)
|
| Methods inherited from class org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager |
|---|
addALetterSpaceTo, addSpace, applyChanges, clearPrevIPD, getContext, getCurrentArea, getExtraIPD, getPrevIPD, getSpaceEnd, getSpaceStart, getWordChars, hyphenate, removeWordSpace, 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, setFinished, setParent, toString, transferExtensionAttachments, transferExtensions, transferForeignAttributes |
| Methods inherited from class org.apache.fop.layoutmgr.AbstractBaseLayoutManager |
|---|
getAncestorBlockAreaBPD, getAncestorBlockAreaIPD, getBaseLength, getContentAreaBPD, getContentAreaIPD, getFObj, 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, createNextChildLMs, getChildLMs, getContentAreaBPD, getContentAreaIPD, getFObj, getGeneratesReferenceArea, getParent, getParentArea, getPSLM, isFinished, notifyPos, 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 boolean mustKeepTogether()
mustKeepTogether in interface BlockLevelLayoutManagerpublic int getKeepTogetherStrength()
getKeepTogetherStrength in interface BlockLevelLayoutManagerpublic boolean mustKeepWithPrevious()
mustKeepWithPrevious in interface BlockLevelLayoutManagerpublic boolean mustKeepWithNext()
mustKeepWithNext in interface BlockLevelLayoutManagerpublic int getKeepWithNextStrength()
getKeepWithNextStrength in interface BlockLevelLayoutManagerpublic int getKeepWithPreviousStrength()
getKeepWithPreviousStrength in interface BlockLevelLayoutManager
public int negotiateBPDAdjustment(int adj,
KnuthElement lastElement)
negotiateBPDAdjustment in interface BlockLevelLayoutManagerpublic void discardSpace(KnuthGlue spaceGlue)
discardSpace in interface BlockLevelLayoutManager
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 AbstractBaseLayoutManager
|
fop svn-trunk | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||