]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
PR:
authorGlen Mazza <gmazza@apache.org>
Thu, 18 Mar 2004 00:22:40 +0000 (00:22 +0000)
committerGlen Mazza <gmazza@apache.org>
Thu, 18 Mar 2004 00:22:40 +0000 (00:22 +0000)
Obtained from:
Submitted by:
Reviewed by:
Switch from init() to clearer initialize() in Layout classes; removed
unneeded logger reference in ContentLayoutManager.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197460 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
src/java/org/apache/fop/layoutmgr/AddLMVisitor.java
src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java
src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java
src/java/org/apache/fop/layoutmgr/LayoutProcessor.java
src/java/org/apache/fop/layoutmgr/LineLayoutManager.java
src/java/org/apache/fop/layoutmgr/PageLayoutManager.java
src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java
src/java/org/apache/fop/layoutmgr/table/Row.java

index a1e20cd7f94dd815053e61a32120a5d032d6a813..451db4ae3ac486ceb6d344394b42077ad9c74be3 100644 (file)
@@ -165,7 +165,7 @@ public abstract class AbstractLayoutManager implements LayoutProcessor, Constant
             curChildLM = (LayoutProcessor) childLMiter.next();
             curChildLM.setUserAgent(getUserAgent());
             curChildLM.setParent(this);
-            curChildLM.init();
+            curChildLM.initialize();
             return curChildLM;
         }
         return null;
@@ -222,10 +222,10 @@ public abstract class AbstractLayoutManager implements LayoutProcessor, Constant
 
 
     /**
-     * This method provides a hook for a LayoutManager to intialize traits
+     * This method provides a hook for a LayoutManager to initialize traits
      * for the areas it will create, based on Properties set on its FO.
      */
-    public void init() {
+    public void initialize() {
         if (fobj != null && bInited == false) {
             initProperties(fobj.getPropertyManager());
             bInited = true;
@@ -233,7 +233,7 @@ public abstract class AbstractLayoutManager implements LayoutProcessor, Constant
     }
 
     /**
-     * This method provides a hook for a LayoutManager to intialize traits
+     * This method provides a hook for a LayoutManager to initialize traits
      * for the areas it will create, based on Properties set on its FO.
      */
     protected void initProperties(PropertyManager pm) {
index 5670b4246ca357d15c75dee473903e4b1ad0c4cf..117bf4c314fbc8ef0614e387e6a399f84d7f808e 100644 (file)
@@ -369,7 +369,7 @@ public class AddLMVisitor implements FOTreeVisitor {
              lm.setUserAgent(node.getUserAgent());
              lm.setFObj(node);
              lm.setLMiter(new LMiter(lm, node.getChildren()));
-             lm.init();
+             lm.initialize();
 
              // get breaks then add areas to FilledArea
              FilledArea fa = new FilledArea();
index 0f352040b72680abadb90c9a3d22ffd43d681711..81829d3745e7a71e22527561ff3eb74b8bf89a9d 100644 (file)
@@ -25,8 +25,6 @@ import org.apache.fop.area.Area;
 import org.apache.fop.area.Resolveable;
 import org.apache.fop.area.PageViewport;
 
-import org.apache.avalon.framework.logger.Logger;
-
 import java.util.List;
 import java.util.Map;
 import java.util.ArrayList;
@@ -163,14 +161,6 @@ public class ContentLayoutManager implements LayoutProcessor {
         return userAgent;
     }
 
-    /**
-     * Returns the logger
-     * @return the logger
-     */
-    protected Logger getLogger() {
-        return userAgent.getLogger();
-    }
-
     /** @see org.apache.fop.layoutmgr.LayoutManager */
     public void setParent(LayoutProcessor lm) {
         parentLM = lm;
@@ -208,7 +198,7 @@ public class ContentLayoutManager implements LayoutProcessor {
     public void addAreas(PositionIterator posIter, LayoutContext context) { }
 
     /** @see org.apache.fop.layoutmgr.LayoutManager */
-    public void init() {
+    public void initialize() {
         //to be done
     }
 
index dad27c6e6fa15300ca347566f249e32983f2def7..4084d0430f87d413e309d5e05cf0aa7c713d7f7b 100644 (file)
@@ -100,8 +100,6 @@ public class LayoutManagerLS extends LayoutStrategy {
      * @return the Title area
      */
     public org.apache.fop.area.Title getTitleArea(org.apache.fop.fo.pagination.Title foTitle) {
-        org.apache.fop.area.Title title =
-                 new org.apache.fop.area.Title();
         // use special layout manager to add the inline areas
         // to the Title.
         InlineStackingLayoutManager lm;
@@ -109,9 +107,11 @@ public class LayoutManagerLS extends LayoutStrategy {
         lm.setUserAgent(foTitle.getUserAgent());
         lm.setFObj(foTitle);
         lm.setLMiter(new LMiter(lm, foTitle.children.listIterator()));
-        lm.init();
+        lm.initialize();
 
         // get breaks then add areas to title
+        org.apache.fop.area.Title title =
+                 new org.apache.fop.area.Title();
 
         ContentLayoutManager clm = new ContentLayoutManager(title);
         clm.setUserAgent(foTitle.getUserAgent());
index 0e53f2cab5b94cff4117f7be4340b3e076b6f771..92a3ed92329255d6f725c96688f65fbf59da57e3 100644 (file)
@@ -54,9 +54,9 @@ public interface LayoutProcessor extends LayoutManager {
     LayoutManagerLS getLayoutManagerLS();
 
     /**
-     * Initialise this layout manager.
+     * Initialize this layout manager.
      */
-    void init();
+    void initialize();
 
     /**
      * Generates inline areas.
index 281f9674d48fec56526d1fffb90c6020a40a279c..0675e3fdbe259226d78bd96baf91da637e318b82 100644 (file)
@@ -102,7 +102,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager {
         lineHeight = lh;
         lead = l;
         follow = f;
-        init(); // Normally done when started by parent!
+        initialize(); // Normally done when started by parent!
     }
 
     /**
index 5687ca127815928236de147acf13f96df165d36d..ae7274148d58e1617d2085a505e14f7fb33805bc 100644 (file)
@@ -462,7 +462,7 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable
         }
         StaticContentLayoutManager lm = getStaticContentLayoutManager(flow);
         lm.setUserAgent(getUserAgent());
-        lm.init();
+        lm.initialize();
         lm.setRegionReference(reg.getRegion());
         lm.setParent(this);
         LayoutContext childLC = new LayoutContext(0);
index e2be8c90bd5c7cec17c3e7a64ea1887fb000610d..cc7d89a1d584d044c6701998fb91bfdef9e6f8d7 100644 (file)
@@ -96,7 +96,7 @@ public class RetrieveMarkerLayoutManager extends AbstractLayoutManager {
                 if (list.size() > 0) {
                     replaceLM =  (LayoutProcessor)list.get(0);
                     replaceLM.setParent(this);
-                    replaceLM.init();
+                    replaceLM.initialize();
                     getLogger().debug("retrieved: " + replaceLM + ":" + list.size());
                 } else {
                     getLogger().debug("found no marker with name: " + name);
index 6c4c5f90a7dec033d66e46a6e10520fae07c68b5..1d4df5861f57ab1924f92019db7cfb34b5dd789b 100644 (file)
@@ -95,7 +95,7 @@ public class Row extends BlockStackingLayoutManager {
             curChildLM = (LayoutProcessor) childLMiter.next();
             curChildLM.setUserAgent(getUserAgent());
             curChildLM.setParent(this);
-            curChildLM.init();
+            curChildLM.initialize();
             cellList.add(curChildLM);
         }
     }