org.jacoco.report.html.table
Class Table

java.lang.Object
  extended by org.jacoco.report.html.table.Table

public class Table
extends Object

Renderer for a table of ITableItems.

Version:
0.4.1.20101007204400
Author:
Marc R. Hoffmann

Constructor Summary
Table()
          Create a new table without any columns yet.
 
Method Summary
 void add(String header, String style, IColumnRenderer renderer, boolean defaultSorting)
          Adds a new column with the given properties to the table.
 void render(HTMLElement parent, List<? extends ITableItem> items, ICoverageNode total, Resources resources, ReportOutputFolder base)
          Renders a table for the given icon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Table

public Table()
Create a new table without any columns yet.

Method Detail

add

public void add(String header,
                String style,
                IColumnRenderer renderer,
                boolean defaultSorting)
Adds a new column with the given properties to the table.

Parameters:
header - column header caption
style - optional CSS style class name for the td-Elements of this column
renderer - callback for column rendering
defaultSorting - If true, this column is the default sorting column. Only one column can be selected for default sorting.

render

public void render(HTMLElement parent,
                   List<? extends ITableItem> items,
                   ICoverageNode total,
                   Resources resources,
                   ReportOutputFolder base)
            throws IOException
Renders a table for the given icon

Parameters:
parent - parent element in which the table is created
items - items that will make the table rows
total - the summary of all coverage data items in the table static resources that might be referenced
resources - static resources that might be referenced
base - base folder of the table
Throws:
IOException - in case of IO problems with the element output