diff options
author | Glen Mazza <gmazza@apache.org> | 2004-08-16 11:59:52 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2004-08-16 11:59:52 +0000 |
commit | 5cb5c54ba4e6150020879dabeaf8ca7a0dcbd1c5 (patch) | |
tree | 89ed4d4bf7c7ca85cd48574b8aa405d57e696690 /src/java/org/apache/fop/fo/flow/Wrapper.java | |
parent | 4f9065f69ba1791e40bb57e6d2d1acaa81a7042c (diff) | |
download | xmlgraphics-fop-5cb5c54ba4e6150020879dabeaf8ca7a0dcbd1c5.tar.gz xmlgraphics-fop-5cb5c54ba4e6150020879dabeaf8ca7a0dcbd1c5.zip |
1.) fo:wrapper layout initialization logic moved from AddLMVisitor to
fo.flow.Wrapper.
2.) Temporary class LMVisited dropped.
3.) AddLMVisitor dropped, its LM list moved to its parent AreaTreeHandler
object.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197877 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/flow/Wrapper.java')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/Wrapper.java | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/fo/flow/Wrapper.java b/src/java/org/apache/fop/fo/flow/Wrapper.java index 82a9be783..fe294f9e9 100644 --- a/src/java/org/apache/fop/fo/flow/Wrapper.java +++ b/src/java/org/apache/fop/fo/flow/Wrapper.java @@ -18,11 +18,14 @@ package org.apache.fop.fo.flow; +// Java +import java.util.List; +import java.util.ListIterator; + // FOP import org.apache.fop.fo.FONode; +import org.apache.fop.fo.FObj; import org.apache.fop.fo.FObjMixed; -import org.apache.fop.layoutmgr.AddLMVisitor; -import org.apache.fop.fo.LMVisited; /** * Implementation for fo:wrapper formatting object. @@ -32,7 +35,7 @@ import org.apache.fop.fo.LMVisited; * Content: (#PCDATA|%inline;|%block;)* * Properties: id */ -public class Wrapper extends FObjMixed implements LMVisited { +public class Wrapper extends FObjMixed { /** * @param parent FONode that is the parent of this object @@ -41,10 +44,24 @@ public class Wrapper extends FObjMixed implements LMVisited { super(parent); } - public void acceptVisitor(AddLMVisitor aLMV) { - aLMV.serveWrapper(this); + /** + * @see org.apache.fop.fo.FObj#addLayoutManager(List) + * @todo remove null check when vCN() & endOfNode() implemented + */ + public void addLayoutManager(List list) { + ListIterator baseIter = getChildNodes(); + if (baseIter == null) { + return; + } + while (baseIter.hasNext()) { + FObj child = (FObj) baseIter.next(); + child.addLayoutManager(list); + } } - + + /** + * @see org.apache.fop.fo.FObj#getName() + */ public String getName() { return "fo:wrapper"; } |