protected boolean startTableCellBox(final TableCellRenderBox box) { if (currentTable == null) { return false; } if (currentTable.getSectionRenderBox() == null) { return false; } final int rowSpan = box.getRowSpan(); final int colSpan = box.getColSpan(); final int startPos = currentTable.increaseCellPosition(colSpan, rowSpan); while (currentTable.columnModel.getColumnCount() <= startPos) { currentTable.columnModel.addAutoColumn(); } box.setColumnIndex(startPos); box.setBodySection(currentTable.isBodySection()); final BoxDefinition boxDefinition = box.getBoxDefinition(); final long preferredHeight = boxDefinition.getPreferredHeight().resolve(0); final long minHeight = boxDefinition.getMinimumHeight().resolve(0); final long maxHeight = boxDefinition.getMaximumHeight().resolve(0, MAX_AUTO); final long preferredSize = ProcessUtility.computeLength(minHeight, maxHeight, preferredHeight); currentTable.updateDefinedSize(rowSpan, preferredSize); return true; }
protected boolean startTableRowBox(final TableRowRenderBox box) { if (currentTable == null) { return false; } if (currentTable.getSectionRenderBox() == null) { return false; } currentTable.resetCellPosition(); box.setBodySection(currentTable.isBodySection()); // check if this is the first row ... if (currentTable.rowCount == -1) { if (box.getRowIndex() != -1) { currentTable.rowCount = box.getRowIndex(); return true; } } currentTable.rowCount += 1; box.setRowIndex(currentTable.rowCount); if (currentTable.rowCount <= currentTable.rowModel.getRowCount()) { currentTable.rowModel.addRow(); } return true; }