Package net.sf.statcvs.renderer
Class HTMLTableCellRenderer
- java.lang.Object
-
- net.sf.statcvs.renderer.HTMLTableCellRenderer
-
- All Implemented Interfaces:
TableCellRenderer
public class HTMLTableCellRenderer extends java.lang.Object implements TableCellRenderer
Helper class for rendering different types of table cells and table heads to HTML- Version:
- $Id: HTMLTableCellRenderer.java,v 1.10 2008/04/02 11:22:15 benoitx Exp $
- Author:
- Richard Cyganiak
-
-
Constructor Summary
Constructors Constructor Description HTMLTableCellRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getColumnHead()
Return the results of the last renderCell calljava.lang.String
getEvenRowFormat()
java.lang.String
getOddRowFormat()
MarkupSyntax
getOutput()
java.lang.String
getRowHead()
Return the results of the last renderCell call as a row headjava.lang.String
getTableCell()
Return the results of the last renderCell call as an ordinary table cellvoid
renderAuthorCell(Author author)
Render a cell containing an author to HTMLvoid
renderAuthorIdCell(Author author)
Render a cell containing an author Id to HTMLvoid
renderCell(java.lang.String content)
Render a generic table cell to HTMLvoid
renderDirectoryCell(Directory directory)
Render a cell containing a directory to HTMLvoid
renderEmptyCell()
Render an empty cell to HTMLvoid
renderFileCell(VersionedFile file, boolean withIcon, WebRepositoryIntegration webRepository)
Render a cell containing a file to HTMLvoid
renderIntegerCell(int value)
Render an integer cell to HTMLvoid
renderIntegerCell(int value, int total)
Render an integer cell to HTML, showing both the integer value and a percentage of a totalvoid
renderLinkCell(java.lang.String url, java.lang.String label)
Render a cell containing a repository tag.void
renderPercentageCell(double ratio)
Render a percentage cell to HTMLvoid
setOutput(MarkupSyntax output)
-
-
-
Method Detail
-
renderCell
public void renderCell(java.lang.String content)
Render a generic table cell to HTML- Specified by:
renderCell
in interfaceTableCellRenderer
- Parameters:
content
- the cell's content
-
renderEmptyCell
public void renderEmptyCell()
Render an empty cell to HTML- Specified by:
renderEmptyCell
in interfaceTableCellRenderer
-
renderIntegerCell
public void renderIntegerCell(int value)
Render an integer cell to HTML- Specified by:
renderIntegerCell
in interfaceTableCellRenderer
- Parameters:
value
- the cell's content
-
renderIntegerCell
public void renderIntegerCell(int value, int total)
Render an integer cell to HTML, showing both the integer value and a percentage of a total- Specified by:
renderIntegerCell
in interfaceTableCellRenderer
- Parameters:
value
- the cell's contenttotal
- the total, worth 100%
-
renderPercentageCell
public void renderPercentageCell(double ratio)
Render a percentage cell to HTML- Specified by:
renderPercentageCell
in interfaceTableCellRenderer
- Parameters:
ratio
- the cell's content
-
renderAuthorCell
public void renderAuthorCell(Author author)
Render a cell containing an author to HTML- Specified by:
renderAuthorCell
in interfaceTableCellRenderer
- Parameters:
author
- the author
-
renderAuthorIdCell
public void renderAuthorIdCell(Author author)
Render a cell containing an author Id to HTML- Specified by:
renderAuthorIdCell
in interfaceTableCellRenderer
- Parameters:
author
- the author
-
renderDirectoryCell
public void renderDirectoryCell(Directory directory)
Render a cell containing a directory to HTML- Specified by:
renderDirectoryCell
in interfaceTableCellRenderer
- Parameters:
directory
- the directory
-
renderFileCell
public void renderFileCell(VersionedFile file, boolean withIcon, WebRepositoryIntegration webRepository)
Render a cell containing a file to HTML- Specified by:
renderFileCell
in interfaceTableCellRenderer
- Parameters:
file
- the filewithIcon
- display an icon in front of the filename?webRepository
- for creating links; might be null
-
renderLinkCell
public void renderLinkCell(java.lang.String url, java.lang.String label)
Render a cell containing a repository tag.- Specified by:
renderLinkCell
in interfaceTableCellRenderer
-
getColumnHead
public java.lang.String getColumnHead()
Return the results of the last renderCell call- Returns:
- HTML
-
getRowHead
public java.lang.String getRowHead()
Return the results of the last renderCell call as a row head- Returns:
- HTML
-
getTableCell
public java.lang.String getTableCell()
Return the results of the last renderCell call as an ordinary table cell- Returns:
- HTML
-
getOutput
public MarkupSyntax getOutput()
- Returns:
- the output
-
setOutput
public void setOutput(MarkupSyntax output)
- Parameters:
output
- the output to set
-
getOddRowFormat
public java.lang.String getOddRowFormat()
-
getEvenRowFormat
public java.lang.String getEvenRowFormat()
-
-