/** * Constructs a copy of a <CODE>PdfPTable</CODE>. * * @param table the <CODE>PdfPTable</CODE> to be copied */ public PdfPTable(PdfPTable table) { copyFormat(table); for (int k = 0; k < currentRow.length; ++k) { if (table.currentRow[k] == null) break; currentRow[k] = new PdfPCell(table.currentRow[k]); } for (int k = 0; k < table.rows.size(); ++k) { PdfPRow row = (PdfPRow)(table.rows.get(k)); if (row != null) row = new PdfPRow(row); rows.add(row); } }
/** * Constructs a copy of a <CODE>PdfPTable</CODE>. * * @param table the <CODE>PdfPTable</CODE> to be copied */ public PdfPTable(PdfPTable table) { copyFormat(table); for (int k = 0; k < currentRow.length; ++k) { if (table.currentRow[k] == null) break; currentRow[k] = new PdfPCell(table.currentRow[k]); } for (int k = 0; k < table.rows.size(); ++k) { PdfPRow row = (PdfPRow)(table.rows.get(k)); if (row != null) row = new PdfPRow(row); rows.add(row); } }
/** * Constructs a copy of a <CODE>PdfPTable</CODE>. * * @param table the <CODE>PdfPTable</CODE> to be copied */ public PdfPTable(PdfPTable table) { copyFormat(table); for (int k = 0; k < currentRow.length; ++k) { if (table.currentRow[k] == null) break; currentRow[k] = new PdfPCell(table.currentRow[k]); } for (int k = 0; k < table.rows.size(); ++k) { PdfPRow row = (PdfPRow)(table.rows.get(k)); if (row != null) row = new PdfPRow(row); rows.add(row); } }
/** * Calculates the extra height needed in a row because of rowspans. * @param start the index of the start row (the one to adjust) * @param end the index of the end row on the page * @since 2.1.6 */ protected PdfPRow adjustCellsInRow(int start, int end) { PdfPRow row = new PdfPRow(getRow(start)); row.initExtraHeights(); PdfPCell cell; PdfPCell[] cells = row.getCells(); for (int i = 0; i < cells.length; i++) { cell = cells[i]; if (cell == null || cell.getRowspan() == 1) continue; int stop = Math.min(end, start + cell.getRowspan()); float extra = 0; for (int k = start + 1; k < stop; k++) { extra += getRowHeight(k); } row.setExtraHeight(i, extra); } return row; }
/** * Calculates the extra height needed in a row because of rowspans. * @param start the index of the start row (the one to adjust) * @param end the index of the end row on the page * @since 2.1.6 */ protected PdfPRow adjustCellsInRow(int start, int end) { PdfPRow row = new PdfPRow(getRow(start)); row.initExtraHeights(); PdfPCell cell; PdfPCell[] cells = row.getCells(); for (int i = 0; i < cells.length; i++) { cell = cells[i]; if (cell == null || cell.getRowspan() == 1) continue; int stop = Math.min(end, start + cell.getRowspan()); float extra = 0; for (int k = start + 1; k < stop; k++) { extra += getRowHeight(k); } row.setExtraHeight(i, extra); } return row; }
/** * Calculates the extra height needed in a row because of rowspans. * @param start the index of the start row (the one to adjust) * @param end the index of the end row on the page * @since 2.1.6 */ protected PdfPRow adjustCellsInRow(int start, int end) { PdfPRow row = new PdfPRow(getRow(start)); row.initExtraHeights(); PdfPCell cell; PdfPCell[] cells = row.getCells(); for (int i = 0; i < cells.length; i++) { cell = cells[i]; if (cell == null || cell.getRowspan() == 1) continue; int stop = Math.min(end, start + cell.getRowspan()); float extra = 0; for (int k = start + 1; k < stop; k++) { extra += getRowHeight(k); } row.setExtraHeight(i, extra); } return row; }
PdfPRow row = new PdfPRow(currentRow); if (totalWidth > 0) { row.setWidths(absoluteWidths);
PdfPRow row = new PdfPRow(currentRow); if (totalWidth > 0) { row.setWidths(absoluteWidths);
PdfPRow row = new PdfPRow(currentRow); if (totalWidth > 0) { row.setWidths(absoluteWidths);
PdfPRow split = new PdfPRow(newCells); split.widths = widths.clone(); split.calculateHeights();
PdfPRow split = new PdfPRow(newCells); split.widths = (float[]) widths.clone(); split.calculateHeights();
PdfPRow split = new PdfPRow(newCells); split.widths = (float[]) widths.clone(); split.calculateHeights();