public interface LayoutManager extends PercentBaseContext
Modifier and Type | Method and Description |
---|---|
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 |
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<LayoutManager> |
getChildLMs() |
int |
getContentAreaBPD()
Returns the BPD of the content area
|
int |
getContentAreaIPD()
Returns the IPD of the content area
|
FObj |
getFObj()
Returns the fo this layout manager is associated with.
|
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 |
getNextKnuthElements(LayoutContext context,
int alignment)
Get a sequence of KnuthElements representing the content
of the node assigned to the LM.
|
List<ListElement> |
getNextKnuthElements(LayoutContext context,
int alignment,
Stack lmStack,
Position positionAtIPDChange,
LayoutManager restartAtLM)
Returns an updated list of Knuth elements corresponding to this layout
manager, after a change of IPD has been detected.
|
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.
|
boolean |
hasLineAreaDescendant()
Whether the FO handled by this layout manager has a descendant (including itself)
that will generate a line-area.
|
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.)
|
boolean |
isFromFootnote() |
boolean |
isRestartable()
Returns
true if this layout manager is able to re-generate its
Knuth elements after an IPD change. |
Position |
notifyPos(Position pos)
Adds a Position to the Position participating in the first|last determination by assigning
it a unique position index.
|
void |
reset()
Re-initializes this layout manager in order to re-generate its Knuth
elements according to a new IPD value.
|
void |
setFinished(boolean isFinished)
Set a flag indicating whether the LayoutManager has laid out all
its content.
|
void |
setFromFootnote(boolean fromFootnote) |
void |
setParent(LayoutManager lm)
Set the parent layout manager.
|
getBaseLength
void setParent(LayoutManager lm)
lm
- the parent layout managerLayoutManager getParent()
void initialize()
PageSequenceLayoutManager getPSLM()
boolean isFinished()
void setFinished(boolean isFinished)
isFinished
- the value to set the finished flag toArea getParentArea(Area childArea)
childArea
- the child area to get the parent forvoid addChildArea(Area childArea)
childArea
- the child area to addvoid addAreas(PositionIterator posIter, LayoutContext context)
posIter
- the position iteratorcontext
- the contextboolean createNextChildLMs(int pos)
pos
- index up to which child LMs are requestedList<LayoutManager> getChildLMs()
void addChildLM(LayoutManager lm)
lm
- the LM to be addedvoid addChildLMs(List<LayoutManager> newLMs)
newLMs
- the list of LMs to be addedList getNextKnuthElements(LayoutContext context, int alignment)
context
- the LayoutContext used to store layout informationalignment
- the desired text alignmentList<ListElement> getChangedKnuthElements(List<ListElement> oldList, int alignment)
oldList
- the elements to replacealignment
- the desired text alignmentboolean hasLineAreaDescendant()
true
if a descendant line-area will be generated, false
otherwiseint getBaselineOffset()
The behavior of this method is undefined if this FO has no descendant
line-area, and an exception may be thrown. See hasLineAreaDescendant()
hasLineAreaDescendant()
int getContentAreaIPD()
int getContentAreaBPD()
boolean getGeneratesReferenceArea()
boolean getGeneratesBlockArea()
boolean getGeneratesLineArea()
FObj getFObj()
Position notifyPos(Position pos)
pos
- the Positionvoid reset()
boolean isRestartable()
true
if this layout manager is able to re-generate its
Knuth elements after an IPD change.true
if this layout manager can be restarted after an IPD
changeList<ListElement> getNextKnuthElements(LayoutContext context, int alignment, Stack lmStack, Position positionAtIPDChange, LayoutManager restartAtLM)
context
- the layout contextalignment
- the alignmentlmStack
- the stack of LMs that are active at the IPD changepositionAtIPDChange
- the position corresponding to the element
finishing the page before the IPD changerestartAtLM
- if not null, the layout manager from which to restart.
That is, the IPD change occurs between two block elements and not inside
a paragraphboolean isFromFootnote()
void setFromFootnote(boolean fromFootnote)
Copyright © 2025 Apache Software Foundation. All rights reserved.