private int getAdditionalRowsHeight() {
    var additionalRowsCount = getEffectiveAdditionalRowsCount();
    if (additionalRowsCount == 0) {
      return 0;
    }
    var rowHeight = getDefaultRowHeight();
    if (rowHeight == 0) {
      return 0;
    }
    var extraHeight = rowHeight * additionalRowsCount;
    var viewport = ComponentUtil.getViewport(this);
    var viewportHeight = viewport == null ? 0 : viewport.getHeight();
    var maximumSensibleExtraHeight = viewportHeight - rowHeight;
    if (maximumSensibleExtraHeight < 0) {
      maximumSensibleExtraHeight = 0;
    }
    return Math.min(extraHeight, maximumSensibleExtraHeight);
  }
private int getAdditionalRowsHeight()