net.sf.statcvs.reportmodel
Class Table
Represents a data table for a report. Columns may be added to the table.
Values can be added to the columns. Finally, the table can be rendered
as HTML.
$Id: Table.java,v 1.2 2008/04/02 11:22:14 benoitx Exp $Table(String summary) - Creates a new table model
|
Table
public Table(String summary)
Creates a new table model
summary
- a short summary of the table data, intended for
non-visual web browsers
addColumn
public void addColumn(Column column)
Adds a column to the table
getColumnIterator
public Iterator getColumnIterator()
Returns an iterator of all
Column
objects of the table
getRowCount
public int getRowCount()
Returns the number of data rows in the table.
- number of data rows in the table
getSummary
public String getSummary()
Returns the summary text of the table. This is intended for non-visual
web browsers.
hasKeysInFirstColumn
public boolean hasKeysInFirstColumn()
Returns if the first column contains keys that identify each row
- true if first column contains keys
setKeysInFirstColumn
public void setKeysInFirstColumn(boolean enabled)
set if the first column contains keys that identify each row
enabled
- true if first column contains keys
setShowTotals
public void setShowTotals(boolean enabled)
set if totals of each column should be shown
enabled
- true if totals should be shown
showTotals
public boolean showTotals()
Returns if totals of each column should be shown