if (breakStatus != Status.OK) {
return breakStatus;
}
}
final AbstractTablePartContainer container =
(AbstractTablePartContainer) areaNode;
final TableRowContainer rowContainer = container.makeTableRowContainer(
this.node, graftingPoint);
final AbstractTablePartPL tablePartPL = (AbstractTablePartPL)
this.getLayout().getLayoutProxy(this.node.getParent());
final RowSpanMgr rowSpanMgr = tablePartPL.getRowSpanMgr();
/* Flag indicating whether any cell didn't fit in available space. */
boolean someCellDidNotLayoutCompletely = false;
/* Loop through all cells in the row.
* If it takes multiple calls to completely layout the row, we need to
* process all of the children cells not just those from the progress
* indicator so that an area is created for each cell on the new page
* and borders are drawn properly. */
for (int i = 0; i < this.node.getChildCount(); i++) {
final TableCell cell = (TableCell) this.node.getChildAt(i);
TableCellPL cellPL;
cellPL = (TableCellPL) this.getLayoutProxy(cell);
final int rowSpan = cell.traitNumberRowsSpanned();
final Status status = cellPL.layout(rowContainer, graftingPoint);
if (status.isIncomplete()) {
if ((this.node.traitKeepTogetherWithinColumn(areaNode)
== Integer.MAX_VALUE
&& this.ignoreKeepTogether == false)
|| (status == Status.AREA_FULL_NONE)
|| rowSpan > 1) {
/* This entire row needs to be pushed to the next
* column/page unless it is at the top of the column
* area. */
// Remove spanning cells from RowSpanMgr?
resetProgress();
/* Remove the partially-laid out row area. */
container.removeChild(rowContainer);
return Status.AREA_FULL_NONE;
} else if (status == Status.AREA_FULL_SOME) {
/* Row is not keep-together, cell isn't spanning, and part
* of it fits. We can break the cell and the row. */
someCellDidNotLayoutCompletely = true;