org.apache.fop.layoutmgr.table

Class ColumnSetup


public class ColumnSetup
extends java.lang.Object

Class holding a number of columns making up the column setup of a row.

Constructor Summary

ColumnSetup(Table table)
Main Constructor.

Method Summary

protected double
computeTableUnit(TableLayoutManager tlm)
Works out the base unit for resolving proportional-column-width() [p-c-w(x) = x * base_unit_ipd]
TableColumn
getColumn(int index)
Returns a column.
int
getColumnCount()
int
getSumOfColumnWidths(PercentBaseContext context)
Calculates the sum of all column widths.
int
getXOffset(int col, PercentBaseContext context)
Iterator
iterator()
String
toString()

Constructor Details

ColumnSetup

public ColumnSetup(Table table)
Main Constructor.
Parameters:
table - the table to construct this column setup for

Method Details

computeTableUnit

protected double computeTableUnit(TableLayoutManager tlm)
Works out the base unit for resolving proportional-column-width() [p-c-w(x) = x * base_unit_ipd]
Parameters:
tlm - the TableLayoutManager
Returns:
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.
Parameters:
index - index of the column (1 is the first column)
Returns:
the requested column

getColumnCount

public int getColumnCount()
Returns:
the number of columns in the setup.

getSumOfColumnWidths

public int getSumOfColumnWidths(PercentBaseContext context)
Calculates the sum of all column widths.
Parameters:
context - the context for percentage based calculations
Returns:
the requested sum in millipoints

getXOffset

public int getXOffset(int col,
                      PercentBaseContext context)
Parameters:
col - column index (1 is first column)
context - the context for percentage based calculations
Returns:
the X offset of the requested column

iterator

public Iterator iterator()
Returns:
an Iterator over all columns

toString

public String toString()

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