|
fop 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.layoutmgr.AbstractBaseLayoutManager
public abstract class AbstractBaseLayoutManager
The base class for nearly all LayoutManagers.
Provides the functionality for merging the LayoutManager
and the PercentBaseContext
interfaces
into a common base class for all higher LayoutManagers.
Field Summary | |
---|---|
protected FObj |
fobj
The formatting object for this LM. |
protected boolean |
generatesBlockArea
Indicator if this LM generates block areas. |
protected boolean |
generatesReferenceArea
Indicator if this LM generates reference areas. |
Constructor Summary | |
---|---|
AbstractBaseLayoutManager()
Abstract base layout manager. |
|
AbstractBaseLayoutManager(FObj fo)
Abstract base layout manager. |
Method Summary | |
---|---|
protected int |
getAncestorBlockAreaBPD()
Find the first ancestor area that is a block area and returns its BPD. |
protected int |
getAncestorBlockAreaIPD()
Find the first ancestor area that is a block area and returns its IPD. |
int |
getBaseLength(int lengthBase,
FObj fobjx)
Returns the base length for the given length base. |
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. |
java.util.List |
getNextKnuthElements(LayoutContext context,
int alignment,
java.util.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. |
protected int |
getParentAreaBPD()
Find the parent area and returns its BPD. |
protected int |
getParentAreaIPD()
Find the parent area and returns its IPD. |
protected int |
getReferenceAreaBPD()
Find the first ancestor area that is a reference area and returns its BPD. |
int |
getReferenceAreaIPD()
Find the first ancestor area that is a reference area and returns its IPD. |
boolean |
isRestartable()
Returns true if this layout manager is able to re-generate its
Knuth elements after an IPD change. |
void |
reset()
Re-initializes this layout manager in order to re-generate its Knuth elements according to a new IPD value. |
protected void |
setGeneratesBlockArea(boolean generatesBlockArea)
Lets implementing LM set the flag indicating if they generate block areas. |
protected void |
setGeneratesReferenceArea(boolean generatesReferenceArea)
Lets implementing LM set the flag indicating if they generate reference areas. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.fop.layoutmgr.LayoutManager |
---|
addAreas, addChildArea, addChildLM, addChildLMs, createNextChildLMs, getChangedKnuthElements, getChildLMs, getNextKnuthElements, getParent, getParentArea, getPSLM, initialize, isFinished, notifyPos, setFinished, setParent |
Field Detail |
---|
protected boolean generatesReferenceArea
protected boolean generatesBlockArea
protected final FObj fobj
Constructor Detail |
---|
public AbstractBaseLayoutManager()
public AbstractBaseLayoutManager(FObj fo)
fo
- the formatting object for this layout managerMethod Detail |
---|
public int getBaseLength(int lengthBase, FObj fobjx)
LengthBase
.
getBaseLength
in interface PercentBaseContext
lengthBase
- Indicates which type of the base length value is to be returnedfobjx
- The FO object against which the percentage should be evaluated
protected int getAncestorBlockAreaIPD()
protected int getAncestorBlockAreaBPD()
protected int getParentAreaIPD()
protected int getParentAreaBPD()
public int getReferenceAreaIPD()
protected int getReferenceAreaBPD()
public int getContentAreaIPD()
UnsupportedOperationException
.
getContentAreaIPD
in interface LayoutManager
public int getContentAreaBPD()
UnsupportedOperationException
.
getContentAreaBPD
in interface LayoutManager
public boolean getGeneratesReferenceArea()
getGeneratesReferenceArea
in interface LayoutManager
protected void setGeneratesReferenceArea(boolean generatesReferenceArea)
generatesReferenceArea
- if true the areas generates by this LM are
reference areas.public boolean getGeneratesBlockArea()
getGeneratesBlockArea
in interface LayoutManager
protected void setGeneratesBlockArea(boolean generatesBlockArea)
generatesBlockArea
- if true the areas generates by this LM are block areas.public boolean getGeneratesLineArea()
getGeneratesLineArea
in interface LayoutManager
public FObj getFObj()
getFObj
in interface LayoutManager
public void reset()
reset
in interface LayoutManager
public boolean isRestartable()
true
if this layout manager is able to re-generate its
Knuth elements after an IPD change.
isRestartable
in interface LayoutManager
true
if this layout manager can be restarted after an IPD
changepublic java.util.List getNextKnuthElements(LayoutContext context, int alignment, java.util.Stack lmStack, Position positionAtIPDChange, LayoutManager restartAtLM)
getNextKnuthElements
in interface LayoutManager
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 paragraph
|
fop 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |