Esempio n. 1
0
 /**
  * Returns the break class for this row. This is a combination of break-after set on the last
  * children of any cells ending on this row.
  *
  * <p><strong>Note:</strong> this method doesn't take into account break-after set on the
  * enclosing fo:table-row element, if any, as it must be ignored if the row belongs to a group of
  * spanned rows (see XSL-FO 1.1, 7.20.1).
  *
  * <p><strong>Note:</strong> this works only after getNextKuthElements on the corresponding
  * TableCellLM have been called!
  *
  * @return one of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN}, {@link
  *     Constants#EN_PAGE}, {@link Constants#EN_EVEN_PAGE}, {@link Constants#EN_ODD_PAGE}
  */
 public int getBreakAfter() {
   int breakAfter = Constants.EN_AUTO;
   for (Iterator iter = gridUnits.iterator(); iter.hasNext(); ) {
     GridUnit gu = (GridUnit) iter.next();
     if (!gu.isEmpty() && gu.getColSpanIndex() == 0 && gu.isLastGridUnitRowSpan()) {
       breakAfter = BreakUtil.compareBreakClasses(breakAfter, gu.getPrimary().getBreakAfter());
     }
   }
   return breakAfter;
 }
Esempio n. 2
0
 /**
  * Returns the strength of the keep constraint if the enclosing (if any) fo:table-row element of
  * this row, or if any of the cells ending on this row, have keep-with-next set.
  *
  * @return the strength of the keep-with-next constraint
  */
 public Keep getKeepWithNext() {
   Keep keep = Keep.KEEP_AUTO;
   TableRow row = getTableRow();
   if (row != null) {
     keep = Keep.getKeep(row.getKeepWithNext());
   }
   for (Iterator iter = gridUnits.iterator(); iter.hasNext(); ) {
     GridUnit gu = (GridUnit) iter.next();
     if (!gu.isEmpty() && gu.getColSpanIndex() == 0 && gu.isLastGridUnitRowSpan()) {
       keep = keep.compare(gu.getPrimary().getKeepWithNext());
     }
   }
   return keep;
 }