}
private void addFileStatsRows(final TestRunCoverageStatistics runStats, final PdfPTable table) {
final List<ScriptCoverageStatistics> allFileStats = runStats.getFileStats();
for (int i = 0; i < allFileStats.size(); i++) {
final ScriptCoverageStatistics scriptCoverageStatistics = allFileStats.get(i);
final boolean hasStatements = scriptCoverageStatistics.getHasStatements();
final Phrase fileName = new Phrase();
if (scriptCoverageStatistics.getParentName() != null) {
fileName.add(new Chunk(scriptCoverageStatistics.getParentName() + "/", hasStatements ? FONT_TD : FONT_TD_EMPTY_FILE));
fileName.add(new Chunk(scriptCoverageStatistics.getFileName(), hasStatements ? FONT_TD_BOLD : FONT_TD_BOLD_EMPTY_FILE));
} else {
fileName.add(new Chunk(scriptCoverageStatistics.getFileName(), hasStatements ? FONT_TD : FONT_TD_EMPTY_FILE));
}
final BaseColor bgColor = (i % 2 == 1) ? COLOR_ROW_ODD : COLOR_ROW_EVEN;
final Font font = FONT_TD;
table.addCell(createCell(fileName, 0, bgColor));
table.addCell(createCell(String.valueOf(scriptCoverageStatistics.getStatements()), font, 1, bgColor));
table.addCell(createCell(String.valueOf(scriptCoverageStatistics.getExecuted()), font, 2, bgColor));
table.addCell(createCell(scriptCoverageStatistics.getCoverage() + "%", FONT_TD, 3, bgColor));
}
}