From f2d63aeb05f86bb5d6eb088f9f8c91c552cf560a Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Tue, 2 Aug 2005 15:32:35 +0000 Subject: [PATCH] Make it possible to keep block-container element lists apart from normal page-level element lists. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@227026 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/layoutmgr/AbstractBreaker.java | 11 ++++++++++- .../fop/layoutmgr/BlockContainerLayoutManager.java | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java b/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java index d5ba5513f..d091c73e5 100644 --- a/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java +++ b/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java @@ -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() diff --git a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java index 440c1b97e..1fad79154 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java @@ -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. -- 2.39.5