+++ /dev/null
-/*
- * $Id$
- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
- * For details on use and redistribution please refer to the
- * LICENSE file included with these sources.
- *
- * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
- */
-
-package org.apache.fop.fo.pagination;
-
-// FOP
-import org.apache.fop.fo.pagination.FoSimplePageMaster;
-
-/**
- * Encodes a condition set from an FoConditionalPageReferenceMaster.
- */
-public class PageCondition {
-
- private static final String tag = "$Name$";
- private static final String revision = "$Revision$";
-
- /** The simple page master used when these conditions are true. */
- public final FoSimplePageMaster master;
- /** The blank-or-not-blank condition.
- Encoded from Properties.BlankOrNotBlank. */
- public final int blankOrNot;
- /** The odd-or-even condition. Encoded from Properties.OddOrEven. */
- public final int oddOrEven;
- /** The page-position condition. Encoded from Properties.pagePosition. */
- public final int pagePosition;
-
- /**
- * @param master - a reference to an <i>fo:simple-page-master</i>.
- * @param blankOrNot - an <tt>int</tt> encoding a
- * <i>blank-or-not-blank</i> condition.
- * @param oddOrEven - an <tt>int</tt> encoding an <i>odd-or-even</i>
- * condition.
- * @param pagePosition - an <tt>int</tt> encoding a <i>page-position</i>
- * condition.
- */
- public PageCondition(FoSimplePageMaster master,
- int blankOrNot, int oddOrEven, int pagePosition) {
- this.master = master;
- this.blankOrNot = blankOrNot;
- this.oddOrEven = oddOrEven;
- this.pagePosition = pagePosition;
- }
-}
+++ /dev/null
-/*
- * $Id$
- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
- * For details on use and redistribution please refer to the
- * LICENSE file included with these sources.
- *
- * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
- */
-
-package org.apache.fop.fo.pagination;
-
-import java.util.ArrayList;
-
-// FOP
-import org.apache.fop.fo.pagination.PageCondition;
-
-/**
- * Encodes an fo:repeatable-page-master-alternatives and associated
- * conditions.
- */
-public class PageMasterAlternatives {
-
- private static final String tag = "$Name$";
- private static final String revision = "$Revision$";
-
- /** Constant representing the <i>no-limit</i> value of the
- maximum-repeats property. */
- public static final int NO_LIMIT = -1;
-
- /** The minumum number of repeats for this set of alternatives. */
- public final int minRepeats;
- /** The maximum-repeats value for this set of alternatives. */
- public final int maxRepeats;
-
- private ArrayList alternatives = new ArrayList(1);
-
- /**
- * @param minRepeats - the <tt>int</tt> minimum number of repeats for
- * this alternative.
- * @param maxRepeats - the <tt>int</tt> maximum number of repeats for
- * this alternative. Set from the <i>maximum-repeats</i> property.
- */
- public PageMasterAlternatives(int minRepeats, int maxRepeats) {
- this.minRepeats = minRepeats;
- this.maxRepeats = maxRepeats;
- }
-
- /**
- * Add a new alternative condition set.
- * @param condition - a <tt>PageCondition</tt>.
- */
- public void addCondition(PageCondition condition) {
- alternatives.add(condition);
- }
-
- /**
- * Get the length of the <i>alternatives</i> <tt>ArrayList</tt>.
- * @return - the length.
- */
- public int getAlternativesLength() {
- return alternatives.size();
- }
-
- /**
- * Get the indexed <tt>PageMasterAlternatives</tt> master.
- * @param i - the index of the master to retrieve.
- * @return - the indexed <tt>PageMasterAlternatives</tt> master.
- */
- public PageCondition getAlternative(int i) {
- return (PageCondition)(alternatives.get(i));
- }
-
-}