/** * Constructs a new PdfPRow with the cells in the array that was passed * as a parameter. * * @param cells */ public PdfPRow(PdfPCell[] cells) { this.cells = cells; widths = new float[cells.length]; initExtraHeights(); }
/** * Constructs a new PdfPRow with the cells in the array that was passed * as a parameter. * * @param cells */ public PdfPRow(PdfPCell cells[]) { this.cells = cells; widths = new float[cells.length]; initExtraHeights(); }
/** * Constructs a new PdfPRow with the cells in the array that was passed * as a parameter. * * @param cells */ public PdfPRow(PdfPCell cells[]) { this.cells = cells; widths = new float[cells.length]; initExtraHeights(); }
/** * Makes a copy of an existing row. * * @param row */ public PdfPRow(PdfPRow row) { maxHeight = row.maxHeight; calculated = row.calculated; cells = new PdfPCell[row.cells.length]; for (int k = 0; k < cells.length; ++k) { if (row.cells[k] != null) cells[k] = new PdfPCell(row.cells[k]); } widths = new float[cells.length]; System.arraycopy(row.widths, 0, widths, 0, cells.length); initExtraHeights(); }
/** * Makes a copy of an existing row. * * @param row */ public PdfPRow(PdfPRow row) { maxHeight = row.maxHeight; calculated = row.calculated; cells = new PdfPCell[row.cells.length]; for (int k = 0; k < cells.length; ++k) { if (row.cells[k] != null) cells[k] = new PdfPCell(row.cells[k]); } widths = new float[cells.length]; System.arraycopy(row.widths, 0, widths, 0, cells.length); initExtraHeights(); }
/** * Makes a copy of an existing row. * * @param row */ public PdfPRow(PdfPRow row) { maxHeight = row.maxHeight; calculated = row.calculated; cells = new PdfPCell[row.cells.length]; for (int k = 0; k < cells.length; ++k) { if (row.cells[k] != null) cells[k] = new PdfPCell(row.cells[k]); } widths = new float[cells.length]; System.arraycopy(row.widths, 0, widths, 0, cells.length); initExtraHeights(); }
/** * 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; }