Package net.sf.statcvs.renderer
Class XMLRenderer
java.lang.Object
net.sf.statcvs.renderer.XMLRenderer
- All Implemented Interfaces:
TableCellRenderer
Helper class for rendering different types of table cells and table heads
to XML
- Version:
- $Id: XMLRenderer.java,v 1.3 2008/04/02 11:22:15 benoitx Exp $
- Author:
- Nilendra Weerasinghe <nilendraw@gmail.com>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the results of the last renderCell callReturn the results of the last renderCell call as a row headReturn the results of the last renderCell call as an ordinary table cellvoidrenderAuthorCell(Author author) Render a cell containing an author to XMLvoidrenderAuthorIdCell(Author author) Render a cell containing an author IdvoidrenderCell(String content) Render a generic table cell to XMLvoidrenderDirectoryCell(Directory directory) Render a cell containing a directory to XMLvoidRender an empty cell to XMLvoidrenderFileCell(VersionedFile file, boolean withIcon, WebRepositoryIntegration webRepository) Render a cell containing a file to XMLvoidrenderIntegerCell(int value) Render an integer cell to XMLvoidrenderIntegerCell(int value, int total) Render an integer cell to XML, showing both the integer value and a percentage of a totalvoidrenderLinkCell(String url, String label) Render a cell containing a repository tag.voidrenderPercentageCell(double ratio) Render a percentage cell to XMLvoidsetOutput(MarkupSyntax output)
-
Constructor Details
-
XMLRenderer
public XMLRenderer()
-
-
Method Details
-
renderCell
Render a generic table cell to XML- Specified by:
renderCellin interfaceTableCellRenderer- Parameters:
content- the cell's content
-
renderEmptyCell
public void renderEmptyCell()Render an empty cell to XML- Specified by:
renderEmptyCellin interfaceTableCellRenderer
-
renderIntegerCell
public void renderIntegerCell(int value) Render an integer cell to XML- Specified by:
renderIntegerCellin interfaceTableCellRenderer- Parameters:
value- the cell's content
-
renderIntegerCell
public void renderIntegerCell(int value, int total) Render an integer cell to XML, showing both the integer value and a percentage of a total- Specified by:
renderIntegerCellin interfaceTableCellRenderer- Parameters:
value- the cell's contenttotal- the total, worth 100%
-
renderPercentageCell
public void renderPercentageCell(double ratio) Render a percentage cell to XML- Specified by:
renderPercentageCellin interfaceTableCellRenderer- Parameters:
ratio- the cell's content
-
renderAuthorCell
Render a cell containing an author to XML- Specified by:
renderAuthorCellin interfaceTableCellRenderer- Parameters:
author- the author
-
renderDirectoryCell
Render a cell containing a directory to XML- Specified by:
renderDirectoryCellin interfaceTableCellRenderer- Parameters:
directory- the directory
-
renderFileCell
public void renderFileCell(VersionedFile file, boolean withIcon, WebRepositoryIntegration webRepository) Render a cell containing a file to XML- Specified by:
renderFileCellin interfaceTableCellRenderer- Parameters:
file- the filewithIcon- display an icon in front of the filename?webRepository- for creating links; might be null
-
renderLinkCell
Render a cell containing a repository tag.- Specified by:
renderLinkCellin interfaceTableCellRenderer
-
getColumnHead
Return the results of the last renderCell call- Returns:
- XML
-
getRowHead
Return the results of the last renderCell call as a row head- Returns:
- XML
-
getTableCell
Return the results of the last renderCell call as an ordinary table cell- Returns:
- XML
-
getOutput
- Returns:
- the output
-
setOutput
- Parameters:
output- the output to set
-
getOddRowFormat
-
getEvenRowFormat
-
renderAuthorIdCell
Description copied from interface:TableCellRendererRender a cell containing an author Id- Specified by:
renderAuthorIdCellin interfaceTableCellRenderer- Parameters:
author- the author
-