]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
move fo/flow/ListItemBody.getItemLayoutManager() to layoutmgr/AddLMVisitor.getListIte...
authorWilliam Victor Mote <vmote@apache.org>
Mon, 25 Aug 2003 18:10:30 +0000 (18:10 +0000)
committerWilliam Victor Mote <vmote@apache.org>
Mon, 25 Aug 2003 18:10:30 +0000 (18:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196838 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/flow/ListItemBody.java
src/java/org/apache/fop/layoutmgr/AddLMVisitor.java

index 3a81137144a4bc57692cc648c670a7f11de81bb2..960f6a610a4a3baaeac29db82f64f1a7fd504656 100644 (file)
@@ -55,8 +55,6 @@ import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.FOTreeVisitor;
 import org.apache.fop.fo.properties.CommonAccessibility;
-import org.apache.fop.layoutmgr.list.Item;
-import org.apache.fop.apps.*;
 
 /**
  * Class modelling the fo:list-item-body object. See Sec. 6.8.4 of the XSL-FO
@@ -71,16 +69,6 @@ public class ListItemBody extends FObj {
         super(parent);
     }
 
-    /**
-     * @return Item layout manager
-     */
-    public Item getItemLayoutManager() {
-        Item item = new Item();
-        item.setUserAgent(getUserAgent());
-        item.setFObj(this);
-        return item;
-    }
-
     private void setup() {
 
             // Common Accessibility Properties
index 4a3139df5367b1676f0a1ea5b9869f45a7f9184e..eb35aea800005ea3d642d586d51f3dfa30b1aa2d 100644 (file)
@@ -84,6 +84,7 @@ import org.apache.fop.fo.flow.ExternalGraphic;
 import org.apache.fop.fo.flow.BlockContainer;
 import org.apache.fop.fo.flow.Footnote;
 import org.apache.fop.fo.flow.ListBlock;
+import org.apache.fop.fo.flow.ListItemBody;
 import org.apache.fop.fo.flow.InstreamForeignObject;
 import org.apache.fop.fo.flow.InlineContainer;
 import org.apache.fop.fo.flow.ListItem;
@@ -108,6 +109,7 @@ import org.apache.fop.layoutmgr.table.Cell;
 import org.apache.fop.layoutmgr.table.Body;
 import org.apache.fop.layoutmgr.table.Row;
 import org.apache.fop.layoutmgr.table.TableLayoutManager;
+import org.apache.fop.layoutmgr.list.Item;
 import org.apache.fop.layoutmgr.list.ListBlockLayoutManager;
 import org.apache.fop.layoutmgr.list.ListItemLayoutManager;
 import org.apache.fop.util.CharUtilities;
@@ -637,13 +639,23 @@ public class AddLMVisitor extends FOTreeVisitor {
              blm.setUserAgent(node.getUserAgent());
              blm.setFObj(node);
              blm.setLabel(node.getLabel().getItemLayoutManager());
-             blm.setBody(node.getBody().getItemLayoutManager());
+             blm.setBody(getListItemBodyLayoutManager(node.getBody()));
              currentLMList.add(blm);
          } else {
              node.getLogger().error("list-item requires list-item-label and list-item-body");
          }
      }
 
+     /**
+      * @return Item layout manager
+      */
+     public Item getListItemBodyLayoutManager(ListItemBody node) {
+         Item item = new Item();
+         item.setUserAgent(node.getUserAgent());
+         item.setFObj(node);
+         return item;
+     }
+
      /**
       * Overridden from FObj
       * @param lms the list to which the layout manager(s) should be added