]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Merged LayoutProcessor into LayoutManager interface.
authorGlen Mazza <gmazza@apache.org>
Sun, 21 Mar 2004 12:03:08 +0000 (12:03 +0000)
committerGlen Mazza <gmazza@apache.org>
Sun, 21 Mar 2004 12:03:08 +0000 (12:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197466 13f79535-47bb-0310-9956-ffa450edef68

30 files changed:
src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
src/java/org/apache/fop/layoutmgr/AddLMVisitor.java
src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
src/java/org/apache/fop/layoutmgr/BreakPoss.java
src/java/org/apache/fop/layoutmgr/BreakPossPosIter.java
src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java
src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java
src/java/org/apache/fop/layoutmgr/InlineStackingLayoutManager.java
src/java/org/apache/fop/layoutmgr/LMiter.java
src/java/org/apache/fop/layoutmgr/LayoutManager.java
src/java/org/apache/fop/layoutmgr/LayoutProcessor.java [deleted file]
src/java/org/apache/fop/layoutmgr/LeafPosition.java
src/java/org/apache/fop/layoutmgr/LineLayoutManager.java
src/java/org/apache/fop/layoutmgr/NonLeafPosition.java
src/java/org/apache/fop/layoutmgr/PageLayoutManager.java
src/java/org/apache/fop/layoutmgr/Position.java
src/java/org/apache/fop/layoutmgr/PositionIterator.java
src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java
src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java
src/java/org/apache/fop/layoutmgr/list/Item.java
src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java
src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
src/java/org/apache/fop/layoutmgr/table/Body.java
src/java/org/apache/fop/layoutmgr/table/Caption.java
src/java/org/apache/fop/layoutmgr/table/Cell.java
src/java/org/apache/fop/layoutmgr/table/Row.java
src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java
src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java

index 451db4ae3ac486ceb6d344394b42077ad9c74be3..f71b70c3118c99fb14fcf5022562a9e0ca7b9423 100644 (file)
@@ -35,16 +35,16 @@ import java.util.Map;
 /**
  * The base class for all LayoutManagers.
  */
-public abstract class AbstractLayoutManager implements LayoutProcessor, Constants {
+public abstract class AbstractLayoutManager implements LayoutManager, Constants {
     protected FOUserAgent userAgent;
-    protected LayoutProcessor parentLM = null;
+    protected LayoutManager parentLM = null;
     protected FObj fobj;
     protected String foID = null;
     protected Map markers = null;
 
     /** True if this LayoutManager has handled all of its content. */
     private boolean bFinished = false;
-    protected LayoutProcessor curChildLM = null;
+    protected LayoutManager curChildLM = null;
     protected ListIterator childLMiter;
     protected boolean bInited = false;
 
@@ -97,11 +97,11 @@ public abstract class AbstractLayoutManager implements LayoutProcessor, Constant
         return userAgent.getLogger();
     }
 
-    public void setParent(LayoutProcessor lm) {
+    public void setParent(LayoutManager lm) {
         this.parentLM = lm;
     }
 
-    public LayoutProcessor getParent() {
+    public LayoutManager getParent() {
         return this.parentLM;
     }
 
@@ -157,12 +157,12 @@ public abstract class AbstractLayoutManager implements LayoutProcessor, Constant
      * Note: child must implement LayoutManager! If it doesn't, skip it
      * and print a warning.
      */
-    protected LayoutProcessor getChildLM() {
+    protected LayoutManager getChildLM() {
         if (curChildLM != null && !curChildLM.isFinished()) {
             return curChildLM;
         }
         while (childLMiter.hasNext()) {
-            curChildLM = (LayoutProcessor) childLMiter.next();
+            curChildLM = (LayoutManager) childLMiter.next();
             curChildLM.setUserAgent(getUserAgent());
             curChildLM.setParent(this);
             curChildLM.initialize();
@@ -201,7 +201,7 @@ public abstract class AbstractLayoutManager implements LayoutProcessor, Constant
             }
             while (curChildLM != lm && childLMiter.hasPrevious()) {
                 curChildLM.resetPosition(null);
-                curChildLM = (LayoutProcessor) childLMiter.previous();
+                curChildLM = (LayoutManager) childLMiter.previous();
             }
             // Otherwise next returns same object
             childLMiter.next();
index 117bf4c314fbc8ef0614e387e6a399f84d7f808e..ed359886ccdf0643ced3f943f8db74dee62ca4a0 100644 (file)
@@ -206,9 +206,9 @@ public class AddLMVisitor implements FOTreeVisitor {
             serveFObjMixed((FObjMixed)node);
             currentLMList = saveLMList;
             for (int count = childList.size() - 1; count >= 0; count--) {
-                LayoutProcessor lm = (LayoutProcessor) childList.get(count);
+                LayoutManager lm = (LayoutManager) childList.get(count);
                 if (lm.generatesInlineAreas()) {
-                    LayoutProcessor blm = new BidiLayoutManager((InlineStackingLayoutManager) lm);
+                    LayoutManager blm = new BidiLayoutManager((InlineStackingLayoutManager) lm);
                     blm.setFObj(node);
                     currentLMList.add(blm);
                 } else {
@@ -264,7 +264,7 @@ public class AddLMVisitor implements FOTreeVisitor {
         currentLMList.add(lm);
     }
 
-    protected void setupBasicLinkArea(BasicLink node, LayoutProcessor parentLM,
+    protected void setupBasicLinkArea(BasicLink node, LayoutManager parentLM,
                                       InlineParent area) {
          if (node.getLink() == null) {
              return;
@@ -754,7 +754,7 @@ public class AddLMVisitor implements FOTreeVisitor {
      // if id can be resolved then simply return a word, otherwise
      // return a resolveable area
      public InlineArea getPageNumberCitationInlineArea(PageNumberCitation node,
-             LayoutProcessor parentLM) {
+             LayoutManager parentLM) {
          if (node.getRefId().equals("")) {
              node.getLogger().error("page-number-citation must contain \"ref-id\"");
              return null;
index 954715c362c12eb097a41248f28bdcfd367228aa..ac0fa3414833b2a15a89cb8d8a476e66b7ee59a7 100644 (file)
@@ -139,7 +139,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
             stackLimit = context.getStackLimit();
         }
 
-        LayoutProcessor curLM ; // currently active LM
+        LayoutManager curLM ; // currently active LM
 
         MinOptMax stackSize = new MinOptMax();
         // if starting add space before
@@ -212,7 +212,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
 
     public BreakPoss getAbsoluteBreakPoss(LayoutContext context) {
 
-        LayoutProcessor curLM ; // currently active LM
+        LayoutManager curLM ; // currently active LM
 
         MinOptMax stackSize = new MinOptMax();
 
@@ -260,7 +260,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
         addID();
         addMarkers(true, true);
 
-        LayoutProcessor childLM;
+        LayoutManager childLM;
         int iStartPos = 0;
         LayoutContext lc = new LayoutContext(0);
         while (parentIter.hasNext()) {
@@ -288,7 +288,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
      * This returns the current block container area
      * and creates it if required.
      *
-     * @see org.apache.fop.layoutmgr.LayoutProcessor#getParentArea(Area)
+     * @see org.apache.fop.layoutmgr.LayoutManager#getParentArea(Area)
      */
     public Area getParentArea(Area childArea) {
         if (curBlockArea == null) {
@@ -355,7 +355,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
     /**
      * Add the child to the block container.
      *
-     * @see org.apache.fop.layoutmgr.LayoutProcessor#addChild(Area)
+     * @see org.apache.fop.layoutmgr.LayoutManager#addChild(Area)
      */
     public void addChild(Area childArea) {
         if (curBlockArea != null) {
index 6c937724c95612c1b18cb7939df20f560c928a62..490f731d4db2ac2c33b578b0a13c682b704d1cdd 100644 (file)
@@ -78,14 +78,14 @@ public class BlockLayoutManager extends BlockStackingLayoutManager {
 
         private ListIterator proxy;
 
-        public BlockLMiter(LayoutProcessor lp, ListIterator pr) {
+        public BlockLMiter(LayoutManager lp, ListIterator pr) {
             super(lp, null);
             proxy = pr;
         }
 
         protected boolean preLoadNext() {
             while (proxy.hasNext()) {
-                LayoutProcessor lm = (LayoutProcessor) proxy.next();
+                LayoutManager lm = (LayoutManager) proxy.next();
                 lm.setParent(BlockLayoutManager.this);
                 if (lm.generatesInlineAreas()) {
                     LineLayoutManager lineLM = createLineManager(lm);
@@ -102,11 +102,11 @@ public class BlockLayoutManager extends BlockStackingLayoutManager {
 
         protected LineLayoutManager createLineManager(
           LayoutManager firstlm) {
-            LayoutProcessor lm;
+            LayoutManager lm;
             List inlines = new ArrayList();
             inlines.add(firstlm);
             while (proxy.hasNext()) {
-                lm = (LayoutProcessor) proxy.next();
+                lm = (LayoutManager) proxy.next();
                 lm.setParent(BlockLayoutManager.this);
                 if (lm.generatesInlineAreas()) {
                     inlines.add(lm);
@@ -159,7 +159,7 @@ public class BlockLayoutManager extends BlockStackingLayoutManager {
     }
 
     public BreakPoss getNextBreakPoss(LayoutContext context) {
-        LayoutProcessor curLM; // currently active LM
+        LayoutManager curLM; // currently active LM
 
         int ipd = context.getRefIPD();
         int iIndents = marginProps.startIndent + marginProps.endIndent; 
@@ -209,7 +209,7 @@ public class BlockLayoutManager extends BlockStackingLayoutManager {
                     if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
                         // reset to last break
                         if (lastPos != null) {
-                            LayoutProcessor lm = lastPos.getLayoutManager();
+                            LayoutManager lm = lastPos.getLayoutManager();
                             lm.resetPosition(lastPos.getPosition());
                             if (lm != curLM) {
                                 curLM.resetPosition(null);
@@ -270,7 +270,7 @@ public class BlockLayoutManager extends BlockStackingLayoutManager {
         addID();
         addMarkers(true, true);
 
-        LayoutProcessor childLM;
+        LayoutManager childLM;
         LayoutContext lc = new LayoutContext(0);
         while (parentIter.hasNext()) {
             LeafPosition lfp = (LeafPosition) parentIter.next();
index 584f8a2951984f1843b590cea94a2689d3cc706c..bb2881c11d64e52f07ba35a7848a3fe8316779ba 100644 (file)
@@ -32,7 +32,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager {
      * Reference to FO whose areas it's managing or to the traits
      * of the FO.
      */
-    protected LayoutProcessor curChildLM = null;
+    protected LayoutManager curChildLM = null;
     protected BlockParent parentArea = null;
 
     public BlockStackingLayoutManager() {
index c4d0c92549b44aba4f7918f1383c8b48654ff72e..96c30157449b1309ffb53f42ce73a7cc7c325faa 100644 (file)
@@ -104,7 +104,7 @@ public class BreakPoss {
     /**
      * The top-level layout manager responsible for this break
      */
-    public LayoutProcessor getLayoutManager() {
+    public LayoutManager getLayoutManager() {
         return position.getLM();
     }
 
index f8abc8d0284c3b9d0d5d47be3354567fe10fe902..40a1a4aae233716b2f78cef1864f60cd477559cf 100644 (file)
@@ -64,7 +64,7 @@ public class BreakPossPosIter extends PositionIterator {
         return (BreakPoss) peekNext();
     }
 
-    protected LayoutProcessor getLM(Object nextObj) {
+    protected LayoutManager getLM(Object nextObj) {
         return ((BreakPoss) nextObj).getLayoutManager();
     }
 
index 81829d3745e7a71e22527561ff3eb74b8bf89a9d..672ffc5fe3ca1fa7fb10e6e778e9f28c930b773f 100644 (file)
@@ -35,11 +35,11 @@ import org.apache.fop.traits.MinOptMax;
  * For use with objects that contain inline areas such as
  * leader use-content and title.
  */
-public class ContentLayoutManager implements LayoutProcessor {
+public class ContentLayoutManager implements LayoutManager {
     private FOUserAgent userAgent;
     private Area holder;
     private int stackSize;
-    private LayoutProcessor parentLM;
+    private LayoutManager parentLM;
 
     /**
      * Constructs a new ContentLayoutManager
@@ -58,7 +58,7 @@ public class ContentLayoutManager implements LayoutProcessor {
     public void setFObj(FObj fo) {
     }
 
-    public void fillArea(LayoutProcessor curLM) {
+    public void fillArea(LayoutManager curLM) {
 
         List childBreaks = new ArrayList();
         MinOptMax stack = new MinOptMax();
@@ -162,11 +162,11 @@ public class ContentLayoutManager implements LayoutProcessor {
     }
 
     /** @see org.apache.fop.layoutmgr.LayoutManager */
-    public void setParent(LayoutProcessor lm) {
+    public void setParent(LayoutManager lm) {
         parentLM = lm;
     }
 
-    public LayoutProcessor getParent() {
+    public LayoutManager getParent() {
         return this.parentLM;
     }
 
index c4751359986f58f57cd307fd266b4b61de0eba35..0e27e8c595782b59da1a349ad610dbe831fe946b 100644 (file)
@@ -50,12 +50,12 @@ public class FlowLayoutManager extends BlockStackingLayoutManager {
     }
 
     /**
-     * @see org.apache.fop.layoutmgr.LayoutProcessor#getNextBreakPoss(LayoutContext)
+     * @see org.apache.fop.layoutmgr.LayoutManager#getNextBreakPoss(LayoutContext)
      */
     public BreakPoss getNextBreakPoss(LayoutContext context) {
 
         // currently active LM
-        LayoutProcessor curLM;
+        LayoutManager curLM;
         MinOptMax stackSize = new MinOptMax();
 
         while ((curLM = getChildLM()) != null) {
@@ -108,11 +108,11 @@ public class FlowLayoutManager extends BlockStackingLayoutManager {
     }
 
     /**
-     * @see org.apache.fop.layoutmgr.LayoutProcessor#addAreas(PositionIterator, LayoutContext)
+     * @see org.apache.fop.layoutmgr.LayoutManager#addAreas(PositionIterator, LayoutContext)
      */
     public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) {
 
-        LayoutProcessor childLM;
+        LayoutManager childLM;
         LayoutContext lc = new LayoutContext(0);
         while (parentIter.hasNext()) {
             LeafPosition lfp = (LeafPosition) parentIter.next();
@@ -141,7 +141,7 @@ public class FlowLayoutManager extends BlockStackingLayoutManager {
     }
 
     /**
-     * @see org.apache.fop.layoutmgr.LayoutProcessor#getParentArea(Area)
+     * @see org.apache.fop.layoutmgr.LayoutManager#getParentArea(Area)
      */
     public Area getParentArea(Area childArea) {
         // Get an area from the Page
@@ -153,7 +153,7 @@ public class FlowLayoutManager extends BlockStackingLayoutManager {
     }
 
     /**
-     * @see org.apache.fop.layoutmgr.LayoutProcessor#resetPosition(Position)
+     * @see org.apache.fop.layoutmgr.LayoutManager#resetPosition(Position)
      */
     public void resetPosition(Position resetPos) {
         if (resetPos == null) {
index 636bf89221c95ca467a4303e31e5876c808e042f..6f1e90a1fafd8615449ef4447a620e6a848cf8af 100644 (file)
@@ -46,7 +46,7 @@ public class InlineStackingLayoutManager extends AbstractLayoutManager {
             super(parentIter);
         }
 
-        protected LayoutProcessor getLM(Object nextObj) {
+        protected LayoutManager getLM(Object nextObj) {
             return ((Position) nextObj).getPosition().getLM();
         }
 
@@ -213,7 +213,7 @@ public class InlineStackingLayoutManager extends AbstractLayoutManager {
         if (inlineProps.spaceStart.getSpace().min > 0 || hasLeadingFence(false)) {
             return true;
         }
-        LayoutProcessor lm = getChildLM();
+        LayoutManager lm = getChildLM();
         if (lm != null) {
             return lm.canBreakBefore(context);
         } else {
@@ -243,7 +243,7 @@ public class InlineStackingLayoutManager extends AbstractLayoutManager {
     public BreakPoss getNextBreakPoss(LayoutContext lc) {
         // Get a break from currently active child LM
         BreakPoss bp = null;
-        LayoutProcessor curLM;
+        LayoutManager curLM;
         SpaceSpecifier leadingSpace = lc.getLeadingSpace();
 
         if (lc.startsNewArea()) {
@@ -481,8 +481,8 @@ public class InlineStackingLayoutManager extends AbstractLayoutManager {
 
         // posIter iterates over positions returned by this LM
         StackingIter childPosIter = new StackingIter(parentIter);
-        LayoutProcessor prevLM = null;
-        LayoutProcessor childLM ;
+        LayoutManager prevLM = null;
+        LayoutManager childLM ;
         while ((childLM = childPosIter.getNextChildLM()) != null) {
             //getContext().setTrailingSpace(new SpaceSpecifier(false));
             childLM.addAreas(childPosIter, getContext());
index 0eab8be197a2abd0b45708a02b2fe0fbfbdddd80..e134eb6a0ec918f4035c24b4d5e70e9f8f95196e 100644 (file)
@@ -32,10 +32,10 @@ public class LMiter implements ListIterator {
     private FObj curFO;
     protected List listLMs;
     protected int curPos = 0;
-    /** The LayoutProcessor to which this LMiter is attached **/
-    private LayoutProcessor lp;
+    /** The LayoutManager to which this LMiter is attached **/
+    private LayoutManager lp;
 
-    public LMiter(LayoutProcessor lp, ListIterator bIter) {
+    public LMiter(LayoutManager lp, ListIterator bIter) {
         this.lp = lp;
         baseIter = bIter;
         listLMs = new ArrayList(10);
index 0292fc016f09b66632fb9360e33a40db359ac95f..88005e64caf53e9e17eb41f7071fe1f695a48b6d 100644 (file)
  
 package org.apache.fop.layoutmgr;
 
+import java.util.Map;
+
+import org.apache.fop.fo.flow.Marker;
+
+import org.apache.fop.area.Area;
+import org.apache.fop.area.Resolveable;
+import org.apache.fop.area.PageViewport;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.fo.FObj;
 
@@ -49,5 +56,180 @@ public interface LayoutManager {
      * @return the user agent
      */
     FOUserAgent getUserAgent();
+    
+    /**
+     * Set the parent layout manager.
+     * The parent layout manager is required for adding areas.
+     *
+     * @param lm the parent layout manager
+     */
+    void setParent(LayoutManager lm);
+
+    /**
+     * Get the parent layout manager.
+     * @return the parent layout manager.
+     */
+    LayoutManager getParent();
+
+    /**
+     * Get the LayoutManagerLS object that is at the top of the LM Tree
+     * @return the LayoutManagerLS object that is at the top of the LM Tree
+     */
+    LayoutManagerLS getLayoutManagerLS();
+
+    /**
+     * Initialize this layout manager.
+     */
+    void initialize();
+
+    /**
+     * Generates inline areas.
+     * This is used to check if the layout manager generates inline
+     * areas.
+     *
+     * @return true if the layout manager generates inline areas
+     */
+    boolean generatesInlineAreas();
+
+    /**
+     * Return true if the next area which would be generated by this
+     * LayoutManager could start a new line (or flow for block-level FO).
+     *
+     * @param lc the layout context
+     * @return true if can break before
+     */
+    boolean canBreakBefore(LayoutContext lc);
+
+    /**
+     * Generate and return the next break possibility.
+     *
+     * @param context The layout context contains information about pending
+     * space specifiers from ancestor areas or previous areas, reference
+     * area inline-progression-dimension and various other layout-related
+     * information.
+     * @return the next break position
+     */
+    BreakPoss getNextBreakPoss(LayoutContext context);
+
+    /**
+     * Reset to the position.
+     *
+     * @param position
+     */
+    void resetPosition(Position position);
+
+    /**
+     * Get the word chars between two positions and
+     * append to the string buffer. The positions could
+     * span multiple layout managers.
+     *
+     * @param sbChars the string buffer to append the word chars
+     * @param bp1 the start position
+     * @param bp2 the end position
+     */
+    void getWordChars(StringBuffer sbChars, Position bp1,
+                             Position bp2);
+
+    /**
+     * Return a value indicating whether this LayoutManager has laid out
+     * all its content (or generated BreakPossibilities for all content.)
+     *
+     * @return true if this layout manager is finished
+     */
+    boolean isFinished();
+
+    /**
+     * Set a flag indicating whether the LayoutManager has laid out all
+     * its content. This is generally called by the LM itself, but can
+     * be called by a parentLM when backtracking.
+     *
+     * @param isFinished the value to set the finished flag to
+     */
+    void setFinished(boolean isFinished);
+
+    /**
+     * Get the parent area for an area.
+     * This should get the parent depending on the class of the
+     * area passed in.
+     *
+     * @param childArea the child area to get the parent for
+     * @return the parent Area
+     */
+    Area getParentArea(Area childArea);
+
+    /**
+     * Add the area as a child of the current area.
+     * This is called by child layout managers to add their
+     * areas as children of the current area.
+     *
+     * @param childArea the child area to add
+     */
+    void addChild(Area childArea);
+
+    /**
+     * Tell the layout manager to add all the child areas implied
+     * by Position objects which will be returned by the
+     * Iterator.
+     *
+     * @param posIter the position iterator
+     * @param context the context
+     */
+    void addAreas(PositionIterator posIter, LayoutContext context);
+
+    /**
+     * Get the string of the current page number.
+     *
+     * @return the string for the current page number
+     */
+    String getCurrentPageNumber();
+
+    /**
+     * Resolve the id reference.
+     * This is called by an area looking for an id reference.
+     * If the id reference is not found then it should add a resolveable object.
+     *
+     * @param ref the id reference
+     * @return the page containing the id reference or null if not found
+     */
+    PageViewport resolveRefID(String ref);
+
+    /**
+     * Add an id to the page.
+     * (todo) add the location of the area on the page
+     *
+     * @param id the id reference to add.
+     */
+    void addIDToPage(String id);
+
+    /**
+     * Add an unresolved area.
+     * The is used to add a resolveable object to the page for a given id.
+     *
+     * @param id the id reference this object needs for resolving
+     * @param res the resolveable object
+     */
+    void addUnresolvedArea(String id, Resolveable res);
+
+    /**
+     * Add the marker.
+     * A number of formatting objects may contain markers. This
+     * method is used to add those markers to the page.
+     *
+     * @param name the marker class name
+     * @param start true if the formatting object is starting false is finishing
+     * @param isfirst a flag for is first
+     */
+    void addMarkerMap(Map marks, boolean start, boolean isfirst);
+
+    /**
+     * Retrieve a marker.
+     * This method is used when retrieve a marker.
+     *
+     * @param name the class name of the marker
+     * @param pos the retrieve position
+     * @param boundary the boundary for retrieving the marker
+     * @return the layout manaager of the retrieved marker if any
+     */
+    Marker retrieveMarker(String name, int pos, int boundary);
 
 }
diff --git a/src/java/org/apache/fop/layoutmgr/LayoutProcessor.java b/src/java/org/apache/fop/layoutmgr/LayoutProcessor.java
deleted file mode 100644 (file)
index 92a3ed9..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.layoutmgr;
-
-import org.apache.fop.fo.flow.Marker;
-
-import org.apache.fop.area.Area;
-import org.apache.fop.area.Resolveable;
-import org.apache.fop.area.PageViewport;
-
-import java.util.Map;
-
-/**
- * The interface for all LayoutProcessors.
- * This interface is used by the layout implementation to
- * do the layout and add the areas.
- */
-public interface LayoutProcessor extends LayoutManager {
-
-    /**
-     * Set the parent layout manager.
-     * The parent layout manager is required for adding areas.
-     *
-     * @param lm the parent layout manager
-     */
-    void setParent(LayoutProcessor lm);
-
-    /**
-     * Get the parent layout manager.
-     * @return the parent layout manager.
-     */
-    LayoutProcessor getParent();
-
-    /**
-     * Get the LayoutManagerLS object that is at the top of the LM Tree
-     * @return the LayoutManagerLS object that is at the top of the LM Tree
-     */
-    LayoutManagerLS getLayoutManagerLS();
-
-    /**
-     * Initialize this layout manager.
-     */
-    void initialize();
-
-    /**
-     * Generates inline areas.
-     * This is used to check if the layout manager generates inline
-     * areas.
-     *
-     * @return true if the layout manager generates inline areas
-     */
-    boolean generatesInlineAreas();
-
-    /**
-     * Return true if the next area which would be generated by this
-     * LayoutManager could start a new line (or flow for block-level FO).
-     *
-     * @param lc the layout context
-     * @return true if can break before
-     */
-    boolean canBreakBefore(LayoutContext lc);
-
-    /**
-     * Generate and return the next break possibility.
-     *
-     * @param context The layout context contains information about pending
-     * space specifiers from ancestor areas or previous areas, reference
-     * area inline-progression-dimension and various other layout-related
-     * information.
-     * @return the next break position
-     */
-    BreakPoss getNextBreakPoss(LayoutContext context);
-
-    /**
-     * Reset to the position.
-     *
-     * @param position
-     */
-    void resetPosition(Position position);
-
-    /**
-     * Get the word chars between two positions and
-     * append to the string buffer. The positions could
-     * span multiple layout managers.
-     *
-     * @param sbChars the string buffer to append the word chars
-     * @param bp1 the start position
-     * @param bp2 the end position
-     */
-    void getWordChars(StringBuffer sbChars, Position bp1,
-                             Position bp2);
-
-    /**
-     * Return a value indicating whether this LayoutManager has laid out
-     * all its content (or generated BreakPossibilities for all content.)
-     *
-     * @return true if this layout manager is finished
-     */
-    boolean isFinished();
-
-    /**
-     * Set a flag indicating whether the LayoutManager has laid out all
-     * its content. This is generally called by the LM itself, but can
-     * be called by a parentLM when backtracking.
-     *
-     * @param isFinished the value to set the finished flag to
-     */
-    void setFinished(boolean isFinished);
-
-    /**
-     * Get the parent area for an area.
-     * This should get the parent depending on the class of the
-     * area passed in.
-     *
-     * @param childArea the child area to get the parent for
-     * @return the parent Area
-     */
-    Area getParentArea(Area childArea);
-
-    /**
-     * Add the area as a child of the current area.
-     * This is called by child layout managers to add their
-     * areas as children of the current area.
-     *
-     * @param childArea the child area to add
-     */
-    void addChild(Area childArea);
-
-    /**
-     * Tell the layout manager to add all the child areas implied
-     * by Position objects which will be returned by the
-     * Iterator.
-     *
-     * @param posIter the position iterator
-     * @param context the context
-     */
-    void addAreas(PositionIterator posIter, LayoutContext context);
-
-    /**
-     * Get the string of the current page number.
-     *
-     * @return the string for the current page number
-     */
-    String getCurrentPageNumber();
-
-    /**
-     * Resolve the id reference.
-     * This is called by an area looking for an id reference.
-     * If the id reference is not found then it should add a resolveable object.
-     *
-     * @param ref the id reference
-     * @return the page containing the id reference or null if not found
-     */
-    PageViewport resolveRefID(String ref);
-
-    /**
-     * Add an id to the page.
-     * (todo) add the location of the area on the page
-     *
-     * @param id the id reference to add.
-     */
-    void addIDToPage(String id);
-
-    /**
-     * Add an unresolved area.
-     * The is used to add a resolveable object to the page for a given id.
-     *
-     * @param id the id reference this object needs for resolving
-     * @param res the resolveable object
-     */
-    void addUnresolvedArea(String id, Resolveable res);
-
-    /**
-     * Add the marker.
-     * A number of formatting objects may contain markers. This
-     * method is used to add those markers to the page.
-     *
-     * @param name the marker class name
-     * @param start true if the formatting object is starting false is finishing
-     * @param isfirst a flag for is first
-     */
-    void addMarkerMap(Map marks, boolean start, boolean isfirst);
-
-    /**
-     * Retrieve a marker.
-     * This method is used when retrieve a marker.
-     *
-     * @param name the class name of the marker
-     * @param pos the retrieve position
-     * @param boundary the boundary for retrieving the marker
-     * @return the layout manaager of the retrieved marker if any
-     */
-    Marker retrieveMarker(String name, int pos, int boundary);
-
-}
-
index 67856e584fabbc85f3b69be3694ec48ae0ff287a..5dac0a06294a6db79128c5d57b887f10f4d0f07e 100644 (file)
@@ -22,7 +22,7 @@ public class LeafPosition extends Position {
 
     private int iLeafPos;
 
-    public LeafPosition(LayoutProcessor lm, int pos) {
+    public LeafPosition(LayoutManager lm, int pos) {
         super(lm);
         iLeafPos = pos;
     }
index 0675e3fdbe259226d78bd96baf91da637e318b82..ee018aad6f9079380e9891ca6d585252fb74a59f 100644 (file)
@@ -60,7 +60,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager {
         int lineHeight;
         int baseline;
 
-        LineBreakPosition(LayoutProcessor lm, int iBreakIndex,
+        LineBreakPosition(LayoutManager lm, int iBreakIndex,
                           double ipdA, double adjust, int ind, int lh, int bl) {
             super(lm, iBreakIndex);
             // iPos = iBreakIndex;
@@ -130,7 +130,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager {
         // Get a break from currently active child LM
         // Set up constraints for inline level managers
 
-        LayoutProcessor curLM ; // currently active LM
+        LayoutManager curLM ; // currently active LM
         BreakPoss prev = null;
         BreakPoss bp = null; // proposed BreakPoss
 
@@ -353,7 +353,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager {
             // See if could break before next area
             // TODO: do we need to set anything on the layout context?
             LayoutContext lc = new LayoutContext(0);
-            LayoutProcessor nextLM = getChildLM();
+            LayoutManager nextLM = getChildLM();
             return (nextLM == null || nextLM.canBreakBefore(lc));
         }
     }
@@ -658,7 +658,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager {
      * @param dSpaceAdjust the space adjustment
      */
     public void addAreas(PositionIterator parentIter, double dSpaceAdjust) {
-        LayoutProcessor childLM;
+        LayoutManager childLM;
         LayoutContext lc = new LayoutContext(0);
         while (parentIter.hasNext()) {
             LineBreakPosition lbp = (LineBreakPosition) parentIter.next();
index ee1179a4c0468d3e5494c38bf76a14c2e27e9a50..3b828a80cbdfffd0714ea5565c870a81cea3bdfe 100644 (file)
@@ -22,7 +22,7 @@ public class NonLeafPosition extends Position {
 
     private Position subPos;
 
-    public NonLeafPosition(LayoutProcessor lm, Position sub) {
+    public NonLeafPosition(LayoutManager lm, Position sub) {
         super(lm);
         subPos = sub;
     }
index ae7274148d58e1617d2085a505e14f7fb33805bc..84f0fe1217faf61e06894c06294c3938ad9afd0f 100644 (file)
@@ -69,7 +69,7 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable
     private static class BlockBreakPosition extends LeafPosition {
         protected BreakPoss breakps;
 
-        protected BlockBreakPosition(LayoutProcessor lm, BreakPoss bp) {
+        protected BlockBreakPosition(LayoutManager lm, BreakPoss bp) {
             super(lm, 0);
             breakps = bp;
         }
@@ -214,7 +214,7 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable
      */
     public BreakPoss getNextBreakPoss(LayoutContext context) {
 
-        LayoutProcessor curLM ; // currently active LM
+        LayoutManager curLM ; // currently active LM
 
         while ((curLM = getChildLM()) != null) {
             BreakPoss bp = null;
index d9537266f52a3efdcc844b14d9463a82aa71897f..8c03696375a62d2a966f6c27f36a4e8cd14e471e 100644 (file)
@@ -20,13 +20,13 @@ package org.apache.fop.layoutmgr;
 
 public class Position {
     
-    private LayoutProcessor layoutManager;
+    private LayoutManager layoutManager;
 
-    public Position(LayoutProcessor lm) {
+    public Position(LayoutManager lm) {
         layoutManager = lm;
     }
 
-    public LayoutProcessor getLM() {
+    public LayoutManager getLM() {
         return layoutManager;
     }
 
index f116dbeddc028e6132e979796dd0cabe9921110a..9a35fd695fa785a994c14642b2ad332021df656f 100644 (file)
@@ -25,7 +25,7 @@ public abstract class PositionIterator implements Iterator {
     
     private Iterator parentIter;
     private Object nextObj;
-    private LayoutProcessor childLM;
+    private LayoutManager childLM;
     private boolean bHasNext;
 
     PositionIterator(Iterator pIter) {
@@ -34,7 +34,7 @@ public abstract class PositionIterator implements Iterator {
         //checkNext();
     }
 
-    public LayoutProcessor getNextChildLM() {
+    public LayoutManager getNextChildLM() {
         // Move to next "segment" of iterator, ie: new childLM
         if (childLM == null && nextObj != null) {
             childLM = getLM(nextObj);
@@ -43,7 +43,7 @@ public abstract class PositionIterator implements Iterator {
         return childLM;
     }
 
-    protected abstract LayoutProcessor getLM(Object nextObj);
+    protected abstract LayoutManager getLM(Object nextObj);
 
     protected abstract Position getPos(Object nextObj);
 
@@ -57,7 +57,7 @@ public abstract class PositionIterator implements Iterator {
     }
 
     protected boolean checkNext() {
-        LayoutProcessor lm = getLM(nextObj);
+        LayoutManager lm = getLM(nextObj);
         if (childLM == null) {
             childLM = lm;
         } else if (childLM != lm) {
index cc7d89a1d584d044c6701998fb91bfdef9e6f8d7..b5fd4d50233dcd025a259e5076824b1e7f7dcad9 100644 (file)
@@ -28,7 +28,7 @@ import org.apache.fop.fo.flow.Marker;
  * LayoutManager for a block FO.
  */
 public class RetrieveMarkerLayoutManager extends AbstractLayoutManager {
-    private LayoutProcessor replaceLM = null;
+    private LayoutManager replaceLM = null;
     private boolean loaded = false;
     private String name;
     private int position;
@@ -94,7 +94,7 @@ public class RetrieveMarkerLayoutManager extends AbstractLayoutManager {
             if (marker != null) {
                 addLMVisitor.addLayoutManager(marker, list);
                 if (list.size() > 0) {
-                    replaceLM =  (LayoutProcessor)list.get(0);
+                    replaceLM =  (LayoutManager)list.get(0);
                     replaceLM.setParent(this);
                     replaceLM.initialize();
                     getLogger().debug("retrieved: " + replaceLM + ":" + list.size());
@@ -110,7 +110,7 @@ public class RetrieveMarkerLayoutManager extends AbstractLayoutManager {
      * This returns the current block container area
      * and creates it if required.
      *
-     * @see org.apache.fop.layoutmgr.LayoutProcessor#getParentArea(Area)
+     * @see org.apache.fop.layoutmgr.LayoutManager#getParentArea(Area)
      */
     public Area getParentArea(Area childArea) {
         return parentLM.getParentArea(childArea);
@@ -119,14 +119,14 @@ public class RetrieveMarkerLayoutManager extends AbstractLayoutManager {
     /**
      * Add the child to the block container.
      *
-     * @see org.apache.fop.layoutmgr.LayoutProcessor#addChild(Area)
+     * @see org.apache.fop.layoutmgr.LayoutManager#addChild(Area)
      */
     public void addChild(Area childArea) {
         parentLM.addChild(childArea);
     }
 
     /**
-     * @see org.apache.fop.layoutmgr.LayoutProcessor#resetPosition(Position)
+     * @see org.apache.fop.layoutmgr.LayoutManager#resetPosition(Position)
      */
     public void resetPosition(Position resetPos) {
         loadLM();
index 7f3ab81c2a3a678104aa69bec17548b61a6f025f..bbab0ca74cb64e612bec6693f6f136a57e5b9f3d 100644 (file)
@@ -46,12 +46,12 @@ public class StaticContentLayoutManager extends BlockStackingLayoutManager {
     }
 
     /**
-     * @see org.apache.fop.layoutmgr.LayoutProcessor#getNextBreakPoss(LayoutContext)
+     * @see org.apache.fop.layoutmgr.LayoutManager#getNextBreakPoss(LayoutContext)
      */
     public BreakPoss getNextBreakPoss(LayoutContext context) {
 
         // currently active LM
-        LayoutProcessor curLM;
+        LayoutManager curLM;
 
         while ((curLM = getChildLM()) != null) {
             // Make break positions and return page break
@@ -78,11 +78,11 @@ public class StaticContentLayoutManager extends BlockStackingLayoutManager {
     }
 
     /**
-     * @see org.apache.fop.layoutmgr.LayoutProcessor#addAreas(PositionIterator, LayoutContext)
+     * @see org.apache.fop.layoutmgr.LayoutManager#addAreas(PositionIterator, LayoutContext)
      */
     public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) {
 
-        LayoutProcessor childLM;
+        LayoutManager childLM;
         int iStartPos = 0;
         LayoutContext lc = new LayoutContext(0);
         while (parentIter.hasNext()) {
@@ -114,7 +114,7 @@ public class StaticContentLayoutManager extends BlockStackingLayoutManager {
     }
 
     /**
-     * @see org.apache.fop.layoutmgr.LayoutProcessor#getParentArea(Area)
+     * @see org.apache.fop.layoutmgr.LayoutManager#getParentArea(Area)
      */
     public Area getParentArea(Area childArea) {
         return region;
index eeb3945481214e97ed53f8416ba16fb64900aeeb..980f3e24f4394ed9827181eb42cc2f0a2ca7d639 100644 (file)
@@ -20,7 +20,7 @@ package org.apache.fop.layoutmgr.list;
 
 import org.apache.fop.fo.PropertyManager;
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
 import org.apache.fop.layoutmgr.LeafPosition;
 import org.apache.fop.layoutmgr.BreakPoss;
 import org.apache.fop.layoutmgr.LayoutContext;
@@ -76,7 +76,7 @@ public class Item extends BlockStackingLayoutManager {
      * @return the next break possibility
      */
     public BreakPoss getNextBreakPoss(LayoutContext context) {
-        LayoutProcessor curLM; // currently active LM
+        LayoutManager curLM; // currently active LM
 
         MinOptMax stackSize = new MinOptMax();
         // if starting add space before
@@ -106,7 +106,7 @@ public class Item extends BlockStackingLayoutManager {
                     if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
                         // reset to last break
                         if (lastPos != null) {
-                            LayoutProcessor lm = lastPos.getLayoutManager();
+                            LayoutManager lm = lastPos.getLayoutManager();
                             lm.resetPosition(lastPos.getPosition());
                             if (lm != curLM) {
                                 curLM.resetPosition(null);
@@ -166,7 +166,7 @@ public class Item extends BlockStackingLayoutManager {
         getParentArea(null);
         addID();
 
-        LayoutProcessor childLM;
+        LayoutManager childLM;
         int iStartPos = 0;
         LayoutContext lc = new LayoutContext(0);
         while (parentIter.hasNext()) {
index d058a3f4ff61c9c4e0c00c2fc12874340013f0e0..815242a05d521b2dcdecf23580dcae3d70b1d901 100644 (file)
@@ -20,7 +20,7 @@ package org.apache.fop.layoutmgr.list;
 
 import org.apache.fop.fo.PropertyManager;
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
 import org.apache.fop.layoutmgr.LeafPosition;
 import org.apache.fop.layoutmgr.BreakPoss;
 import org.apache.fop.layoutmgr.LayoutContext;
@@ -52,7 +52,7 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
 
     private class SectionPosition extends LeafPosition {
         protected List list;
-        protected SectionPosition(LayoutProcessor lm, int pos, List l) {
+        protected SectionPosition(LayoutManager lm, int pos, List l) {
             super(lm, pos);
             list = l;
         }
@@ -83,14 +83,14 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
      */
     public BreakPoss getNextBreakPoss(LayoutContext context) {
         // currently active LM
-        LayoutProcessor curLM;
+        LayoutManager curLM;
 
         MinOptMax stackSize = new MinOptMax();
         // if starting add space before
         // stackSize.add(spaceBefore);
         BreakPoss lastPos = null;
 
-        while ((curLM = (LayoutProcessor)getChildLM()) != null) {
+        while ((curLM = (LayoutManager)getChildLM()) != null) {
             // Make break positions
             // Set up a LayoutContext
             int ipd = context.getRefIPD();
@@ -108,7 +108,7 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
                     if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
                         // reset to last break
                         if (lastPos != null) {
-                            LayoutProcessor lm = lastPos.getLayoutManager();
+                            LayoutManager lm = lastPos.getLayoutManager();
                             lm.resetPosition(lastPos.getPosition());
                             if (lm != curLM) {
                                 curLM.resetPosition(null);
@@ -160,7 +160,7 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
 
         int listHeight = 0;
 
-        LayoutProcessor childLM;
+        LayoutManager childLM;
         int iStartPos = 0;
         LayoutContext lc = new LayoutContext(0);
         while (parentIter.hasNext()) {
@@ -170,7 +170,7 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
               new BreakPossPosIter(bodyBreaks, iStartPos,
                                    lfp.getLeafPos() + 1);
             iStartPos = lfp.getLeafPos() + 1;
-            while ((childLM = (LayoutProcessor)breakPosIter.getNextChildLM()) != null) {
+            while ((childLM = (LayoutManager)breakPosIter.getNextChildLM()) != null) {
                 childLM.addAreas(breakPosIter, lc);
             }
         }
index a23fd7e72abb343f8da2ebed66db860cbcc47f38..f2601d2305270a283c2751509bfcc1d0e72e4c9c 100644 (file)
@@ -20,7 +20,7 @@ package org.apache.fop.layoutmgr.list;
 
 import org.apache.fop.fo.PropertyManager;
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
 import org.apache.fop.layoutmgr.LeafPosition;
 import org.apache.fop.layoutmgr.BreakPoss;
 import org.apache.fop.layoutmgr.LayoutContext;
@@ -54,7 +54,7 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager {
 
     private class ItemPosition extends LeafPosition {
         protected List cellBreaks;
-        protected ItemPosition(LayoutProcessor lm, int pos, List l) {
+        protected ItemPosition(LayoutManager lm, int pos, List l) {
             super(lm, pos);
             cellBreaks = l;
         }
@@ -146,7 +146,7 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager {
                     if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
                         // reset to last break
                         if (lastPos != null) {
-                            LayoutProcessor lm = lastPos.getLayoutManager();
+                            LayoutManager lm = lastPos.getLayoutManager();
                             lm.resetPosition(lastPos.getPosition());
                             if (lm != curLM) {
                                 curLM.resetPosition(null);
index 940d912253aafc8b16e17e65747479cab2385ca5..ac44124f5b899f2192f5fd6594142bc43b1948c0 100644 (file)
@@ -19,7 +19,7 @@
 package org.apache.fop.layoutmgr.table;
 
 import org.apache.fop.fo.PropertyManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
 import org.apache.fop.layoutmgr.LeafPosition;
 import org.apache.fop.layoutmgr.BreakPoss;
@@ -121,7 +121,7 @@ public class Body extends BlockStackingLayoutManager {
                     if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
                         // reset to last break
                         if (lastPos != null) {
-                            LayoutProcessor lm = lastPos.getLayoutManager();
+                            LayoutManager lm = lastPos.getLayoutManager();
                             lm.resetPosition(lastPos.getPosition());
                             if (lm != curLM) {
                                 curLM.resetPosition(null);
index d23e217ae1d9386dc644eb0c7833861fcf771931..a811104ecf59833a03dfe702ca0ea62dda11f5e9 100644 (file)
@@ -19,7 +19,7 @@
 package org.apache.fop.layoutmgr.table;
 
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
 import org.apache.fop.layoutmgr.LeafPosition;
 import org.apache.fop.layoutmgr.BreakPoss;
 import org.apache.fop.layoutmgr.LayoutContext;
@@ -58,7 +58,7 @@ public class Caption extends BlockStackingLayoutManager {
      * @return the next break possibility
      */
     public BreakPoss getNextBreakPoss(LayoutContext context) {
-        LayoutProcessor curLM; // currently active LM
+        LayoutManager curLM; // currently active LM
 
         MinOptMax stackSize = new MinOptMax();
         // if starting add space before
@@ -89,7 +89,7 @@ public class Caption extends BlockStackingLayoutManager {
                     if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
                         // reset to last break
                         if (lastPos != null) {
-                            LayoutProcessor lm = lastPos.getLayoutManager();
+                            LayoutManager lm = lastPos.getLayoutManager();
                             lm.resetPosition(lastPos.getPosition());
                             if (lm != curLM) {
                                 curLM.resetPosition(null);
@@ -136,7 +136,7 @@ public class Caption extends BlockStackingLayoutManager {
         getParentArea(null);
         addID();
 
-        LayoutProcessor childLM;
+        LayoutManager childLM;
         int iStartPos = 0;
         LayoutContext lc = new LayoutContext(0);
         while (parentIter.hasNext()) {
index b1edb8a879f64fb8e28e94643682705d218dac9b..0819d0c94d3686ac5a8f36a922343b66b5e18be0 100644 (file)
@@ -20,7 +20,7 @@ package org.apache.fop.layoutmgr.table;
 
 import org.apache.fop.fo.PropertyManager;
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
 import org.apache.fop.layoutmgr.LeafPosition;
 import org.apache.fop.layoutmgr.BreakPoss;
 import org.apache.fop.layoutmgr.LayoutContext;
@@ -78,7 +78,7 @@ public class Cell extends BlockStackingLayoutManager {
      * @return the next break possibility
      */
     public BreakPoss getNextBreakPoss(LayoutContext context) {
-        LayoutProcessor curLM; // currently active LM
+        LayoutManager curLM; // currently active LM
 
         MinOptMax stackSize = new MinOptMax();
         // if starting add space before
@@ -108,7 +108,7 @@ public class Cell extends BlockStackingLayoutManager {
                     if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
                         // reset to last break
                         if (lastPos != null) {
-                            LayoutProcessor lm = lastPos.getLayoutManager();
+                            LayoutManager lm = lastPos.getLayoutManager();
                             lm.resetPosition(lastPos.getPosition());
                             if (lm != curLM) {
                                 curLM.resetPosition(null);
@@ -186,7 +186,7 @@ public class Cell extends BlockStackingLayoutManager {
         getParentArea(null);
         addID();
 
-        LayoutProcessor childLM;
+        LayoutManager childLM;
         int iStartPos = 0;
         LayoutContext lc = new LayoutContext(0);
         while (parentIter.hasNext()) {
index 1d4df5861f57ab1924f92019db7cfb34b5dd789b..eb6b2701c00dceb559c1f470cb7de8fdded7e3de 100644 (file)
@@ -20,7 +20,7 @@ package org.apache.fop.layoutmgr.table;
 
 import org.apache.fop.fo.PropertyManager;
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
 import org.apache.fop.layoutmgr.LeafPosition;
 import org.apache.fop.layoutmgr.BreakPoss;
 import org.apache.fop.layoutmgr.LayoutContext;
@@ -56,7 +56,7 @@ public class Row extends BlockStackingLayoutManager {
 
     private class RowPosition extends LeafPosition {
         protected List cellBreaks;
-        protected RowPosition(LayoutProcessor lm, int pos, List l) {
+        protected RowPosition(LayoutManager lm, int pos, List l) {
             super(lm, pos);
             cellBreaks = l;
         }
@@ -92,7 +92,7 @@ public class Row extends BlockStackingLayoutManager {
         cellList = new ArrayList();
         // add cells to list
         while (childLMiter.hasNext()) {
-            curChildLM = (LayoutProcessor) childLMiter.next();
+            curChildLM = (LayoutManager) childLMiter.next();
             curChildLM.setUserAgent(getUserAgent());
             curChildLM.setParent(this);
             curChildLM.initialize();
@@ -125,7 +125,7 @@ public class Row extends BlockStackingLayoutManager {
      * @return the next break possibility
      */
     public BreakPoss getNextBreakPoss(LayoutContext context) {
-        LayoutProcessor curLM; // currently active LM
+        LayoutManager curLM; // currently active LM
 
         BreakPoss lastPos = null;
         List breakList = new ArrayList();
@@ -166,7 +166,7 @@ public class Row extends BlockStackingLayoutManager {
                     if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
                         // reset to last break
                         if (lastPos != null) {
-                            LayoutProcessor lm = lastPos.getLayoutManager();
+                            LayoutManager lm = lastPos.getLayoutManager();
                             lm.resetPosition(lastPos.getPosition());
                             if (lm != curLM) {
                                 curLM.resetPosition(null);
@@ -237,7 +237,7 @@ public class Row extends BlockStackingLayoutManager {
      * If pos is null, then back up to the first child LM.
      */
     protected void reset(Position pos) {
-        LayoutProcessor curLM; // currently active LM
+        LayoutManager curLM; // currently active LM
         int cellcount = 0;
 
         if (pos == null) {
index b820f34a803147ef00f62ddaa611d8c07bbca743..d75d69bcdaebb2c130b3216443bf60dbfd8c0f93 100644 (file)
@@ -19,7 +19,7 @@
 package org.apache.fop.layoutmgr.table;
 
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
 import org.apache.fop.layoutmgr.LeafPosition;
 import org.apache.fop.layoutmgr.BreakPoss;
 import org.apache.fop.layoutmgr.LayoutContext;
@@ -60,7 +60,7 @@ public class TableAndCaptionLayoutManager extends BlockStackingLayoutManager {
      * @return the next break possibility
      */
     public BreakPoss getNextBreakPoss(LayoutContext context) {
-        LayoutProcessor curLM; // currently active LM
+        LayoutManager curLM; // currently active LM
 
         MinOptMax stackSize = new MinOptMax();
         // if starting add space before
@@ -90,7 +90,7 @@ public class TableAndCaptionLayoutManager extends BlockStackingLayoutManager {
                     if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
                         // reset to last break
                         if (lastPos != null) {
-                            LayoutProcessor lm = lastPos.getLayoutManager();
+                            LayoutManager lm = lastPos.getLayoutManager();
                             lm.resetPosition(lastPos.getPosition());
                             if (lm != curLM) {
                                 curLM.resetPosition(null);
@@ -137,7 +137,7 @@ public class TableAndCaptionLayoutManager extends BlockStackingLayoutManager {
         getParentArea(null);
         addID();
 
-        LayoutProcessor childLM;
+        LayoutManager childLM;
         int iStartPos = 0;
         LayoutContext lc = new LayoutContext(0);
         while (parentIter.hasNext()) {
index 4b0f378db1a719b3df322d44d3031d9575923ac7..75a22851496e218675fb3d7a8914a92ae767392b 100644 (file)
@@ -23,7 +23,7 @@ import org.apache.fop.datatypes.PercentBase;
 import org.apache.fop.fo.PropertyManager;
 import org.apache.fop.fo.properties.TableColLength;
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
-import org.apache.fop.layoutmgr.LayoutProcessor;
+import org.apache.fop.layoutmgr.LayoutManager;
 import org.apache.fop.layoutmgr.LeafPosition;
 import org.apache.fop.layoutmgr.BreakPoss;
 import org.apache.fop.layoutmgr.LayoutContext;
@@ -65,7 +65,7 @@ public class TableLayoutManager extends BlockStackingLayoutManager {
 
     private class SectionPosition extends LeafPosition {
         protected List list;
-        protected SectionPosition(LayoutProcessor lm, int pos, List l) {
+        protected SectionPosition(LayoutManager lm, int pos, List l) {
             super(lm, pos);
             list = l;
         }
@@ -197,7 +197,7 @@ public class TableLayoutManager extends BlockStackingLayoutManager {
                     if (stackSize.opt + bp.getStackingSize().opt > context.getStackLimit().max) {
                         // reset to last break
                         if (lastPos != null) {
-                            LayoutProcessor lm = lastPos.getLayoutManager();
+                            LayoutManager lm = lastPos.getLayoutManager();
                             lm.resetPosition(lastPos.getPosition());
                             if (lm != curLM) {
                                 curLM.resetPosition(null);