You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ar...@apache.org on 2001/07/09 05:03:28 UTC
cvs commit: xml-fop/src/org/apache/fop/fo/pagination Root.java
arved 01/07/08 20:03:28
Modified: src/org/apache/fop/fo/pagination Root.java
Log:
AHS: support 'force-page-count'
Revision Changes Path
1.11 +20 -6 xml-fop/src/org/apache/fop/fo/pagination/Root.java
Index: Root.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Root.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Root.java 2001/06/22 08:52:08 1.10
+++ Root.java 2001/07/09 03:03:24 1.11
@@ -1,4 +1,4 @@
-/*-- $Id: Root.java,v 1.10 2001/06/22 08:52:08 keiron Exp $ --
+/*-- $Id: Root.java,v 1.11 2001/07/09 03:03:24 arved Exp $ --
* 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.
@@ -42,7 +42,6 @@
/** keeps count of page number from over PageSequence instances*/
private int runningPageNumberCounter = 0;
-
protected Root(FObj parent,
PropertyList propertyList) throws FOPException {
super(parent, propertyList);
@@ -54,24 +53,39 @@
}
}
-
protected int getRunningPageNumberCounter() {
return this.runningPageNumberCounter;
}
-
protected void setRunningPageNumberCounter(int count) {
this.runningPageNumberCounter = count;
}
-
/** @deprecated handled by addChild now
*/
public void addPageSequence(PageSequence pageSequence) {
this.pageSequences.addElement(pageSequence);
}
-
+ public int getPageSequenceCount() {
+ return pageSequences.size();
+ }
+
+ /**
+ * Some properties, such as 'force-page-count', require a
+ * page-sequence to know about some properties of the next.
+ * @returns succeeding PageSequence; null if none
+ */
+ public PageSequence getSucceedingPageSequence(PageSequence current) {
+ int currentIndex = pageSequences.indexOf(current);
+ if (currentIndex == -1) return null;
+ if (currentIndex < (pageSequences.size()-1)) {
+ return (PageSequence)pageSequences.elementAt(currentIndex+1);
+ } else {
+ return null;
+ }
+ }
+
public LayoutMasterSet getLayoutMasterSet() {
return this.layoutMasterSet;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org