net.sf.statcvs.reportmodel
Class IntegerColumn
public class IntegerColumn
A column of integer values. The column's total is the sum of all values.
$Id: IntegerColumn.java,v 1.2 2008/04/02 11:22:14 benoitx Exp $IntegerColumn(String title) - Creates a new SimpleTextColumn with the given head
|
IntegerColumn
public IntegerColumn(String title)
Creates a new SimpleTextColumn with the given head
title
- the head of the column
addValue
public void addValue(int value)
Adds a value to this column (in a new row)
getSum
public int getSum()
Returns the sum of all values in the column
getValue
public int getValue(int rowIndex)
Returns a value in the column
rowIndex
- the row to get, starting at 0
setShowPercentages
public void setShowPercentages(boolean enable)
Set if the values should be shown as percentages
enable
- show percentages?
setShowValues
public void setShowValues(boolean enable)
Set if the actual integer values should be shown
setSum
public void setSum(int sum)
Sets the sum of the column. Useful if, for example, the
column contains only the top 10 values of more values, but
the column total should reflect all values.