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
IntegerColumns.
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 <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 TypeMethodDescriptionintgetRows()Return number of rows that have been added to this columnvoidrenderCell(int rowIndex, TableCellRenderer renderer) Renders a row of the column into a TableCellRenderer by calling one of itsTableCellRenderer.renderCell(java.lang.String)methodsvoidrenderHead(TableCellRenderer renderer) Renders the head of the column into a TableCellRenderer by calling one of itsTableCellRenderer.renderCell(java.lang.String)methodsvoidrenderTotal(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:ColumnReturn number of rows that have been added to this column -
renderHead
Description copied from class:ColumnRenders the head of the column into a TableCellRenderer by calling one of itsTableCellRenderer.renderCell(java.lang.String)methods- Specified by:
renderHeadin classColumn- Parameters:
renderer- the TableCellRenderer to use TODO: this is probably unnecessary; better add a getTitle method- See Also:
-
renderCell
Description copied from class:ColumnRenders a row of the column into a TableCellRenderer by calling one of itsTableCellRenderer.renderCell(java.lang.String)methods- Specified by:
renderCellin classColumn- Parameters:
rowIndex- the row number, starting at 0renderer- the TableCellRenderer to use- See Also:
-
renderTotal
Description copied from class:ColumnRenders 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:
renderTotalin classColumn- Parameters:
renderer- the TableCellRenderer to use- See Also:
-