diff options
author | Karen Lease <klease@apache.org> | 2001-11-11 22:15:45 +0000 |
---|---|---|
committer | Karen Lease <klease@apache.org> | 2001-11-11 22:15:45 +0000 |
commit | 550096b03ecaaf3d0492049df19681a2a245f57e (patch) | |
tree | aad7bbcf4815117bd4a06f4fd9c5e0bf12d126d4 /src/org/apache/fop/layoutmgr | |
parent | 796089b1fa8af9af83b2c4a21d2d3030bce210ea (diff) | |
download | xmlgraphics-fop-550096b03ecaaf3d0492049df19681a2a245f57e.tar.gz xmlgraphics-fop-550096b03ecaaf3d0492049df19681a2a245f57e.zip |
New base class for inline LayoutManager classes which generate atomic areas
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194561 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/layoutmgr')
-rw-r--r-- | src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java b/src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java new file mode 100644 index 000000000..41073a139 --- /dev/null +++ b/src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java @@ -0,0 +1,51 @@ +/* + * $Id$ + * 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. + */ + +package org.apache.fop.layoutmgr; + +import org.apache.fop.fo.FObj; +import org.apache.fop.area.Area; +import org.apache.fop.area.inline.InlineArea; + + +/** + * Base LayoutManager for leaf-node FObj, ie: ones which have no children. + * These are all inline objects. Most of them cannot be split (Text is + * an exception to this rule.) + */ +public class LeafNodeLayoutManager extends AbstractLayoutManager { + + private InlineArea curArea; + + public LeafNodeLayoutManager(FObj fobj) { + super(fobj); + } + + + protected void setCurrentArea(InlineArea ia) { + curArea = ia; + } + + protected void flush() { + parentLM.addChild(curArea); + } + + /** + * This is a leaf-node, so this method is never called. + */ + public void addChild(Area childArea) {} + + + /** + * This is a leaf-node, so this method is never called. + */ + public Area getParentArea(Area childArea) { + return null; + } + + +} |