org.jacoco.report.html
Class BarColumn

java.lang.Object
  extended by org.jacoco.report.html.BarColumn
All Implemented Interfaces:
ICoverageTableColumn

public class BarColumn
extends Object
implements ICoverageTableColumn

Column with a graphical bar that represents the total amount of items in with length, and the coverage ratio with a red/green sections. The implementation is stateful, instances must not be used in parallel.

Version:
$Revision: $
Author:
Marc R. Hoffmann

Constructor Summary
BarColumn(String header, ICoverageNode.CounterEntity entity)
          Creates a new column that is based on the ICounter for the given entity.
 
Method Summary
 void footer(HTMLElement tr, ICoverageNode total, Resources resources, ReportOutputFolder base)
          Renders the footer for this column.
 void header(HTMLElement tr, Resources resources, ReportOutputFolder base)
          Renders the header for this column.
 void init(List<ICoverageTableItem> items, ICoverageNode total)
          Initializes the column before any output method is called.
 void item(HTMLElement tr, ICoverageTableItem item, Resources resources, ReportOutputFolder base)
          Renders a single item in this column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BarColumn

public BarColumn(String header,
                 ICoverageNode.CounterEntity entity)
Creates a new column that is based on the ICounter for the given entity.

Parameters:
header - column header caption
entity - counter entity for visualization
Method Detail

init

public void init(List<ICoverageTableItem> items,
                 ICoverageNode total)
Description copied from interface: ICoverageTableColumn
Initializes the column before any output method is called.

Specified by:
init in interface ICoverageTableColumn
Parameters:
items - all items that will be displayed in the table
total - the summary of all coverage data items in the table

header

public void header(HTMLElement tr,
                   Resources resources,
                   ReportOutputFolder base)
            throws IOException
Description copied from interface: ICoverageTableColumn
Renders the header for this column.

Specified by:
header in interface ICoverageTableColumn
Parameters:
tr - the parent table row
resources - static resources that might be referenced
base - base folder of the table
Throws:
IOException - in case of IO problems with the element output

footer

public void footer(HTMLElement tr,
                   ICoverageNode total,
                   Resources resources,
                   ReportOutputFolder base)
            throws IOException
Description copied from interface: ICoverageTableColumn
Renders the footer for this column.

Specified by:
footer in interface ICoverageTableColumn
Parameters:
tr - the parent table row
total - the summary of all coverage data items in the table
resources - static resources that might be referenced
base - base folder of the table
Throws:
IOException - in case of IO problems with the element output

item

public void item(HTMLElement tr,
                 ICoverageTableItem item,
                 Resources resources,
                 ReportOutputFolder base)
          throws IOException
Description copied from interface: ICoverageTableColumn
Renders a single item in this column.

Specified by:
item in interface ICoverageTableColumn
Parameters:
tr - the parent table row
item - the item to display
resources - static resources that might be referenced
base - base folder of the table
Throws:
IOException - in case of IO problems with the element output