From: Glen Mazza Date: Wed, 16 Mar 2005 23:18:43 +0000 (+0000) Subject: Changed from addChild(Area) to clearer addChildArea(Area). X-Git-Tag: Root_Temp_KnuthStylePageBreaking~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5581e549ee6a33bf2b8c5ca920f0c9a4afbaa31a;p=xmlgraphics-fop.git Changed from addChild(Area) to clearer addChildArea(Area). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198499 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/area/Area.java b/src/java/org/apache/fop/area/Area.java index e8848dc7b..da00665d2 100644 --- a/src/java/org/apache/fop/area/Area.java +++ b/src/java/org/apache/fop/area/Area.java @@ -305,7 +305,7 @@ public class Area implements Serializable { * * @param child the child area to add */ - public void addChild(Area child) { + public void addChildArea(Area child) { } /** diff --git a/src/java/org/apache/fop/area/LineArea.java b/src/java/org/apache/fop/area/LineArea.java index 2a0896821..12a5fb61c 100644 --- a/src/java/org/apache/fop/area/LineArea.java +++ b/src/java/org/apache/fop/area/LineArea.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 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. @@ -46,7 +46,7 @@ public class LineArea extends Area { * * @param childArea the inline child area to add */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { if (childArea instanceof InlineArea) { addInlineArea((InlineArea)childArea); } diff --git a/src/java/org/apache/fop/area/inline/InlineParent.java b/src/java/org/apache/fop/area/inline/InlineParent.java index f40dda2df..464c8e73d 100644 --- a/src/java/org/apache/fop/area/inline/InlineParent.java +++ b/src/java/org/apache/fop/area/inline/InlineParent.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 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. @@ -49,7 +49,7 @@ public class InlineParent extends InlineArea { * * @param childArea the child area to add */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { if (childArea instanceof InlineArea) { inlines.add(childArea); increaseIPD(((InlineArea) childArea).getAllocIPD()); diff --git a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java index ceb8184ac..9456b58e3 100644 --- a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java @@ -133,7 +133,7 @@ public abstract class AbstractLayoutManager implements LayoutManager, Constants // protected void flush(Area area, boolean bFinished) { // if (area != null) { // // area.setFinished(true); - // parentLM.addChild(area, bFinished); // ???? + // parentLM.addChildArea(area, bFinished); // ???? // if (bFinished) { // setCurrentArea(null); // } @@ -306,7 +306,7 @@ public abstract class AbstractLayoutManager implements LayoutManager, Constants protected void flush() { } - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { } /** diff --git a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java index 2d789328d..36d338943 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java @@ -548,9 +548,9 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager { /** * Add the child to the block container. * - * @see org.apache.fop.layoutmgr.LayoutManager#addChild(Area) + * @see org.apache.fop.layoutmgr.LayoutManager#addChildArea(Area) */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { if (referenceArea != null) { referenceArea.addBlock((Block) childArea); } diff --git a/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java index 55354fe40..74e29f784 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java @@ -396,9 +396,9 @@ public class BlockLayoutManager extends BlockStackingLayoutManager { } /** - * @see org.apache.fop.layoutmgr.LayoutManager#addChild(org.apache.fop.area.Area) + * @see org.apache.fop.layoutmgr.LayoutManager#addChildArea(Area) */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { if (curBlockArea != null) { if (childArea instanceof LineArea) { curBlockArea.addLineArea((LineArea) childArea); diff --git a/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java index 859d741d8..582c5c285 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java @@ -88,7 +88,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager { if (sp != 0) { Block spacer = new Block(); spacer.setBPD(sp); - parentLM.addChild(spacer); + parentLM.addChildArea(spacer); } } @@ -122,7 +122,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager { * If so, add it. Otherwise initiate breaking. * @param childArea the area to add: will be some block-stacked Area. */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { addChildToArea(childArea, getCurrentArea()); } @@ -131,7 +131,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager { */ protected void flush() { if (getCurrentArea() != null) { - parentLM.addChild(getCurrentArea()); + parentLM.addChildArea(getCurrentArea()); } } diff --git a/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java b/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java index 515196e3f..093439fba 100644 --- a/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java @@ -182,9 +182,11 @@ public class ContentLayoutManager implements InlineLevelLayoutManager { return holder; } - /** @see org.apache.fop.layoutmgr.LayoutManager */ - public void addChild(Area childArea) { - holder.addChild(childArea); + /** + * @see org.apache.fop.layoutmgr.LayoutManager#addChildArea(Area) + **/ + public void addChildArea(Area childArea) { + holder.addChildArea(childArea); } /** diff --git a/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java b/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java index a1301e283..f249941c0 100644 --- a/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java @@ -158,9 +158,9 @@ public class FlowLayoutManager extends BlockStackingLayoutManager { * Add child area to a the correct container, depending on its * area class. A Flow can fill at most one area container of any class * at any one time. The actual work is done by BlockStackingLM. - * @param childArea child area to add + * @see org.apache.fop.layoutmgr.LayoutManager#addChildArea(Area) */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { addChildToArea(childArea, this.currentAreas[childArea.getAreaClass()]); } diff --git a/src/java/org/apache/fop/layoutmgr/InlineStackingLayoutManager.java b/src/java/org/apache/fop/layoutmgr/InlineStackingLayoutManager.java index b3782629a..92fd5d7d6 100644 --- a/src/java/org/apache/fop/layoutmgr/InlineStackingLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/InlineStackingLayoutManager.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 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. @@ -498,7 +498,7 @@ public class InlineStackingLayoutManager extends AbstractLayoutManager { } setTraits(bAreaCreated, !bIsLast); - parentLM.addChild(getCurrentArea()); + parentLM.addChildArea(getCurrentArea()); context.setFlags(LayoutContext.LAST_AREA, bIsLast); bAreaCreated = true; } @@ -515,7 +515,7 @@ public class InlineStackingLayoutManager extends AbstractLayoutManager { } - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { // Make sure childArea is inline area if (childArea instanceof InlineArea) { Area parent = getCurrentArea(); @@ -524,7 +524,7 @@ public class InlineStackingLayoutManager extends AbstractLayoutManager { getContext().getLeadingSpace().resolve(false), getContext().getSpaceAdjust()); } - parent.addChild(childArea); + parent.addChildArea(childArea); } } @@ -554,7 +554,7 @@ public class InlineStackingLayoutManager extends AbstractLayoutManager { //getLogger().debug("Add leading space: " + iAdjust); Space ls = new Space(); ls.setIPD(iAdjust); - parentArea.addChild(ls); + parentArea.addChildArea(ls); } } } diff --git a/src/java/org/apache/fop/layoutmgr/LayoutManager.java b/src/java/org/apache/fop/layoutmgr/LayoutManager.java index a06da78be..93fd36df5 100644 --- a/src/java/org/apache/fop/layoutmgr/LayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/LayoutManager.java @@ -155,7 +155,7 @@ public interface LayoutManager { * * @param childArea the child area to add */ - void addChild(Area childArea); + void addChildArea(Area childArea); /** * Tell the layout manager to add all the child areas implied diff --git a/src/java/org/apache/fop/layoutmgr/LeaderLayoutManager.java b/src/java/org/apache/fop/layoutmgr/LeaderLayoutManager.java index 667a2d59b..4cb87a419 100644 --- a/src/java/org/apache/fop/layoutmgr/LeaderLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/LeaderLayoutManager.java @@ -102,9 +102,9 @@ public class LeaderLayoutManager extends LeafNodeLayoutManager { } FilledArea fa = new FilledArea(); fa.setUnitWidth(width); - fa.addChild(t); + fa.addChildArea(t); if (spacer != null) { - fa.addChild(spacer); + fa.addChildArea(spacer); } fa.setBPD(font.getAscender()); @@ -139,7 +139,7 @@ public class LeaderLayoutManager extends LeafNodeLayoutManager { } fa.setUnitWidth(width); if (spacer != null) { - fa.addChild(spacer); + fa.addChildArea(spacer); } leaderArea = fa; } @@ -222,7 +222,7 @@ public class LeaderLayoutManager extends LeafNodeLayoutManager { clm.addAreas(contentIter, context); offsetArea(context); - parentLM.addChild(curArea); + parentLM.addChildArea(curArea); while (posIter.hasNext()) { posIter.next(); diff --git a/src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java b/src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java index e0feca999..b81adc686 100644 --- a/src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java @@ -135,7 +135,7 @@ public class LeafNodeLayoutManager extends AbstractLayoutManager * This is a leaf-node, so this method is never called. * @param childArea the childArea to add */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { } /** @@ -168,7 +168,7 @@ public class LeafNodeLayoutManager extends AbstractLayoutManager offsetArea(context); widthAdjustArea(context); - parentLM.addChild(curArea); + parentLM.addChildArea(curArea); while (posIter.hasNext()) { posIter.next(); diff --git a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java index c4a79a982..e21d2e5b8 100644 --- a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java @@ -932,7 +932,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager { addSpace(lineArea, lc.getTrailingSpace().resolve(true), lc.getSpaceAdjust()); } - parentLM.addChild(lineArea); + parentLM.addChildArea(lineArea); } setCurrentArea(null); // ?? necessary } diff --git a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java index 3b6dbc853..d0cc95e46 100644 --- a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java @@ -358,10 +358,9 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager { /** * For now, only handle normal flow areas. - * - * @param childArea the child area to add + * @see org.apache.fop.layoutmgr.LayoutManager#addChildArea(org.apache.fop.area.Area) */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { if (childArea == null) { return; } diff --git a/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java b/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java index 38054c235..5effaf429 100644 --- a/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 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. @@ -112,9 +112,9 @@ public class StaticContentLayoutManager extends BlockStackingLayoutManager { * Add child area to a the correct container, depending on its * area class. A Flow can fill at most one area container of any class * at any one time. The actual work is done by BlockStackingLM. - * @param childArea child area to add + * @see org.apache.fop.layoutmgr.LayoutManager#addChildArea(Area) */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { region.addBlock((Block)childArea); } diff --git a/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java b/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java index 1a70afdd2..4d5fe4130 100644 --- a/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java @@ -622,7 +622,7 @@ public class TextLayoutManager extends AbstractLayoutManager word = t; if (word != null) { - parentLM.addChild(word); + parentLM.addChildArea(word); } } diff --git a/src/java/org/apache/fop/layoutmgr/list/Item.java b/src/java/org/apache/fop/layoutmgr/list/Item.java index 0ca9e329e..ef7403c54 100644 --- a/src/java/org/apache/fop/layoutmgr/list/Item.java +++ b/src/java/org/apache/fop/layoutmgr/list/Item.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 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. @@ -238,7 +238,7 @@ public class Item extends BlockStackingLayoutManager { * * @param childArea the child to add to the cell */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { if (curBlockArea != null) { curBlockArea.addBlock((Block) childArea); } diff --git a/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java b/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java index 350676208..48d78f875 100644 --- a/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java @@ -255,7 +255,7 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager { * * @param childArea the child area to add */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { if (curBlockArea != null) { curBlockArea.addBlock((Block) childArea); } diff --git a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java index d81599e42..1d2038067 100644 --- a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java @@ -325,7 +325,7 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager { * * @param childArea the child area */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { if (curBlockArea != null) { curBlockArea.addBlock((Block) childArea); } diff --git a/src/java/org/apache/fop/layoutmgr/table/Body.java b/src/java/org/apache/fop/layoutmgr/table/Body.java index 65ba5d966..dbdf10b0a 100644 --- a/src/java/org/apache/fop/layoutmgr/table/Body.java +++ b/src/java/org/apache/fop/layoutmgr/table/Body.java @@ -238,8 +238,8 @@ public class Body extends BlockStackingLayoutManager { * * @param childArea the child area to add */ - public void addChild(Area childArea) { - parentLM.addChild(childArea); + public void addChildArea(Area childArea) { + parentLM.addChildArea(childArea); } /** diff --git a/src/java/org/apache/fop/layoutmgr/table/Caption.java b/src/java/org/apache/fop/layoutmgr/table/Caption.java index 3f7998cc5..0fd99849c 100644 --- a/src/java/org/apache/fop/layoutmgr/table/Caption.java +++ b/src/java/org/apache/fop/layoutmgr/table/Caption.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 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. @@ -193,7 +193,7 @@ public class Caption extends BlockStackingLayoutManager { * * @param childArea the child area to add */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { if (curBlockArea != null) { curBlockArea.addBlock((Block) childArea); } diff --git a/src/java/org/apache/fop/layoutmgr/table/Cell.java b/src/java/org/apache/fop/layoutmgr/table/Cell.java index 2c66f6d39..5a68aeb66 100644 --- a/src/java/org/apache/fop/layoutmgr/table/Cell.java +++ b/src/java/org/apache/fop/layoutmgr/table/Cell.java @@ -342,7 +342,7 @@ public class Cell extends BlockStackingLayoutManager { block.setXOffset(dx + borderStartWidth); block.setYOffset(dy); TraitSetter.addCollapsingBorders(block, gu.effBorders, outer); - parentLM.addChild(block); + parentLM.addChildArea(block); dx += gu.column.getWidth().getValue(); } dy += lastRowHeight; @@ -443,7 +443,7 @@ public class Cell extends BlockStackingLayoutManager { * * @param childArea the child to add to the cell */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { if (curBlockArea != null) { curBlockArea.addBlock((Block) childArea); } diff --git a/src/java/org/apache/fop/layoutmgr/table/Row.java b/src/java/org/apache/fop/layoutmgr/table/Row.java index bd03c5e3b..c3d06d435 100644 --- a/src/java/org/apache/fop/layoutmgr/table/Row.java +++ b/src/java/org/apache/fop/layoutmgr/table/Row.java @@ -531,7 +531,7 @@ public class Row extends BlockStackingLayoutManager { rowArea.setIPD(referenceIPD); rowArea.setXOffset(xoffset); rowArea.setYOffset(yoffset); - parentLM.addChild(rowArea); + parentLM.addChildArea(rowArea); } for (Iterator iter = lfp.cellBreaks.iterator(); iter.hasNext();) { @@ -586,8 +586,8 @@ public class Row extends BlockStackingLayoutManager { * * @param childArea the child area */ - public void addChild(Area childArea) { - parentLM.addChild(childArea); + public void addChildArea(Area childArea) { + parentLM.addChildArea(childArea); } /** diff --git a/src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java index ff3d15122..638ee0681 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 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. @@ -194,7 +194,7 @@ public class TableAndCaptionLayoutManager extends BlockStackingLayoutManager { * * @param childArea the area to add */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { if (curBlockArea != null) { curBlockArea.addBlock((Block) childArea); } diff --git a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java index 37fe8cd78..653c953c2 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java @@ -457,7 +457,7 @@ public class TableLayoutManager extends BlockStackingLayoutManager { * * @param childArea the child area to add */ - public void addChild(Area childArea) { + public void addChildArea(Area childArea) { if (curBlockArea != null) { curBlockArea.addBlock((Block) childArea); }