From: Karen Lease Date: Sun, 11 Nov 2001 22:15:45 +0000 (+0000) Subject: New base class for inline LayoutManager classes which generate atomic areas X-Git-Tag: fop-0_20_4-doc~202 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=550096b03ecaaf3d0492049df19681a2a245f57e;p=xmlgraphics-fop.git 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 --- 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; + } + + +}