protected boolean startTableSectionBox(final TableSectionRenderBox box) {
    if (currentTable == null) {
      return false;
    }
    if (currentTable.getSectionRenderBox() != null) {
      return true;
    }

    currentTable.setSectionRenderBox(box);
    box.getRowModel().initialize(currentTable.getTable());
    return true;
  }
 public void setSectionRenderBox(final TableSectionRenderBox sectionRenderBox) {
   this.rowSpans.clear();
   this.sectionRenderBox = sectionRenderBox;
   if (this.sectionRenderBox != null) {
     this.rowModel = sectionRenderBox.getRowModel();
     this.bodySection = (sectionRenderBox.getDisplayRole() == TableSectionRenderBox.Role.BODY);
   } else {
     this.rowModel = null;
     this.bodySection = false;
   }
   this.rowCount = -1;
 }
  protected void finishTableSectionBox(final TableSectionRenderBox box) {
    if (currentTable == null) {
      return;
    }
    if (currentTable.getSectionRenderBox() != box) {
      return;
    }

    final IntList rowSpans = currentTable.rowSpans;
    int missingRows = 0;
    for (int i = 0; i < rowSpans.size(); i++) {
      final int value = rowSpans.get(i);
      if (missingRows < value) {
        missingRows = value;
      }
    }

    for (int i = 0; i < missingRows; i += 1) {
      currentTable.rowModel.addRow();
    }

    box.getRowModel().validateSizes(box);
    currentTable.setSectionRenderBox(null);
  }