]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
add retrieve marker layout manager
authorKeiron Liddle <keiron@apache.org>
Wed, 19 Feb 2003 05:54:15 +0000 (05:54 +0000)
committerKeiron Liddle <keiron@apache.org>
Wed, 19 Feb 2003 05:54:15 +0000 (05:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195973 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/flow/RetrieveMarker.java

index fb59e7d7b7ad29c76c70448227bfbee1e6974600..9f66808b63b3a59224bf10b807f7aae3e77b7f9e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * Copyright (C) 2001-2003 The Apache Software Foundation. All rights reserved.
  * For details on use and redistribution please refer to the
  * LICENSE file included with these sources.
  */
@@ -8,27 +8,39 @@
 package org.apache.fop.fo.flow;
 
 // FOP
-import org.apache.fop.fo.*;
-import org.apache.fop.fo.properties.*;
-import org.apache.fop.layout.*;
-import org.apache.fop.datatypes.*;
 import org.apache.fop.apps.FOPException;
-
-// Java
-import java.util.Vector;
-
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FObjMixed;
+import org.apache.fop.layoutmgr.RetrieveMarkerLayoutManager;
 import org.xml.sax.Attributes;
 
+import java.util.List;
+
+/**
+ * The retrieve-marker formatting object.
+ * This will create a layout manager that will retrieve
+ * a marker based on the information.
+ */
 public class RetrieveMarker extends FObjMixed {
 
     private String retrieveClassName;
     private int retrievePosition;
     private int retrieveBoundary;
 
+    /**
+     * Create a retrieve marker object.
+     *
+     * @see org.apache.fop.fo.FONode#FONode(FONode)
+     */
     public RetrieveMarker(FONode parent) {
         super(parent);
     }
 
+    /**
+     * Handle the attributes for the retrieve-marker.
+     *
+     * @see org.apache.fop.fo.FONode#handleAttrs(Attributes)
+     */
     public void handleAttrs(Attributes attlist) throws FOPException {
         super.handleAttrs(attlist);
         this.retrieveClassName =
@@ -39,4 +51,13 @@ public class RetrieveMarker extends FObjMixed {
             this.properties.get("retrieve-boundary").getEnum();
     }
 
+    public void addLayoutManager(List lms) {
+        RetrieveMarkerLayoutManager rmlm;
+        rmlm = new RetrieveMarkerLayoutManager(retrieveClassName,
+                                                retrievePosition,
+                                                retrieveBoundary);
+        rmlm.setUserAgent(getUserAgent());
+        rmlm.setFObj(this);
+        lms.add(rmlm);
+    }
 }