|
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
public abstract class AbstractLayoutManager
The base class for most LayoutManagers.
| Field Summary | |
|---|---|
protected java.util.ListIterator<LayoutManager> |
childLMiter
child LM iterator during getNextKnuthElement phase |
protected java.util.List<LayoutManager> |
childLMs
List of child LayoutManagers |
protected LayoutManager |
curChildLM
child LM during getNextKnuthElement phase |
protected java.util.ListIterator |
fobjIter
Iterator for child LayoutManagers |
protected LayoutManager |
parentLayoutManager
Parent LayoutManager for this LayoutManager |
| Fields inherited from class org.apache.fop.layoutmgr.AbstractBaseLayoutManager |
|---|
fobj, generatesBlockArea, generatesReferenceArea |
| Constructor Summary | |
|---|---|
AbstractLayoutManager()
Abstract layout manager. |
|
AbstractLayoutManager(FObj fo)
Abstract layout manager. |
|
| Method Summary | |
|---|---|
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 a child area to 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(java.util.List newLMs)
Add the LMs in the argument to the list of child LMs; |
protected void |
addId()
Registers the FO's id on the current PageViewport |
protected void |
addMarkersToPage(boolean isStarting,
boolean isFirst,
boolean isLast)
Registers the FO's markers on the current PageViewport |
protected void |
checkEndOfLayout(Position pos)
Checks to see if the incoming Position
is the last one for this LM, and if so, calls
notifyEndOfLayout() and cleans up. |
protected java.util.List<LayoutManager> |
createChildLMs(int size)
Create the LM instances for the children of the formatting object being handled by this LM. |
boolean |
createNextChildLMs(int pos)
Create more child LMs of the parent, up to child LM index pos |
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. |
protected LayoutManager |
getChildLM()
Return currently active child LayoutManager or null if all children have finished layout. |
java.util.List<LayoutManager> |
getChildLMs()
|
Page |
getCurrentPage()
|
PageViewport |
getCurrentPV()
|
java.util.List |
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)
Return an Area which can contain the passed childArea. |
PageSequenceLayoutManager |
getPSLM()
Get the active PageSequenceLayoutManager instance for this layout process. |
protected boolean |
hasNextChildLM()
Return indication if getChildLM will return another LM. |
void |
initialize()
initialize the layout manager. |
boolean |
isFinished()
Tell whether this LayoutManager has handled all of its content. |
boolean |
isFirst(Position pos)
Indicates whether the given Position is the first area-generating Position of this LM. |
boolean |
isLast(Position pos)
Indicates whether the given Position is the last area-generating Position of this LM. |
protected void |
notifyEndOfLayout()
Notifies the PageSequenceLayoutManager that layout
for this LM has ended. |
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. |
protected void |
setCurrentChildLM(LayoutManager childLM)
Set currently active child layout manager. |
void |
setFinished(boolean fin)
Set the flag indicating the LayoutManager has handled all of its content. |
void |
setParent(LayoutManager lm)
Set the parent layout manager. |
java.lang.String |
toString()
|
protected void |
transferExtensionAttachments(AreaTreeObject targetArea)
Transfers extension attachments from the formatting object to the area. |
protected void |
transferExtensions(AreaTreeObject targetArea)
Transfers extensions (foreign attributes and extension attachments) from the formatting object to the area. |
protected void |
transferForeignAttributes(AreaTreeObject targetArea)
Transfers foreign attributes from the formatting object to the area. |
| 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 |
| Field Detail |
|---|
protected LayoutManager parentLayoutManager
protected java.util.List<LayoutManager> childLMs
protected java.util.ListIterator fobjIter
protected LayoutManager curChildLM
protected java.util.ListIterator<LayoutManager> childLMiter
| Constructor Detail |
|---|
public AbstractLayoutManager()
public AbstractLayoutManager(FObj fo)
fo - the formatting object for this layout manager| Method Detail |
|---|
public void setParent(LayoutManager lm)
setParent in interface LayoutManagerlm - the parent layout managerpublic LayoutManager getParent()
getParent in interface LayoutManagerpublic void initialize()
initialize in interface LayoutManagerprotected LayoutManager getChildLM()
protected void setCurrentChildLM(LayoutManager childLM)
childLM - the child layout managerprotected boolean hasNextChildLM()
public boolean isFinished()
isFinished in interface LayoutManagerpublic void setFinished(boolean fin)
setFinished in interface LayoutManagerfin - the flag value to be set
public void addAreas(PositionIterator posIter,
LayoutContext context)
addAreas in interface LayoutManagerposIter - the position iteratorcontext - the context
public java.util.List getNextKnuthElements(LayoutContext context,
int alignment)
getNextKnuthElements in interface LayoutManagercontext - the LayoutContext used to store layout informationalignment - the desired text alignment
public java.util.List getChangedKnuthElements(java.util.List oldList,
int alignment)
getChangedKnuthElements in interface LayoutManageroldList - the elements to replacealignment - the desired text alignment
public Area getParentArea(Area childArea)
getParentArea in interface LayoutManagerchildArea - the child area for which the parent area is wanted
public void addChildArea(Area childArea)
addChildArea in interface LayoutManagerchildArea - the child area to be addedprotected java.util.List<LayoutManager> createChildLMs(int size)
size - the requested number of child LMs
public PageSequenceLayoutManager getPSLM()
getPSLM in interface LayoutManagerpublic Page getCurrentPage()
Page instance corresponding to the current pageAbstractPageSequenceLayoutManager.getCurrentPage()public PageViewport getCurrentPV()
public boolean createNextChildLMs(int pos)
createNextChildLMs in interface LayoutManagerpos - index up to which child LMs are requested
public java.util.List<LayoutManager> getChildLMs()
getChildLMs in interface LayoutManagerpublic void addChildLM(LayoutManager lm)
addChildLM in interface LayoutManagerlm - the LM to be addedpublic void addChildLMs(java.util.List newLMs)
addChildLMs in interface LayoutManagernewLMs - the list of LMs to be addedpublic Position notifyPos(Position pos)
notifyPos in interface LayoutManagerpos - the Position
public boolean isFirst(Position pos)
pos - the Position (must be one with a position index)
public boolean isLast(Position pos)
pos - the Position (must be one with a position index)
protected void transferForeignAttributes(AreaTreeObject targetArea)
targetArea - the area to set the attributes onprotected void transferExtensionAttachments(AreaTreeObject targetArea)
targetArea - the area to set the extensions onprotected void transferExtensions(AreaTreeObject targetArea)
targetArea - the area to set the extensions on
protected void addMarkersToPage(boolean isStarting,
boolean isFirst,
boolean isLast)
isStarting - boolean indicating whether the markers qualify as 'starting'isFirst - boolean indicating whether the markers qualify as 'first'isLast - boolean indicating whether the markers qualify as 'last'protected void addId()
protected void notifyEndOfLayout()
PageSequenceLayoutManager that layout
for this LM has ended.
protected void checkEndOfLayout(Position pos)
Position
is the last one for this LM, and if so, calls
notifyEndOfLayout() and cleans up.
pos - the Position to checkpublic java.lang.String toString()
toString in class java.lang.Objectpublic void reset()
reset in interface LayoutManagerreset in class AbstractBaseLayoutManager
|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||