Class Table
java.lang.Object
org.jacoco.report.internal.html.table.Table
Renderer for a table of
ITableItem
s.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(String header, String style, IColumnRenderer renderer, boolean defaultSorting) Adds a new column with the given properties to the table.private void
body
(HTMLElement table, List<? extends ITableItem> items, Resources resources, ReportOutputFolder base) private void
footer
(HTMLElement table, ICoverageNode total, Resources resources, ReportOutputFolder base) private void
header
(HTMLElement table, List<? extends ITableItem> items, ICoverageNode total) void
render
(HTMLElement parent, List<? extends ITableItem> items, ICoverageNode total, Resources resources, ReportOutputFolder base) Renders a table for the given iconprivate List<? extends ITableItem>
sort
(List<? extends ITableItem> items)
-
Field Details
-
columns
-
defaultComparator
-
-
Constructor Details
-
Table
public Table()Create a new table without any columns yet.
-
-
Method Details
-
add
Adds a new column with the given properties to the table.- Parameters:
header
- column header captionstyle
- optional CSS style class name for the td-Elements of this columnrenderer
- callback for column renderingdefaultSorting
- Iftrue
, 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 createditems
- items that will make the table rowstotal
- the summary of all coverage data items in the table static resources that might be referencedresources
- static resources that might be referencedbase
- base folder of the table- Throws:
IOException
- in case of IO problems with the element output
-
header
private void header(HTMLElement table, List<? extends ITableItem> items, ICoverageNode total) throws IOException - Throws:
IOException
-
body
private void body(HTMLElement table, List<? extends ITableItem> items, Resources resources, ReportOutputFolder base) throws IOException - Throws:
IOException
-
sort
-