示例#1
0
文件: EffRow.java 项目: JuliaIva/hq
 /**
  * Returns the break class for this row. This is a combination of break-before set on the first
  * children of any cells starting on this row.
  *
  * <p><strong>Note:</strong> this method doesn't take into account break-before 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.2).
  *
  * <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 getBreakBefore() {
   int breakBefore = Constants.EN_AUTO;
   for (Iterator iter = gridUnits.iterator(); iter.hasNext(); ) {
     GridUnit gu = (GridUnit) iter.next();
     if (gu.isPrimary()) {
       breakBefore = BreakUtil.compareBreakClasses(breakBefore, gu.getPrimary().getBreakBefore());
     }
   }
   return breakBefore;
 }
示例#2
0
文件: EffRow.java 项目: JuliaIva/hq
 /**
  * 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 starting on this row, have keep-with-previous set.
  *
  * @return the strength of the keep-with-previous constraint
  */
 public Keep getKeepWithPrevious() {
   Keep keep = Keep.KEEP_AUTO;
   TableRow row = getTableRow();
   if (row != null) {
     keep = Keep.getKeep(row.getKeepWithPrevious());
   }
   for (Iterator iter = gridUnits.iterator(); iter.hasNext(); ) {
     GridUnit gu = (GridUnit) iter.next();
     if (gu.isPrimary()) {
       keep = keep.compare(gu.getPrimary().getKeepWithPrevious());
     }
   }
   return keep;
 }