org.apache.fop.layoutmgr

Class AbstractBaseLayoutManager

Implemented Interfaces:
LayoutManager, PercentBaseContext
Known Direct Subclasses:
AbstractLayoutManager, ContentLayoutManager

public abstract class AbstractBaseLayoutManager
extends java.lang.Object
implements LayoutManager, PercentBaseContext

The base class for nearly all LayoutManagers. Provides the functionality for merging the LayoutManager and the PercentBaseContext interfaces into a common base calls 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 fobj)
int
getContentAreaBPD()
int
getContentAreaIPD()
FObj
getFObj()
boolean
getGeneratesBlockArea()
boolean
getGeneratesLineArea()
boolean
getGeneratesReferenceArea()
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.
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.

Field Details

fobj

protected FObj fobj
The formatting object for this LM

generatesBlockArea

protected boolean generatesBlockArea
Indicator if this LM generates block areas

generatesReferenceArea

protected boolean generatesReferenceArea
Indicator if this LM generates reference areas

Constructor Details

AbstractBaseLayoutManager

public AbstractBaseLayoutManager()
Abstract base layout manager.

AbstractBaseLayoutManager

public AbstractBaseLayoutManager(FObj fo)
Abstract base layout manager.
Parameters:
fo - the formatting object for this layout manager

Method Details

getAncestorBlockAreaBPD

protected int getAncestorBlockAreaBPD()
Find the first ancestor area that is a block area and returns its BPD.
Returns:
the bpd of the ancestor block area

getAncestorBlockAreaIPD

protected int getAncestorBlockAreaIPD()
Find the first ancestor area that is a block area and returns its IPD.
Returns:
the ipd of the ancestor block area

getBaseLength

public int getBaseLength(int lengthBase,
                         FObj fobj)
Specified by:
getBaseLength in interface PercentBaseContext

getContentAreaBPD

public int getContentAreaBPD()
Specified by:
getContentAreaBPD in interface LayoutManager

getContentAreaIPD

public int getContentAreaIPD()
Specified by:
getContentAreaIPD in interface LayoutManager

getFObj

public FObj getFObj()
Specified by:
getFObj in interface LayoutManager

getGeneratesBlockArea

public boolean getGeneratesBlockArea()
Specified by:
getGeneratesBlockArea in interface LayoutManager

getGeneratesLineArea

public boolean getGeneratesLineArea()
Specified by:
getGeneratesLineArea in interface LayoutManager

getGeneratesReferenceArea

public boolean getGeneratesReferenceArea()
Specified by:
getGeneratesReferenceArea in interface LayoutManager

getParentAreaBPD

protected int getParentAreaBPD()
Find the parent area and returns its BPD.
Returns:
the bpd of the parent area

getParentAreaIPD

protected int getParentAreaIPD()
Find the parent area and returns its IPD.
Returns:
the ipd of the parent area

getReferenceAreaBPD

protected int getReferenceAreaBPD()
Find the first ancestor area that is a reference area and returns its BPD.
Returns:
the bpd of the ancestor reference area

getReferenceAreaIPD

public int getReferenceAreaIPD()
Find the first ancestor area that is a reference area and returns its IPD.
Returns:
the ipd of the ancestor reference area

setGeneratesBlockArea

protected void setGeneratesBlockArea(boolean generatesBlockArea)
Lets implementing LM set the flag indicating if they generate block areas.
Parameters:
generatesBlockArea - if true the areas generates by this LM are block areas.

setGeneratesReferenceArea

protected void setGeneratesReferenceArea(boolean generatesReferenceArea)
Lets implementing LM set the flag indicating if they generate reference areas.
Parameters:
generatesReferenceArea - if true the areas generates by this LM are reference areas.

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.