|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.statcvs.reportmodel.Column net.sf.statcvs.reportmodel.IntegerColumn
public class IntegerColumn
A column of integer values. The column's total is the sum of all values.
Constructor Summary | |
---|---|
IntegerColumn(java.lang.String title)
Creates a new SimpleTextColumn with the given head |
Method Summary | |
---|---|
void |
addValue(int value)
Adds a value to this column (in a new row) |
int |
getRows()
Return number of rows that have been added to this column |
int |
getSum()
Returns the sum of all values in the column |
int |
getValue(int rowIndex)
Returns a value in the column |
void |
renderCell(int rowIndex,
TableCellRenderer renderer)
Renders a row of the column into a TableCellRenderer by calling one of its TableCellRenderer.renderCell(java.lang.String) methods |
void |
renderHead(TableCellRenderer renderer)
Renders the head of the column into a TableCellRenderer by calling one of its TableCellRenderer.renderCell(java.lang.String) methods |
void |
renderTotal(TableCellRenderer renderer)
Renders the footer of the column into a TableCellRenderer by calling one of its TableCellRenderer.renderCell(java.lang.String)
methods. |
void |
setShowPercentages(boolean enable)
Set if the values should be shown as percentages |
void |
setShowValues(boolean enable)
Set if the actual integer values should be shown |
void |
setSum(int sum)
Sets the sum of the column. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntegerColumn(java.lang.String title)
title
- the head of the columnMethod Detail |
---|
public void setShowValues(boolean enable)
enable
- show values?public void setShowPercentages(boolean enable)
enable
- show percentages?public void addValue(int value)
value
- the new valuepublic int getValue(int rowIndex)
rowIndex
- the row to get, starting at 0
public int getSum()
public void setSum(int sum)
sum
- the column's totalpublic int getRows()
Column
getRows
in class Column
Column.getRows()
public void renderHead(TableCellRenderer renderer)
Column
TableCellRenderer.renderCell(java.lang.String)
methods
renderHead
in class Column
renderer
- the TableCellRenderer to use
TODO: this is probably unnecessary; better add a getTitle methodColumn.renderHead(net.sf.statcvs.renderer.TableCellRenderer)
public void renderCell(int rowIndex, TableCellRenderer renderer)
Column
TableCellRenderer.renderCell(java.lang.String)
methods
renderCell
in class Column
rowIndex
- the row number, starting at 0renderer
- the TableCellRenderer to useColumn.renderCell(int, net.sf.statcvs.renderer.TableCellRenderer)
public void renderTotal(TableCellRenderer renderer)
Column
TableCellRenderer.renderCell(java.lang.String)
methods. The footer usually contains some kind of total for the column.
renderTotal
in class Column
renderer
- the TableCellRenderer to useColumn.renderTotal(net.sf.statcvs.renderer.TableCellRenderer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |