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 kl...@apache.org on 2002/12/01 12:54:19 UTC
cvs commit: xml-fop/src/org/apache/fop/layout Area.java
klease 2002/12/01 03:54:19
Modified: src/org/apache/fop/layout Tag: fop-0_20_2-maintain Area.java
Log:
Add method to support fix for keep-together loop in tables
Revision Changes Path
No revision
No revision
1.24.2.5 +19 -1 xml-fop/src/org/apache/fop/layout/Attic/Area.java
Index: Area.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Attic/Area.java,v
retrieving revision 1.24.2.4
retrieving revision 1.24.2.5
diff -u -r1.24.2.4 -r1.24.2.5
--- Area.java 19 Nov 2002 01:04:08 -0000 1.24.2.4
+++ Area.java 1 Dec 2002 11:54:19 -0000 1.24.2.5
@@ -15,6 +15,7 @@
// Java
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
abstract public class Area extends Box {
@@ -158,6 +159,23 @@
public boolean hasChildren() {
return (this.children.size() != 0);
+ }
+
+ /**
+ * Tell whether this area contains any children which are not
+ * DisplaySpace. This is used in determining whether to honor
+ * keeps.
+ */
+ public boolean hasNonSpaceChildren() {
+ if (this.children.size() > 0) {
+ Iterator childIter = children.iterator();
+ while (childIter.hasNext()) {
+ if (! (childIter.next() instanceof DisplaySpace)) {
+ return true;
+ }
+ }
+ }
+ return false;
}
public int getContentWidth() {
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org