public class ContentLayoutManager extends AbstractBaseLayoutManager implements InlineLevelLayoutManager
fobj, generatesBlockArea, generatesReferenceArea
Constructor and Description |
---|
ContentLayoutManager(Area area,
LayoutManager parentLM)
Constructs a new ContentLayoutManager
|
ContentLayoutManager(PageSequenceLayoutManager pslm,
Title foTitle)
Constructor using a fo:title formatting object and its PageSequenceLayoutManager parent.
|
Modifier and Type | Method and Description |
---|---|
List |
addALetterSpaceTo(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
|
List |
addALetterSpaceTo(List oldList,
int depth)
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
|
void |
addAreas(PositionIterator posIter,
LayoutContext context)
Tell the layout manager to add all the child areas implied
by Position objects which will be returned by the
Iterator.
|
void |
addChildArea(Area childArea)
Add the area as a child of the current area.
|
void |
addChildLM(LayoutManager lm)
Add the LM in the argument to the list of child LMs;
set this LM as the parent;
initialize the LM.
|
void |
addChildLMs(List<LayoutManager> newLMs)
Add the LMs in the argument to the list of child LMs;
|
boolean |
applyChanges(List oldList)
Tell the LM to apply the changes due to hyphenation
|
boolean |
applyChanges(List oldList,
int depth)
Tell the LM to apply the changes due to hyphenation
|
boolean |
createNextChildLMs(int pos)
Create more child LMs of the parent, up to child LM index pos
|
int |
getBaselineOffset()
Returns the position of the dominant-baseline of this FO's first descendant
line-area.
|
List<ListElement> |
getChangedKnuthElements(List<ListElement> 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.
|
List<ListElement> |
getChangedKnuthElements(List<ListElement> 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
|
List<LayoutManager> |
getChildLMs() |
int |
getContentAreaBPD()
Returns the BPD of the content area
|
int |
getContentAreaIPD()
Returns the IPD of the content area
|
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.
|
boolean |
getGeneratesReferenceArea()
Returns an indication if the layout manager generates a reference area.
|
List<ListElement> |
getNextKnuthElements(LayoutContext context,
int alignment)
Get a sequence of KnuthElements representing the content
of the node assigned to the LM.
|
LayoutManager |
getParent()
Get the parent layout manager.
|
Area |
getParentArea(Area childArea)
Get the parent area for an area.
|
PageSequenceLayoutManager |
getPSLM()
Get the active PageSequenceLayoutManager instance for this
layout process.
|
int |
getStackingSize() |
String |
getWordChars(Position pos)
Get the word chars corresponding to the given position.
|
boolean |
hasLineAreaDescendant()
Whether the FO handled by this layout manager has a descendant (including itself)
that will generate a line-area.
|
void |
hyphenate(Position pos,
HyphContext hc)
Tell the LM to hyphenate a word
|
void |
initialize()
initialize the layout manager.
|
boolean |
isFinished()
Return a value indicating whether this LayoutManager has laid out
all its content (or generated BreakPossibilities for all content.)
|
Position |
notifyPos(Position pos)
Adds a Position to the Position participating in the first|last determination by assigning
it a unique position index.
|
void |
setFinished(boolean isFinished)
Set a flag indicating whether the LayoutManager has laid out all
its content.
|
void |
setParent(LayoutManager lm)
Set the parent layout manager.
|
getAncestorBlockAreaBPD, getAncestorBlockAreaIPD, getBaseLength, getChangeBarList, getFObj, getNextKnuthElements, getParentAreaBPD, getParentAreaIPD, getReferenceAreaBPD, getReferenceAreaIPD, isFromFootnote, isRestartable, preserveChildrenAtEndOfLayout, recreateChildrenLMs, reset, setFromFootnote, setGeneratesBlockArea, setGeneratesReferenceArea
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFObj, getNextKnuthElements, isFromFootnote, isRestartable, reset, setFromFootnote
getBaseLength
public ContentLayoutManager(Area area, LayoutManager parentLM)
area
- The parent areaparentLM
- the parent layout managerpublic ContentLayoutManager(PageSequenceLayoutManager pslm, Title foTitle)
pslm
- the PageSequenceLayoutManager parent of this LMfoTitle
- the Title FO for which this LM is madepublic void initialize()
initialize
in interface LayoutManager
public void addAreas(PositionIterator posIter, LayoutContext context)
addAreas
in interface LayoutManager
posIter
- the position iteratorcontext
- the contextpublic int getStackingSize()
public Area getParentArea(Area childArea)
getParentArea
in interface LayoutManager
childArea
- the child area to get the parent forpublic void addChildArea(Area childArea)
addChildArea
in interface LayoutManager
childArea
- the child area to addpublic void setParent(LayoutManager lm)
setParent
in interface LayoutManager
lm
- the parent layout managerpublic LayoutManager getParent()
getParent
in interface LayoutManager
public boolean isFinished()
isFinished
in interface LayoutManager
public void setFinished(boolean isFinished)
setFinished
in interface LayoutManager
isFinished
- the value to set the finished flag topublic boolean createNextChildLMs(int pos)
createNextChildLMs
in interface LayoutManager
pos
- index up to which child LMs are requestedpublic List<LayoutManager> getChildLMs()
getChildLMs
in interface LayoutManager
public void addChildLM(LayoutManager lm)
addChildLM
in interface LayoutManager
lm
- the LM to be addedpublic void addChildLMs(List<LayoutManager> newLMs)
addChildLMs
in interface LayoutManager
newLMs
- the list of LMs to be addedpublic List<ListElement> getNextKnuthElements(LayoutContext context, int alignment)
getNextKnuthElements
in interface LayoutManager
context
- the LayoutContext used to store layout informationalignment
- the desired text alignmentpublic List addALetterSpaceTo(List oldList)
addALetterSpaceTo
in interface InlineLevelLayoutManager
oldList
- the elements which must be given one more letter spacepublic List addALetterSpaceTo(List oldList, int depth)
addALetterSpaceTo
in interface InlineLevelLayoutManager
oldList
- the elements which must be given one more letter spacedepth
- the depth at which the Positions for this LM in oldList are foundpublic 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(List oldList)
applyChanges
in interface InlineLevelLayoutManager
oldList
- the list of the old elements the changes refer topublic boolean applyChanges(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 foundpublic List<ListElement> getChangedKnuthElements(List<ListElement> oldList, int alignment)
getChangedKnuthElements
in interface LayoutManager
oldList
- the elements to replacealignment
- the desired text alignmentpublic List<ListElement> getChangedKnuthElements(List<ListElement> 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 foundpublic PageSequenceLayoutManager getPSLM()
getPSLM
in interface LayoutManager
public boolean hasLineAreaDescendant()
LayoutManager
hasLineAreaDescendant
in interface LayoutManager
true
if a descendant line-area will be generated, false
otherwisepublic int getBaselineOffset()
LayoutManager
The behavior of this method is undefined if this FO has no descendant
line-area, and an exception may be thrown. See LayoutManager.hasLineAreaDescendant()
getBaselineOffset
in interface LayoutManager
LayoutManager.hasLineAreaDescendant()
public int getContentAreaIPD()
getContentAreaIPD
in interface LayoutManager
getContentAreaIPD
in class AbstractBaseLayoutManager
public int getContentAreaBPD()
getContentAreaBPD
in interface LayoutManager
getContentAreaBPD
in class AbstractBaseLayoutManager
public boolean getGeneratesReferenceArea()
getGeneratesReferenceArea
in interface LayoutManager
getGeneratesReferenceArea
in class AbstractBaseLayoutManager
public boolean getGeneratesBlockArea()
getGeneratesBlockArea
in interface LayoutManager
getGeneratesBlockArea
in class AbstractBaseLayoutManager
public boolean getGeneratesLineArea()
getGeneratesLineArea
in interface LayoutManager
getGeneratesLineArea
in class AbstractBaseLayoutManager
public Position notifyPos(Position pos)
notifyPos
in interface LayoutManager
pos
- the PositionCopyright © 2025 Apache Software Foundation. All rights reserved.