org.apache.fop.layoutmgr.table
Class ColumnSetup
java.lang.Object
org.apache.fop.layoutmgr.table.ColumnSetup
public class ColumnSetup
extends java.lang.Object
Class holding a number of columns making up the column setup of a row.
ColumnSetup
public ColumnSetup(Table table)
Main Constructor.
table
- the table to construct this column setup for
computeTableUnit
public float computeTableUnit(PercentBaseContext percentBaseContext,
int contentAreaIPD)
Works out the base unit for resolving proportional-column-width()
[p-c-w(x) = x * base_unit_ipd]
percentBaseContext
- the percent base context for relative valuescontentAreaIPD
- the IPD of the available content area
- the computed base unit (in millipoints)
computeTableUnit
protected double computeTableUnit(TableLayoutManager tlm)
Works out the base unit for resolving proportional-column-width()
[p-c-w(x) = x * base_unit_ipd]
tlm
- the TableLayoutManager
- the computed base unit (in millipoint)
getColumn
public TableColumn getColumn(int index)
Returns a column. If the index of the column is bigger than the number of explicitly
defined columns the last column is returned.
index
- index of the column (1 is the first column)
getColumnCount
public int getColumnCount()
- the number of columns in the setup.
getSumOfColumnWidths
public int getSumOfColumnWidths(PercentBaseContext context)
Calculates the sum of all column widths.
context
- the context for percentage based calculations
- the requested sum in millipoints
getXOffset
public int getXOffset(int col,
PercentBaseContext context)
col
- column index (1 is first column)context
- the context for percentage based calculations
- the X offset of the requested column
iterator
public Iterator iterator()
- an Iterator over all columns
toString
public String toString()
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.