Browse Source

Add method to support fix for keep-together loop in tables


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain@195687 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-0_20_5rc
Karen Lease 21 years ago
parent
commit
d8cabc0d5e
1 changed files with 18 additions and 0 deletions
  1. 18
    0
      src/org/apache/fop/layout/Area.java

+ 18
- 0
src/org/apache/fop/layout/Area.java View File

@@ -15,6 +15,7 @@ import org.apache.fop.layout.inline.InlineSpace;
// Java
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;

abstract public class Area extends Box {

@@ -160,6 +161,23 @@ abstract public class Area extends Box {
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() {
/*
* ATTENTION: this may change your output!! (Karen Lease, 4mar2001)

Loading…
Cancel
Save