Package org.jacoco.report.internal.html

Examples of org.jacoco.report.internal.html.HTMLElement


    void init(final HTMLElement tr, final List<? extends ITableItem> items,
        final ICoverageNode total) throws IOException {
      visible = renderer.init(items, total);
      if (visible) {
        index.init(items);
        final HTMLElement td = tr.td(headerStyle);
        td.attr("id", String.valueOf(idprefix));
        td.attr("onclick", "toggleSort(this)");
        td.text(header);
      }
    }
View Full Code Here


    void body(final HTMLElement tr, final int idx, final ITableItem item,
        final Resources resources, final ReportOutputFolder base)
        throws IOException {
      if (visible) {
        final HTMLElement td = tr.td(style);
        td.attr("id", idprefix + String.valueOf(index.getPosition(idx)));
        renderer.item(td, item, resources, base);
      }
    }
View Full Code Here

   * @throws IOException
   *             problems while reading the source file or writing the output
   */
  public void render(final HTMLElement parent, final ISourceNode source,
      final Reader contents) throws IOException {
    final HTMLElement pre = parent.pre(Styles.SOURCE + " lang-" + lang
        + " linenums");
    final BufferedReader lineBuffer = new BufferedReader(contents);
    String line;
    int nr = 0;
    while ((line = lineBuffer.readLine()) != null) {
View Full Code Here

  }

  private HTMLElement span(final HTMLElement parent, final String id,
      final String style1, final String style2, final String title,
      final ICounter branches) throws IOException {
    final HTMLElement span = parent.span(style1 + " " + style2, id);
    final Integer missed = Integer.valueOf(branches.getMissedCount());
    final Integer total = Integer.valueOf(branches.getTotalCount());
    span.attr("title", String.format(locale, title, missed, total));
    return span;
  }
View Full Code Here

  public void render(final HTMLElement parent,
      final List<? extends ITableItem> items, final ICoverageNode total,
      final Resources resources, final ReportOutputFolder base)
      throws IOException {
    final List<? extends ITableItem> sortedItems = sort(items);
    final HTMLElement table = parent.table(Styles.COVERAGETABLE);
    table.attr("id", "coveragetable");
    header(table, sortedItems, total);
    footer(table, total, resources, base);
    body(table, sortedItems, resources, base);
  }
View Full Code Here

  }

  private void header(final HTMLElement table,
      final List<? extends ITableItem> items, final ICoverageNode total)
      throws IOException {
    final HTMLElement tr = table.thead().tr();
    for (final Column c : columns) {
      c.init(tr, items, total);
    }
  }
View Full Code Here

  }

  private void footer(final HTMLElement table, final ICoverageNode total,
      final Resources resources, final ReportOutputFolder base)
      throws IOException {
    final HTMLElement tr = table.tfoot().tr();
    for (final Column c : columns) {
      c.footer(tr, total, resources, base);
    }
  }
View Full Code Here

  }

  private void body(final HTMLElement table,
      final List<? extends ITableItem> items, final Resources resources,
      final ReportOutputFolder base) throws IOException {
    final HTMLElement tbody = table.tbody();
    int idx = 0;
    for (final ITableItem item : items) {
      final HTMLElement tr = tbody.tr();
      for (final Column c : columns) {
        c.body(tr, idx, item, resources, base);
      }
      idx++;
    }
View Full Code Here

    void init(final HTMLElement tr, final List<? extends ITableItem> items,
        final ICoverageNode total) throws IOException {
      visible = renderer.init(items, total);
      if (visible) {
        index.init(items);
        final HTMLElement td = tr.td(headerStyle);
        td.attr("id", String.valueOf(idprefix));
        td.attr("onclick", "toggleSort(this)");
        td.text(header);
      }
    }
View Full Code Here

    void body(final HTMLElement tr, final int idx, final ITableItem item,
        final Resources resources, final ReportOutputFolder base)
        throws IOException {
      if (visible) {
        final HTMLElement td = tr.td(style);
        td.attr("id", idprefix + String.valueOf(index.getPosition(idx)));
        renderer.item(td, item, resources, base);
      }
    }
View Full Code Here

TOP

Related Classes of org.jacoco.report.internal.html.HTMLElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.