private void renderRow(XhtmlNode table, Row r, int indent, List<Integer> indents, String imagePath, int border, Set<String> outputTracker) throws IOException { XhtmlNode tr = table.addTag("tr"); String color = "white"; if (r.getColor() != null) color = r.getColor(); tr.setAttribute("style", "border: " + border + "px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: "+color+";"); boolean first = true; for (Cell t : r.getCells()) { renderCell(tr, t, "td", first ? r.getIcon() : null, first ? r.getHint() : null, first ? indents : null, !r.getSubRows().isEmpty(), first ? r.getAnchor() : null, color, r.getLineColor(), imagePath, border, outputTracker); first = false; } table.addText("\r\n"); for (int i = 0; i < r.getSubRows().size(); i++) { Row c = r.getSubRows().get(i); List<Integer> ind = new ArrayList<Integer>(); ind.addAll(indents); if (i == r.getSubRows().size() - 1) { ind.add(r.getLineColor()*2); } else { ind.add(r.getLineColor()*2+1); } renderRow(table, c, indent+1, ind, imagePath, border, outputTracker); } }
XhtmlNode tc = null; for (Title t : model.getTitles()) { tc = renderCell(tr, t, "th", null, null, null, false, null, "white", 0, imagePath, border, outputTracker); if (t.width != 0) tc.setAttribute("style", "width: "+Integer.toString(t.width)+"px");
private void renderRow(XhtmlNode table, Row r, int indent, List<Integer> indents, String imagePath, int border, Set<String> outputTracker) throws IOException { XhtmlNode tr = table.addTag("tr"); String color = "white"; if (r.getColor() != null) color = r.getColor(); tr.setAttribute("style", "border: " + border + "px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: "+color+";"); boolean first = true; for (Cell t : r.getCells()) { renderCell(tr, t, "td", first ? r.getIcon() : null, first ? r.getHint() : null, first ? indents : null, !r.getSubRows().isEmpty(), first ? r.getAnchor() : null, color, r.getLineColor(), imagePath, border, outputTracker); first = false; } table.addText("\r\n"); for (int i = 0; i < r.getSubRows().size(); i++) { Row c = r.getSubRows().get(i); List<Integer> ind = new ArrayList<Integer>(); ind.addAll(indents); if (i == r.getSubRows().size() - 1) { ind.add(r.getLineColor()*2); } else { ind.add(r.getLineColor()*2+1); } renderRow(table, c, indent+1, ind, imagePath, border, outputTracker); } }
XhtmlNode tc = null; for (Title t : model.getTitles()) { tc = renderCell(tr, t, "th", null, null, null, false, null, "white", 0, imagePath, border, outputTracker); if (t.width != 0) tc.setAttribute("style", "width: "+Integer.toString(t.width)+"px");