From: Glen Mazza Date: Sat, 24 Jul 2004 04:46:34 +0000 (+0000) Subject: Renamed FONode.addChild() to somewhat clearer FONode.addChildNode(). X-Git-Tag: Root_Temp_KnuthStylePageBreaking~655 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7796f1b60829f28d3173b658871cd0fa46d4c258;p=xmlgraphics-fop.git Renamed FONode.addChild() to somewhat clearer FONode.addChildNode(). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197821 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/FONode.java b/src/java/org/apache/fop/fo/FONode.java index c3927f9b6..8314084d5 100644 --- a/src/java/org/apache/fop/fo/FONode.java +++ b/src/java/org/apache/fop/fo/FONode.java @@ -167,7 +167,7 @@ public abstract class FONode { /** * @param child child node to be added to the children of this node */ - protected void addChild(FONode child) { + protected void addChildNode(FONode child) { } /** diff --git a/src/java/org/apache/fop/fo/FOTreeBuilder.java b/src/java/org/apache/fop/fo/FOTreeBuilder.java index 15cbc3b06..faef21b62 100644 --- a/src/java/org/apache/fop/fo/FOTreeBuilder.java +++ b/src/java/org/apache/fop/fo/FOTreeBuilder.java @@ -276,7 +276,7 @@ public class FOTreeBuilder extends DefaultHandler { rootFObj = (Root) foNode; rootFObj.setFOInputHandler(foInputHandler); } else { - currentFObj.addChild(foNode); + currentFObj.addChildNode(foNode); } currentFObj = foNode; diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java index 06dd20a5b..b043ce75a 100644 --- a/src/java/org/apache/fop/fo/FObj.java +++ b/src/java/org/apache/fop/fo/FObj.java @@ -251,11 +251,9 @@ public class FObj extends FONode implements Constants { } /** - * Add the child to this object. - * - * @param child the child node to add + * @see org.apache.fop.fo.FONode#addChildNode(FONode) */ - protected void addChild(FONode child) { + protected void addChildNode(FONode child) { if (containsMarkers() && "fo:marker".equals(child.getName())) { addMarker((Marker)child); } else { diff --git a/src/java/org/apache/fop/fo/FObjMixed.java b/src/java/org/apache/fop/fo/FObjMixed.java index 18ddcf4e4..e93eef37a 100644 --- a/src/java/org/apache/fop/fo/FObjMixed.java +++ b/src/java/org/apache/fop/fo/FObjMixed.java @@ -57,7 +57,7 @@ public class FObjMixed extends FObj { /* characters() processing empty for FOTreeHandler, not empty for RTF & MIFHandlers */ getFOInputHandler().characters(ft.ca, ft.startIndex, ft.endIndex); - addChild(ft); + addChildNode(ft); } private void setup() { diff --git a/src/java/org/apache/fop/fo/UnknownXMLObj.java b/src/java/org/apache/fop/fo/UnknownXMLObj.java index 95750b823..4fcd6c081 100644 --- a/src/java/org/apache/fop/fo/UnknownXMLObj.java +++ b/src/java/org/apache/fop/fo/UnknownXMLObj.java @@ -69,13 +69,13 @@ public class UnknownXMLObj extends XMLObj { } /** - * @see XMLObj#addChild + * @see org.apache.fop.fo.FONode#addChildNode(FONode) */ - protected void addChild(FONode child) { + protected void addChildNode(FONode child) { if (doc == null) { createBasicDocument(); } - super.addChild(child); + super.addChildNode(child); } /** diff --git a/src/java/org/apache/fop/fo/XMLObj.java b/src/java/org/apache/fop/fo/XMLObj.java index 9d6b7f4cf..d6c177b22 100644 --- a/src/java/org/apache/fop/fo/XMLObj.java +++ b/src/java/org/apache/fop/fo/XMLObj.java @@ -170,9 +170,9 @@ public abstract class XMLObj extends FONode { } /** - * @param child FONode child that should be added to this node + * @see org.apache.fop.fo.FONode#addChildNode(FONode) */ - protected void addChild(FONode child) { + protected void addChildNode(FONode child) { if (child instanceof XMLObj) { ((XMLObj)child).addElement(doc, element); } else { diff --git a/src/java/org/apache/fop/fo/extensions/Bookmarks.java b/src/java/org/apache/fop/fo/extensions/Bookmarks.java index e7d45f508..8405f4b29 100644 --- a/src/java/org/apache/fop/fo/extensions/Bookmarks.java +++ b/src/java/org/apache/fop/fo/extensions/Bookmarks.java @@ -44,12 +44,9 @@ public class Bookmarks extends ExtensionObj { } /** - * Add the child to the top level. - * This handles all Outline objects added and ignores others. - * - * @param obj the child to add + * @see org.apache.fop.fo.FONode#addChildNode(FONode) */ - protected void addChild(FONode obj) { + protected void addChildNode(FONode obj) { if (obj instanceof Outline) { outlines.add(obj); } diff --git a/src/java/org/apache/fop/fo/extensions/Outline.java b/src/java/org/apache/fop/fo/extensions/Outline.java index c6f6194f8..725e5ebe6 100644 --- a/src/java/org/apache/fop/fo/extensions/Outline.java +++ b/src/java/org/apache/fop/fo/extensions/Outline.java @@ -69,12 +69,9 @@ public class Outline extends ExtensionObj { } /** - * Add the child to this outline. - * This checks for the type, label or outline and handles appropriately. - * - * @param obj the child object + * @see org.apache.fop.fo.FONode#addChildNode(FONode) */ - protected void addChild(FONode obj) { + protected void addChildNode(FONode obj) { if (obj instanceof Label) { label = (Label)obj; } else if (obj instanceof Outline) { diff --git a/src/java/org/apache/fop/fo/flow/Block.java b/src/java/org/apache/fop/fo/flow/Block.java index f7f57ab54..c9e05e192 100644 --- a/src/java/org/apache/fop/fo/flow/Block.java +++ b/src/java/org/apache/fop/fo/flow/Block.java @@ -216,9 +216,9 @@ public class Block extends FObjMixed { } /** - * @see org.apache.fop.fo.FObj#addChild + * @see org.apache.fop.fo.FONode#addChildNode(FONode) */ - public void addChild(FONode child) { + public void addChildNode(FONode child) { // Handle whitespace based on values of properties // Handle a sequence of inline-producing children in // one pass @@ -231,7 +231,7 @@ public class Block extends FObjMixed { // Handle whitespace in preceeding inline areas if any handleWhiteSpace(); } - super.addChild(child); + super.addChildNode(child); } /** diff --git a/src/java/org/apache/fop/fo/flow/Footnote.java b/src/java/org/apache/fop/fo/flow/Footnote.java index 83a50e50a..612668bb4 100644 --- a/src/java/org/apache/fop/fo/flow/Footnote.java +++ b/src/java/org/apache/fop/fo/flow/Footnote.java @@ -53,9 +53,9 @@ public class Footnote extends FObj { } /** - * @param child child FONode to be added to this object + * @see org.apache.fop.fo.FONode#addChildNode(FONode) */ - public void addChild(FONode child) { + public void addChildNode(FONode child) { String name = child.getName(); if ("fo:inline".equals(name)) { inlineFO = (Inline)child; diff --git a/src/java/org/apache/fop/fo/flow/ListItem.java b/src/java/org/apache/fop/fo/flow/ListItem.java index 5298fa99d..ae994c1a8 100644 --- a/src/java/org/apache/fop/fo/flow/ListItem.java +++ b/src/java/org/apache/fop/fo/flow/ListItem.java @@ -105,10 +105,9 @@ public class ListItem extends FObj { } /** - * Overridden from FObj - * @param child the child object to be added + * @see org.apache.fop.fo.FONode#addChildNode(FONode) */ - public void addChild(FONode child) { + public void addChildNode(FONode child) { if ("fo:list-item-label".equals(child.getName())) { label = (ListItemLabel)child; } else if ("fo:list-item-body".equals(child.getName())) { diff --git a/src/java/org/apache/fop/fo/flow/Table.java b/src/java/org/apache/fop/fo/flow/Table.java index aa98f304b..5f09d8539 100644 --- a/src/java/org/apache/fop/fo/flow/Table.java +++ b/src/java/org/apache/fop/fo/flow/Table.java @@ -85,10 +85,9 @@ public class Table extends FObj { } /** - * Overrides FObj. - * @param child FONode child object to be added + * @see org.apache.fop.fo.FONode#addChildNode(FONode) */ - protected void addChild(FONode child) { + protected void addChildNode(FONode child) { if (child.getName().equals("fo:table-column")) { if (columns == null) { columns = new ArrayList(); @@ -100,7 +99,7 @@ public class Table extends FObj { tableHeader = (TableBody)child; } else { // add bodies - super.addChild(child); + super.addChildNode(child); } } diff --git a/src/java/org/apache/fop/fo/pagination/PageSequence.java b/src/java/org/apache/fop/fo/pagination/PageSequence.java index 33e8e044a..5dd7c9815 100644 --- a/src/java/org/apache/fop/fo/pagination/PageSequence.java +++ b/src/java/org/apache/fop/fo/pagination/PageSequence.java @@ -180,13 +180,9 @@ public class PageSequence extends FObj { } /** - * Validate the child being added and initialize internal variables. - * XSL content model for page-sequence: - *
(title?,static-content*,flow)
- * - * @param child The flow object child to be added to the PageSequence. + * @see org.apache.fop.fo.FONode#addChildNode(FONode) */ - public void addChild(FONode child) { + public void addChildNode(FONode child) { try { String childName = child.getName(); if (childName.equals("fo:title")) { @@ -207,7 +203,7 @@ public class PageSequence extends FObj { // Don't add main flow to the flow map // addFlow(mainFlow); startStructuredPageSequence(); - super.addChild(child); // For getChildren + super.addChildNode(child); // For getChildren } else if (childName.equals("fo:static-content")) { String flowName = ((StaticContent)child).getFlowName(); if (flowMap.containsKey(flowName)) { @@ -223,7 +219,7 @@ public class PageSequence extends FObj { startStructuredPageSequence(); } } catch (FOPException fopex) { - getLogger().error("Error in PageSequence.addChild(): " + getLogger().error("Error in PageSequence.addChildNode(): " + fopex.getMessage(), fopex); } } diff --git a/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java b/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java index 1fbdb0620..5a089637e 100644 --- a/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java +++ b/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java @@ -92,9 +92,9 @@ public class SimplePageMaster extends FObj { } /** - * @see org.apache.fop.fo.FONode#addChild(FONode) + * @see org.apache.fop.fo.FONode#addChildNode(FONode) */ - protected void addChild(FONode child) { + protected void addChildNode(FONode child) { if (child instanceof Region) { addRegion((Region)child); } else {