]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
New base class for inline LayoutManager classes which generate atomic areas
authorKaren Lease <klease@apache.org>
Sun, 11 Nov 2001 22:15:45 +0000 (22:15 +0000)
committerKaren Lease <klease@apache.org>
Sun, 11 Nov 2001 22:15:45 +0000 (22:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194561 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java [new file with mode: 0644]

diff --git a/src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java b/src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java
new file mode 100644 (file)
index 0000000..41073a1
--- /dev/null
@@ -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;
+    }
+       
+
+}