Package net.sf.statcvs.reportmodel
Class RatioColumn
java.lang.Object
net.sf.statcvs.reportmodel.Column
net.sf.statcvs.reportmodel.RatioColumn
A column showing the ratio between two
IntegerColumn
s.
The two columns do not have to be shown in the table.- Version:
- $Id: RatioColumn.java,v 1.2 2008/04/02 11:22:14 benoitx Exp $
- Author:
- Richard Cyganiak invalid input: '<'rcyg@gmx.de>
-
Constructor Summary
ConstructorsConstructorDescriptionRatioColumn
(String title, IntegerColumn col1, IntegerColumn col2) Creates a new RatioColumn, which contains the ratio between col1 and col2 -
Method Summary
Modifier and TypeMethodDescriptionint
getRows()
Return number of rows that have been added to this columnvoid
renderCell
(int rowIndex, TableCellRenderer renderer) Renders a row of the column into a TableCellRenderer by calling one of itsTableCellRenderer.renderCell(java.lang.String)
methodsvoid
renderHead
(TableCellRenderer renderer) Renders the head of the column into a TableCellRenderer by calling one of itsTableCellRenderer.renderCell(java.lang.String)
methodsvoid
renderTotal
(TableCellRenderer renderer) Renders the footer of the column into a TableCellRenderer by calling one of itsTableCellRenderer.renderCell(java.lang.String)
methods.
-
Constructor Details
-
RatioColumn
Creates a new RatioColumn, which contains the ratio between col1 and col2- Parameters:
title
- the title for the columncol1
- the first columncol2
- the second column
-
-
Method Details
-
getRows
public int getRows()Description copied from class:Column
Return number of rows that have been added to this column -
renderHead
Description copied from class:Column
Renders the head of the column into a TableCellRenderer by calling one of itsTableCellRenderer.renderCell(java.lang.String)
methods- Specified by:
renderHead
in classColumn
- Parameters:
renderer
- the TableCellRenderer to use TODO: this is probably unnecessary; better add a getTitle method- See Also:
-
renderCell
Description copied from class:Column
Renders a row of the column into a TableCellRenderer by calling one of itsTableCellRenderer.renderCell(java.lang.String)
methods- Specified by:
renderCell
in classColumn
- Parameters:
rowIndex
- the row number, starting at 0renderer
- the TableCellRenderer to use- See Also:
-
renderTotal
Description copied from class:Column
Renders the footer of the column into a TableCellRenderer by calling one of itsTableCellRenderer.renderCell(java.lang.String)
methods. The footer usually contains some kind of total for the column.- Specified by:
renderTotal
in classColumn
- Parameters:
renderer
- the TableCellRenderer to use- See Also:
-