From db2d75472a1d9ec06e1533a8a6c1057866e05637 Mon Sep 17 00:00:00 2001 From: Glen Mazza Date: Sat, 15 May 2004 21:52:00 +0000 Subject: [PATCH] PR: Obtained from: Submitted by: Reviewed by: Moved FOUserAgent, FObj initialization from AddLMVisitor to constructors of respective LayoutManagers. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197602 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/fo/flow/TableColumn.java | 8 +- .../fop/layoutmgr/AbstractLayoutManager.java | 1 + .../apache/fop/layoutmgr/AddLMVisitor.java | 92 +++++-------------- .../BlockContainerLayoutManager.java | 8 ++ .../fop/layoutmgr/BlockLayoutManager.java | 4 +- .../layoutmgr/BlockStackingLayoutManager.java | 5 + .../fop/layoutmgr/FlowLayoutManager.java | 4 +- .../apache/fop/layoutmgr/ICLayoutManager.java | 4 +- .../InlineStackingLayoutManager.java | 14 ++- .../apache/fop/layoutmgr/LayoutManager.java | 3 +- .../apache/fop/layoutmgr/LayoutManagerLS.java | 6 +- .../fop/layoutmgr/LeafNodeLayoutManager.java | 9 ++ .../fop/layoutmgr/LineLayoutManager.java | 4 +- .../fop/layoutmgr/PageLayoutManager.java | 1 + .../RetrieveMarkerLayoutManager.java | 11 ++- .../org/apache/fop/layoutmgr/list/Item.java | 4 +- .../list/ListBlockLayoutManager.java | 4 +- .../layoutmgr/list/ListItemLayoutManager.java | 4 +- .../org/apache/fop/layoutmgr/table/Body.java | 4 +- .../org/apache/fop/layoutmgr/table/Cell.java | 4 +- .../apache/fop/layoutmgr/table/Column.java | 10 +- .../org/apache/fop/layoutmgr/table/Row.java | 4 +- .../layoutmgr/table/TableLayoutManager.java | 4 +- 23 files changed, 104 insertions(+), 108 deletions(-) diff --git a/src/java/org/apache/fop/fo/flow/TableColumn.java b/src/java/org/apache/fop/fo/flow/TableColumn.java index f3c31978d..7003bc4d7 100644 --- a/src/java/org/apache/fop/fo/flow/TableColumn.java +++ b/src/java/org/apache/fop/fo/flow/TableColumn.java @@ -45,7 +45,7 @@ public class TableColumn extends FObj { private int numColumnsRepeated; private int iColumnNumber; - private boolean setup = false; + private boolean initialized = false; /** * @param parent FONode that is the parent of this object @@ -75,7 +75,7 @@ public class TableColumn extends FObj { return numColumnsRepeated; } - public void doSetup() { + public void initialize() { // Common Border, Padding, and Background Properties // only background apply, border apply if border-collapse @@ -101,7 +101,7 @@ public class TableColumn extends FObj { // initialize id setupID(); - setup = true; + initialized = true; } /** @@ -121,7 +121,7 @@ public class TableColumn extends FObj { */ public void handleAttrs(Attributes attlist) throws FOPException { super.handleAttrs(attlist); - doSetup(); // init some basic property values + initialize(); // init some basic property values getFOTreeControl().getFOInputHandler().startColumn(this); } diff --git a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java index 0f5d51542..3f6e9e0e6 100644 --- a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java @@ -67,6 +67,7 @@ public abstract class AbstractLayoutManager implements LayoutManager, Constants */ public AbstractLayoutManager(FObj fo) { setFObj(fo); + setUserAgent(fo.getUserAgent()); } /** diff --git a/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java b/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java index 990dbafe6..c60144072 100644 --- a/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java +++ b/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java @@ -187,9 +187,7 @@ public class AddLMVisitor implements FOTreeVisitor { public void serveFObjMixed(FObjMixed node) { if (node.getChildren() != null) { InlineStackingLayoutManager lm; - lm = new InlineStackingLayoutManager(); - lm.setUserAgent(node.getUserAgent()); - lm.setFObj(node); + lm = new InlineStackingLayoutManager(node); lm.setLMiter(new LMiter(lm, node.getChildren())); currentLMList.add(lm); } @@ -238,9 +236,7 @@ public class AddLMVisitor implements FOTreeVisitor { currentLMList = childList; serveFObj((FObj)node); currentLMList = saveLMList; - LayoutManager lm = new ICLayoutManager(childList); - lm.setUserAgent(node.getUserAgent()); - lm.setFObj(node); + LayoutManager lm = new ICLayoutManager(node, childList); currentLMList.add(lm); } @@ -250,15 +246,13 @@ public class AddLMVisitor implements FOTreeVisitor { public void serveBasicLink(final BasicLink node) { node.setup(); InlineStackingLayoutManager lm; - lm = new InlineStackingLayoutManager() { + lm = new InlineStackingLayoutManager(node) { protected InlineParent createArea() { InlineParent area = super.createArea(); setupBasicLinkArea(node, parentLM, area); return area; } }; - lm.setUserAgent(node.getUserAgent()); - lm.setFObj(node); lm.setLMiter(new LMiter(lm, node.getChildren())); currentLMList.add(lm); } @@ -287,7 +281,7 @@ public class AddLMVisitor implements FOTreeVisitor { } public void serveLeader(final Leader node) { - LeafNodeLayoutManager lm = new LeafNodeLayoutManager() { + LeafNodeLayoutManager lm = new LeafNodeLayoutManager(node) { public InlineArea get(LayoutContext context) { return getLeaderInlineArea(node, this); } @@ -302,8 +296,6 @@ public class AddLMVisitor implements FOTreeVisitor { } }*/ }; - lm.setUserAgent(node.getUserAgent()); - lm.setFObj(node); lm.setAlignment(node.propertyList.get(Constants.PR_LEADER_ALIGNMENT).getEnum()); currentLMList.add(lm); } @@ -360,9 +352,7 @@ public class AddLMVisitor implements FOTreeVisitor { return null; } InlineStackingLayoutManager lm; - lm = new InlineStackingLayoutManager(); - lm.setUserAgent(node.getUserAgent()); - lm.setFObj(node); + lm = new InlineStackingLayoutManager(node); lm.setLMiter(new LMiter(lm, node.getChildren())); lm.initialize(); @@ -393,20 +383,14 @@ public class AddLMVisitor implements FOTreeVisitor { public void serveRetrieveMarker(RetrieveMarker node) { RetrieveMarkerLayoutManager rmlm; - rmlm = new RetrieveMarkerLayoutManager(node.getRetrieveClassName(), - node.getRetrievePosition(), - node.getRetrieveBoundary()); - rmlm.setUserAgent(node.getUserAgent()); - rmlm.setFObj(node); + rmlm = new RetrieveMarkerLayoutManager(node); currentLMList.add(rmlm); } public void serveCharacter(Character node) { InlineArea inline = getCharacterInlineArea(node); if (inline != null) { - LeafNodeLayoutManager lm = new LeafNodeLayoutManager(); - lm.setUserAgent(node.getUserAgent()); - lm.setFObj(node); + LeafNodeLayoutManager lm = new LeafNodeLayoutManager(node); lm.setCurrentArea(inline); currentLMList.add(lm); } @@ -431,9 +415,7 @@ public class AddLMVisitor implements FOTreeVisitor { InlineArea area = getExternalGraphicInlineArea(node); if (area != null) { node.setupID(); - LeafNodeLayoutManager lm = new LeafNodeLayoutManager(); - lm.setUserAgent(node.getUserAgent()); - lm.setFObj(node); + LeafNodeLayoutManager lm = new LeafNodeLayoutManager(node); lm.setCurrentArea(area); lm.setAlignment(node.propertyList.get(Constants.PR_VERTICAL_ALIGN).getEnum()); lm.setLead(node.getViewHeight()); @@ -470,26 +452,20 @@ public class AddLMVisitor implements FOTreeVisitor { } public void serveBlockContainer(BlockContainer node) { - BlockContainerLayoutManager blm = new BlockContainerLayoutManager(); - blm.setUserAgent(node.getUserAgent()); - blm.setFObj(node); + BlockContainerLayoutManager blm = new BlockContainerLayoutManager(node); blm.setOverflow(node.propertyList.get(Constants.PR_OVERFLOW).getEnum()); currentLMList.add(blm); } public void serveListBlock(ListBlock node) { - ListBlockLayoutManager blm = new ListBlockLayoutManager(); - blm.setUserAgent(node.getUserAgent()); - blm.setFObj(node); + ListBlockLayoutManager blm = new ListBlockLayoutManager(node); currentLMList.add(blm); } public void serveInstreamForeignObject(InstreamForeignObject node) { Viewport areaCurrent = getInstreamForeignObjectInlineArea(node); if (areaCurrent != null) { - LeafNodeLayoutManager lm = new LeafNodeLayoutManager(); - lm.setUserAgent(node.getUserAgent()); - lm.setFObj(node); + LeafNodeLayoutManager lm = new LeafNodeLayoutManager(node); lm.setCurrentArea(areaCurrent); lm.setAlignment(node.propertyList.get(Constants.PR_VERTICAL_ALIGN).getEnum()); lm.setLead(areaCurrent.getHeight()); @@ -649,9 +625,7 @@ public class AddLMVisitor implements FOTreeVisitor { public void serveListItem(ListItem node) { if (node.getLabel() != null && node.getBody() != null) { - ListItemLayoutManager blm = new ListItemLayoutManager(); - blm.setUserAgent(node.getUserAgent()); - blm.setFObj(node); + ListItemLayoutManager blm = new ListItemLayoutManager(node); blm.setLabel(getListItemLabelLayoutManager(node.getLabel())); blm.setBody(getListItemBodyLayoutManager(node.getBody())); currentLMList.add(blm); @@ -664,9 +638,7 @@ public class AddLMVisitor implements FOTreeVisitor { * @return this object's Item layout manager */ public Item getListItemLabelLayoutManager(ListItemLabel node) { - Item itemLabel = new Item(); - itemLabel.setUserAgent(node.getUserAgent()); - itemLabel.setFObj(node); + Item itemLabel = new Item(node); return itemLabel; } @@ -674,9 +646,7 @@ public class AddLMVisitor implements FOTreeVisitor { * @return Item layout manager */ public Item getListItemBodyLayoutManager(ListItemBody node) { - Item item = new Item(); - item.setUserAgent(node.getUserAgent()); - item.setFObj(node); + Item item = new Item(node); return item; } @@ -687,7 +657,7 @@ public class AddLMVisitor implements FOTreeVisitor { public void servePageNumber(final PageNumber node) { node.setup(); LayoutManager lm; - lm = new LeafNodeLayoutManager() { + lm = new LeafNodeLayoutManager(node) { public InlineArea get(LayoutContext context) { // get page string from parent, build area TextArea inline = new TextArea(); @@ -715,15 +685,13 @@ public class AddLMVisitor implements FOTreeVisitor { curArea.setOffset(context.getBaseline()); } }; - lm.setUserAgent(node.getUserAgent()); - lm.setFObj(node); currentLMList.add(lm); } public void servePageNumberCitation(final PageNumberCitation node) { node.setup(); LayoutManager lm; - lm = new LeafNodeLayoutManager() { + lm = new LeafNodeLayoutManager(node) { public InlineArea get(LayoutContext context) { curArea = getPageNumberCitationInlineArea(node, parentLM); return curArea; @@ -742,8 +710,6 @@ public class AddLMVisitor implements FOTreeVisitor { curArea.setOffset(context.getBaseline()); } }; - lm.setUserAgent(node.getUserAgent()); - lm.setFObj(node); currentLMList.add(lm); } @@ -791,9 +757,7 @@ public class AddLMVisitor implements FOTreeVisitor { } public void serveTable(Table node) { - TableLayoutManager tlm = new TableLayoutManager(); - tlm.setUserAgent(node.getUserAgent()); - tlm.setFObj(node); + TableLayoutManager tlm = new TableLayoutManager(node); ArrayList columns = node.getColumns(); if (columns != null) { ArrayList columnLMs = new ArrayList(); @@ -813,10 +777,8 @@ public class AddLMVisitor implements FOTreeVisitor { } public LayoutManager getTableColumnLayoutManager(TableColumn node) { - node.doSetup(); - Column clm = new Column(); - clm.setUserAgent(node.getUserAgent()); - clm.setFObj(node); + node.initialize(); + Column clm = new Column(node); return clm; } @@ -825,30 +787,22 @@ public class AddLMVisitor implements FOTreeVisitor { } public Body getTableBodyLayoutManager(TableBody node) { - Body blm = new Body(); - blm.setUserAgent(node.getUserAgent()); - blm.setFObj(node); + Body blm = new Body(node); return blm; } public void serveTableCell(TableCell node) { - Cell clm = new Cell(); - clm.setUserAgent(node.getUserAgent()); - clm.setFObj(node); + Cell clm = new Cell(node); currentLMList.add(clm); } public void serveTableRow(TableRow node) { - Row rlm = new Row(); - rlm.setUserAgent(node.getUserAgent()); - rlm.setFObj(node); + Row rlm = new Row(node); currentLMList.add(rlm); } public void serveFlow(Flow node) { - FlowLayoutManager lm = new FlowLayoutManager(); - lm.setUserAgent(node.getUserAgent()); - lm.setFObj(node); + FlowLayoutManager lm = new FlowLayoutManager(node); currentLMList.add(lm); } diff --git a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java index 156d6efee..b2166b8c0 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java @@ -24,6 +24,7 @@ import java.awt.geom.Rectangle2D; import org.apache.fop.area.Area; import org.apache.fop.area.BlockViewport; import org.apache.fop.area.Block; +import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyManager; import org.apache.fop.fo.properties.CommonAbsolutePosition; import org.apache.fop.fo.properties.CommonBorderAndPadding; @@ -65,6 +66,13 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager { public BlockContainerLayoutManager() { } + /** + * Create a new block container layout manager. + */ + public BlockContainerLayoutManager(FObj node) { + super(node); + } + public void setOverflow(int of) { overflow = of; } diff --git a/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java index 3929fc4cb..2d2e287fc 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java @@ -131,10 +131,8 @@ public class BlockLayoutManager extends BlockStackingLayoutManager { } } LineLayoutManager child; - child = new LineLayoutManager(lineHeight, + child = new LineLayoutManager(fobj, lineHeight, lead, follow); - child.setUserAgent(getUserAgent()); - child.setFObj(fobj); child.setLMiter(inlines.listIterator()); return child; diff --git a/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java index bb2881c11..9bbae2857 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java @@ -21,6 +21,7 @@ package org.apache.fop.layoutmgr; import org.apache.fop.area.Area; import org.apache.fop.area.BlockParent; import org.apache.fop.area.Block; +import org.apache.fop.fo.FObj; import org.apache.fop.traits.MinOptMax; /** @@ -38,6 +39,10 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager { public BlockStackingLayoutManager() { } + public BlockStackingLayoutManager(FObj node) { + super(node); + } + private BreakCost evaluateBreakCost(Area parent, Area child) { return new BreakCost(child, 0); } diff --git a/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java b/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java index ae47270a7..c78bed7f5 100644 --- a/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java @@ -18,6 +18,7 @@ package org.apache.fop.layoutmgr; +import org.apache.fop.fo.FObj; import org.apache.fop.fo.flow.Marker; import org.apache.fop.area.Area; import org.apache.fop.area.BlockParent; @@ -46,7 +47,8 @@ public class FlowLayoutManager extends BlockStackingLayoutManager { * This is the top level layout manager. * It is created by the PageSequence FO. */ - public FlowLayoutManager() { + public FlowLayoutManager(FObj node) { + super(node); } /** diff --git a/src/java/org/apache/fop/layoutmgr/ICLayoutManager.java b/src/java/org/apache/fop/layoutmgr/ICLayoutManager.java index 4e7ccb41c..b35346e98 100644 --- a/src/java/org/apache/fop/layoutmgr/ICLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/ICLayoutManager.java @@ -23,6 +23,7 @@ import java.util.List; // FOP import org.apache.fop.area.inline.InlineArea; +import org.apache.fop.fo.FObj; /** * This creates a single inline container area after @@ -33,7 +34,8 @@ public class ICLayoutManager extends LeafNodeLayoutManager { private List childrenLM; - ICLayoutManager(List childLM) { + ICLayoutManager(FObj node, List childLM) { + super(node); childrenLM = childLM; } diff --git a/src/java/org/apache/fop/layoutmgr/InlineStackingLayoutManager.java b/src/java/org/apache/fop/layoutmgr/InlineStackingLayoutManager.java index a05261828..3cb4f3b96 100644 --- a/src/java/org/apache/fop/layoutmgr/InlineStackingLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/InlineStackingLayoutManager.java @@ -87,13 +87,21 @@ public class InlineStackingLayoutManager extends AbstractLayoutManager { * Create an inline stacking layout manager. * This is used for fo's that create areas that * contain inline areas. - * - * @param fobj the formatting object that creates the area - * @param childLMiter the iterator for child areas */ public InlineStackingLayoutManager() { } + /** + * Create an inline stacking layout manager. + * This is used for fo's that create areas that + * contain inline areas. + * + * @param node the formatting object that creates the area + */ + public InlineStackingLayoutManager(FObj node) { + super(node); + } + /** * Set the FO object for this layout manager * diff --git a/src/java/org/apache/fop/layoutmgr/LayoutManager.java b/src/java/org/apache/fop/layoutmgr/LayoutManager.java index 88005e64c..c4662164d 100644 --- a/src/java/org/apache/fop/layoutmgr/LayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/LayoutManager.java @@ -43,8 +43,7 @@ public interface LayoutManager { void setFObj(FObj obj); /** - * Set the user agent. For resolving user agent values - * and getting logger. + * Set the user agent. For resolving user agent values. * * @param ua the user agent */ diff --git a/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java b/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java index 859ae5ff1..6426bdc69 100644 --- a/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java +++ b/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java @@ -71,8 +71,6 @@ public class LayoutManagerLS extends LayoutStrategy { // This will layout pages and add them to the area tree PageLayoutManager pageLM = new PageLayoutManager(areaTree, pageSeq, this); - pageLM.setUserAgent(pageSeq.getUserAgent()); - pageLM.setFObj(pageSeq); pageLM.setPageCounting(pageSeq.getCurrentPageNumber(), pageSeq.getPageNumberGenerator()); @@ -102,9 +100,7 @@ public class LayoutManagerLS extends LayoutStrategy { // use special layout manager to add the inline areas // to the Title. InlineStackingLayoutManager lm; - lm = new InlineStackingLayoutManager(); - lm.setUserAgent(foTitle.getUserAgent()); - lm.setFObj(foTitle); + lm = new InlineStackingLayoutManager(foTitle); lm.setLMiter(new LMiter(lm, foTitle.children.listIterator())); lm.initialize(); diff --git a/src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java b/src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java index ff0f3a0b2..61952e9e2 100644 --- a/src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java @@ -20,6 +20,7 @@ package org.apache.fop.layoutmgr; import org.apache.fop.area.Area; import org.apache.fop.area.inline.InlineArea; +import org.apache.fop.fo.FObj; import org.apache.fop.traits.MinOptMax; /** @@ -38,6 +39,14 @@ public class LeafNodeLayoutManager extends AbstractLayoutManager { private int lead; private MinOptMax ipd; + /** + * Create a Leaf node layout mananger. + * @param node the FObj to attach to this LM. + */ + public LeafNodeLayoutManager(FObj node) { + super(node); + } + /** * Create a Leaf node layout mananger. */ diff --git a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java index a511c2cb3..a5ad82a8b 100644 --- a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java @@ -19,6 +19,7 @@ package org.apache.fop.layoutmgr; import org.apache.fop.datatypes.Length; +import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyManager; import org.apache.fop.fo.properties.CommonMarginBlock; import org.apache.fop.fo.properties.CommonHyphenation; @@ -98,7 +99,8 @@ public class LineLayoutManager extends InlineStackingLayoutManager { * @param l the default lead, from top to baseline * @param f the default follow, from baseline to bottom */ - public LineLayoutManager(int lh, int l, int f) { + public LineLayoutManager(FObj node, int lh, int l, int f) { + super(node); lineHeight = lh; lead = l; follow = f; diff --git a/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java b/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java index b5711cb14..8313563d7 100644 --- a/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java @@ -132,6 +132,7 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable */ public PageLayoutManager(AreaTree areaTree, PageSequence pageseq, LayoutManagerLS lmls) { + super(pageseq); this.areaTree = areaTree; pageSequence = pageseq; this.lmls = lmls; diff --git a/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java index 1675d875f..f66962afc 100644 --- a/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java @@ -22,7 +22,9 @@ import java.util.ArrayList; import java.util.List; import org.apache.fop.area.Area; +import org.apache.fop.fo.FObj; import org.apache.fop.fo.flow.Marker; +import org.apache.fop.fo.flow.RetrieveMarker; /** * LayoutManager for a block FO. @@ -38,10 +40,11 @@ public class RetrieveMarkerLayoutManager extends AbstractLayoutManager { /** * Create a new block container layout manager. */ - public RetrieveMarkerLayoutManager(String n, int pos, int bound) { - name = n; - position = pos; - boundary = bound; + public RetrieveMarkerLayoutManager(RetrieveMarker node) { + super(node); + name = node.getRetrieveClassName(); + position = node.getRetrievePosition(); + boundary = node.getRetrieveBoundary(); } public boolean generatesInlineAreas() { diff --git a/src/java/org/apache/fop/layoutmgr/list/Item.java b/src/java/org/apache/fop/layoutmgr/list/Item.java index 980f3e24f..9ba9d9f56 100644 --- a/src/java/org/apache/fop/layoutmgr/list/Item.java +++ b/src/java/org/apache/fop/layoutmgr/list/Item.java @@ -18,6 +18,7 @@ package org.apache.fop.layoutmgr.list; +import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyManager; import org.apache.fop.layoutmgr.BlockStackingLayoutManager; import org.apache.fop.layoutmgr.LayoutManager; @@ -56,7 +57,8 @@ public class Item extends BlockStackingLayoutManager { /** * Create a new Cell layout manager. */ - public Item() { + public Item(FObj node) { + super(node); } /** diff --git a/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java b/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java index 815242a05..92b46dcce 100644 --- a/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java @@ -18,6 +18,7 @@ package org.apache.fop.layoutmgr.list; +import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyManager; import org.apache.fop.layoutmgr.BlockStackingLayoutManager; import org.apache.fop.layoutmgr.LayoutManager; @@ -62,7 +63,8 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager { * Create a new table layout manager. * */ - public ListBlockLayoutManager() { + public ListBlockLayoutManager(FObj node) { + super(node); } /** diff --git a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java index f2601d230..3f10d7526 100644 --- a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java @@ -18,6 +18,7 @@ package org.apache.fop.layoutmgr.list; +import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyManager; import org.apache.fop.layoutmgr.BlockStackingLayoutManager; import org.apache.fop.layoutmgr.LayoutManager; @@ -64,7 +65,8 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager { * Create a new list item layout manager. * */ - public ListItemLayoutManager() { + public ListItemLayoutManager(FObj node) { + super(node); } /** diff --git a/src/java/org/apache/fop/layoutmgr/table/Body.java b/src/java/org/apache/fop/layoutmgr/table/Body.java index 4ba9a7062..59a0ec0ce 100644 --- a/src/java/org/apache/fop/layoutmgr/table/Body.java +++ b/src/java/org/apache/fop/layoutmgr/table/Body.java @@ -18,6 +18,7 @@ package org.apache.fop.layoutmgr.table; +import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyManager; import org.apache.fop.layoutmgr.LayoutManager; import org.apache.fop.layoutmgr.BlockStackingLayoutManager; @@ -59,7 +60,8 @@ public class Body extends BlockStackingLayoutManager { /** * Create a new body layout manager. */ - public Body() { + public Body(FObj node) { + super(node); } /** diff --git a/src/java/org/apache/fop/layoutmgr/table/Cell.java b/src/java/org/apache/fop/layoutmgr/table/Cell.java index 9d39d058a..75aa16ed9 100644 --- a/src/java/org/apache/fop/layoutmgr/table/Cell.java +++ b/src/java/org/apache/fop/layoutmgr/table/Cell.java @@ -18,6 +18,7 @@ package org.apache.fop.layoutmgr.table; +import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyManager; import org.apache.fop.layoutmgr.BlockStackingLayoutManager; import org.apache.fop.layoutmgr.LayoutManager; @@ -58,7 +59,8 @@ public class Cell extends BlockStackingLayoutManager { /** * Create a new Cell layout manager. */ - public Cell() { + public Cell(FObj node) { + super(node); } /** diff --git a/src/java/org/apache/fop/layoutmgr/table/Column.java b/src/java/org/apache/fop/layoutmgr/table/Column.java index c436d2e7f..662394e8f 100644 --- a/src/java/org/apache/fop/layoutmgr/table/Column.java +++ b/src/java/org/apache/fop/layoutmgr/table/Column.java @@ -45,14 +45,8 @@ public class Column extends AbstractLayoutManager { /** * Create a new column layout manager. */ - public Column() { - } - - /** - * @see org.apache.fop.layoutmgr.LayoutManager#setFObj(FObj) - */ - public void setFObj(FObj fobj) { - super.setFObj(fobj); + public Column(FObj node) { + super(node); } /** diff --git a/src/java/org/apache/fop/layoutmgr/table/Row.java b/src/java/org/apache/fop/layoutmgr/table/Row.java index eb6b2701c..5ae91879f 100644 --- a/src/java/org/apache/fop/layoutmgr/table/Row.java +++ b/src/java/org/apache/fop/layoutmgr/table/Row.java @@ -18,6 +18,7 @@ package org.apache.fop.layoutmgr.table; +import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyManager; import org.apache.fop.layoutmgr.BlockStackingLayoutManager; import org.apache.fop.layoutmgr.LayoutManager; @@ -66,7 +67,8 @@ public class Row extends BlockStackingLayoutManager { * Create a new row layout manager. * */ - public Row() { + public Row(FObj node) { + super(node); } /** diff --git a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java index 7b6189c6e..fa464aea7 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java @@ -20,6 +20,7 @@ package org.apache.fop.layoutmgr.table; import org.apache.fop.datatypes.Length; import org.apache.fop.datatypes.PercentBase; +import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyManager; import org.apache.fop.fo.properties.TableColLength; import org.apache.fop.layoutmgr.BlockStackingLayoutManager; @@ -75,7 +76,8 @@ public class TableLayoutManager extends BlockStackingLayoutManager { * Create a new table layout manager. * */ - public TableLayoutManager() { + public TableLayoutManager(FObj node) { + super(node); } /** -- 2.39.5