]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Make it possible to keep block-container element lists apart from normal page-level...
authorJeremias Maerki <jeremias@apache.org>
Tue, 2 Aug 2005 15:32:35 +0000 (15:32 +0000)
committerJeremias Maerki <jeremias@apache.org>
Tue, 2 Aug 2005 15:32:35 +0000 (15:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@227026 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java

index d5ba5513fd384b42f80633f0fd8ff978b5ec9788..d091c73e5abda1306ad3fa88781f35be0dedb047 100644 (file)
@@ -165,6 +165,15 @@ public abstract class AbstractBreaker {
         //nop
     }
     
+    /**
+     * Used for debugging purposes. Notifies all registered observers about the element list.
+     * Override to set different parameters.
+     * @param elementList the Knuth element list
+     */
+    protected void observeElementList(List elementList) {
+        ElementListObserver.observe(elementList, "breaker", null);
+    }
+    
     public void doLayout(int flowBPD) {
         LayoutContext childLC = createLayoutContext();
         childLC.setStackLimit(new MinOptMax(flowBPD));
@@ -204,7 +213,7 @@ public abstract class AbstractBreaker {
                                     : "even page";
                     log.debug("  sequence starts on " + pagina);
                 }
-                ElementListObserver.observe(blockList, "breaker", null);
+                observeElementList(blockList);
                 //debug code end
 
                 log.debug("PLM> start of algorithm (" + this.getClass().getName() 
index 440c1b97ef368bb28109e8cd876053eb6568dfb7..1fad79154cb86416320997088226535039f82e03 100644 (file)
@@ -19,6 +19,7 @@
 package org.apache.fop.layoutmgr;
 
 import java.util.LinkedList;
+import java.util.List;
 import java.util.ListIterator;
 import java.awt.Point;
 import java.awt.geom.Rectangle2D;
@@ -447,6 +448,12 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
             this.ipd = ipd;
         }
 
+        /** @see org.apache.fop.layoutmgr.AbstractBreaker#observeElementList(java.util.List) */
+        protected void observeElementList(List elementList) {
+            ElementListObserver.observe(elementList, "block-container", 
+                    bclm.getBlockContainerFO().getId());
+        }
+        
         /** @see org.apache.fop.layoutmgr.AbstractBreaker#isPartOverflowRecoveryActivated() */
         protected boolean isPartOverflowRecoveryActivated() {
             //For block-containers, this must be disabled because of wanted overflow.