org.apache.fop.layoutmgr.table

Class TableContentLayoutManager

Implemented Interfaces:
PercentBaseContext

public class TableContentLayoutManager
extends java.lang.Object
implements PercentBaseContext

Layout manager for table contents, particularly managing the creation of combined element lists.

Constructor Summary

TableContentLayoutManager(TableLayoutManager parent)
Main constructor

Method Summary

void
addAreas(PositionIterator parentIter, LayoutContext layoutContext)
Adds the areas generated by this layout manager to the area tree.
void
addRowBackgroundArea(TableRow row, int bpd, int ipd, int yoffset)
Adds the area for the row background if any.
int
getBaseLength(int lengthBase, FObj fobj)
ColumnSetup
getColumns()
protected LinkedList
getFooterElements()
protected int
getFooterNetHeight()
protected LinkedList
getHeaderElements()
protected int
getHeaderNetHeight()
LinkedList
getNextKnuthElements(LayoutContext context, int alignment)
Block
getRowArea(TableRow row)
Get the area for a row for background.
TableLayoutManager
getTableLM()
int
getUsedBPD()
protected int
getXOffsetOfGridUnit(GridUnit gu)
Retuns the X offset of the given grid unit.
void
setStartXOffset(int startXOffset)
Sets the overall starting x-offset.

Constructor Details

TableContentLayoutManager

public TableContentLayoutManager(TableLayoutManager parent)
Main constructor
Parameters:
parent - Parent layout manager

Method Details

addAreas

public void addAreas(PositionIterator parentIter,
                     LayoutContext layoutContext)
Adds the areas generated by this layout manager to the area tree.
Parameters:
parentIter - the position iterator
layoutContext - the layout context for adding areas

addRowBackgroundArea

public void addRowBackgroundArea(TableRow row,
                                 int bpd,
                                 int ipd,
                                 int yoffset)
Adds the area for the row background if any.
Parameters:
row - row for which to generate the background
bpd - block-progression-dimension of the row
ipd - inline-progression-dimension of the row
yoffset - Y offset at which to paint

getBaseLength

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

getColumns

public ColumnSetup getColumns()
Returns:
the column setup of this table

getFooterElements

protected LinkedList getFooterElements()
Returns:
the footer element list

getFooterNetHeight

protected int getFooterNetHeight()
Returns:
the net footer height

getHeaderElements

protected LinkedList getHeaderElements()
Returns:
the header element list

getHeaderNetHeight

protected int getHeaderNetHeight()
Returns:
the net header height

getNextKnuthElements

public LinkedList getNextKnuthElements(LayoutContext context,
                                       int alignment)
See Also:
LayoutManager

getRowArea

public Block getRowArea(TableRow row)
Get the area for a row for background.
Parameters:
row - the table-row object or null
Returns:
the row area or null if there's no background to paint

getTableLM

public TableLayoutManager getTableLM()
Returns:
the table layout manager

getUsedBPD

public int getUsedBPD()
Returns:
the amount of block-progression-dimension used by the content

getXOffsetOfGridUnit

protected int getXOffsetOfGridUnit(GridUnit gu)
Retuns the X offset of the given grid unit.
Parameters:
gu - the grid unit
Returns:
the requested X offset

setStartXOffset

public void setStartXOffset(int startXOffset)
Sets the overall starting x-offset. Used for proper placement of cells.
Parameters:
startXOffset - starting x-offset (table's start-indent)

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