diff options
author | jtauber <jtauber@unknown> | 1999-11-25 17:33:16 +0000 |
---|---|---|
committer | jtauber <jtauber@unknown> | 1999-11-25 17:33:16 +0000 |
commit | 5273e66a656c4e769d0820fabc3dfbc9b35a6c50 (patch) | |
tree | 8c4b6a292f1ad503b961295492ffaf25b5ce83e8 /src/org/apache/fop/fo/flow/DisplaySequence.java | |
parent | fcc0954359c3dca5843a9c2ba24d3f0628fd717f (diff) | |
download | xmlgraphics-fop-5273e66a656c4e769d0820fabc3dfbc9b35a6c50.tar.gz xmlgraphics-fop-5273e66a656c4e769d0820fabc3dfbc9b35a6c50.zip |
Partial implementation of keep-with-next (doesn't yet remove area from previous page when fo is moved to next page to ensure keep). The layout method on each FO now returns a Status object rather than an int to allow for more information to be passed back in the future.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193240 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/fo/flow/DisplaySequence.java')
-rw-r--r-- | src/org/apache/fop/fo/flow/DisplaySequence.java | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/org/apache/fop/fo/flow/DisplaySequence.java b/src/org/apache/fop/fo/flow/DisplaySequence.java index 35189ebff..05571ffb9 100644 --- a/src/org/apache/fop/fo/flow/DisplaySequence.java +++ b/src/org/apache/fop/fo/flow/DisplaySequence.java @@ -22,7 +22,7 @@ Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - 4. The names "Fop" and "Apache Software Foundation" must not be used to + 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -48,6 +48,7 @@ Software Foundation, please see <http://www.apache.org/>. */ + package org.apache.fop.fo.flow; // FOP @@ -76,7 +77,7 @@ public class DisplaySequence extends FObj { this.name = "fo:display-sequence"; } - public int layout(Area area) throws FOPException { + public Status layout(Area area) throws FOPException { if (this.marker == START) { this.marker = 0; } @@ -84,19 +85,12 @@ public class DisplaySequence extends FObj { int numChildren = this.children.size(); for (int i = this.marker; i < numChildren; i++) { FObj fo = (FObj) children.elementAt(i); - int status; - if ((status = fo.layout(area)) != OK) { - /* message from child */ - if (status > OK) { - /* child still successful */ - this.marker = i+1; - } else { - /* child unsucessful */ - this.marker = i; - } - return status; + Status status; + if ((status = fo.layout(area)).isIncomplete()) { + this.marker = i; } + return status; } - return OK; + return new Status(Status.OK); } } |