From: William Victor Mote Date: Sun, 13 Jul 2003 23:33:22 +0000 (+0000) Subject: style changes only X-Git-Tag: Root_Temp_KnuthStylePageBreaking~1291 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=16572312768660aeaa4f906e8a9130462da3915d;p=xmlgraphics-fop.git style changes only git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196693 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/FObjMixed.java b/src/java/org/apache/fop/fo/FObjMixed.java index 072b0a609..435207508 100644 --- a/src/java/org/apache/fop/fo/FObjMixed.java +++ b/src/java/org/apache/fop/fo/FObjMixed.java @@ -57,22 +57,33 @@ import org.apache.fop.layoutmgr.LMiter; import java.util.List; /** - * base class for representation of mixed content formatting objects + * Base class for representation of mixed content formatting objects * and their processing */ public class FObjMixed extends FObj { + /** TextInfo for this object */ protected TextInfo textInfo = null; + /** FontInfo for this object */ protected FontInfo fontInfo = null; + /** + * @param parent FONode that is the parent of this object + */ public FObjMixed(FONode parent) { super(parent); } + /** + * @param st StructureHandler to set + */ public void setStructHandler(StructureHandler st) { super.setStructHandler(st); fontInfo = st.getFontInfo(); } + /** + * @param lms the list to which the layout manager(s) should be added + */ public void addLayoutManager(List lms) { if (children != null) { InlineStackingLayoutManager lm; @@ -84,12 +95,17 @@ public class FObjMixed extends FObj { } } + /** + * @param data array of characters containing text to be added + * @param start starting array element to add + * @param length number of characters to add + */ protected void addCharacters(char data[], int start, int length) { if (textInfo == null) { - // Really only need one of these, but need to get fontInfo - // stored in propMgr for later use. - propMgr.setFontInfo(fontInfo); - textInfo = propMgr.getTextLayoutProps(fontInfo); + // Really only need one of these, but need to get fontInfo + // stored in propMgr for later use. + propMgr.setFontInfo(fontInfo); + textInfo = propMgr.getTextLayoutProps(fontInfo); } FOText ft = new FOText(data, start, length, textInfo, this); @@ -98,12 +114,15 @@ public class FObjMixed extends FObj { addChild(ft); } - public void setup() { + private void setup() { if (this.properties != null) { setupID(); } } + /** + * @return iterator for this object + */ public CharIterator charIterator() { return new RecursiveCharIterator(this); } diff --git a/src/java/org/apache/fop/fo/flow/InlineContainer.java b/src/java/org/apache/fop/fo/flow/InlineContainer.java index ab1dc1192..9d6a48e57 100644 --- a/src/java/org/apache/fop/fo/flow/InlineContainer.java +++ b/src/java/org/apache/fop/fo/flow/InlineContainer.java @@ -3,34 +3,34 @@ * ============================================================================ * The Apache Software License, Version 1.1 * ============================================================================ - * + * * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * 3. The end-user documentation included with the redistribution, if any, must * include the following acknowledgment: "This product includes software * developed by the Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, if * and wherever such third-party acknowledgments normally appear. - * + * * 4. The names "FOP" and "Apache Software Foundation" must not be used to * endorse or promote products derived from this software without prior * written permission. For written permission, please contact * apache@apache.org. - * + * * 5. Products derived from this software may not be called "Apache", nor may * "Apache" appear in their name, without prior written permission of the * Apache Software Foundation. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -42,12 +42,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ============================================================================ - * + * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by * James Tauber . For more information on the Apache * Software Foundation, please see . - */ + */ package org.apache.fop.fo.flow; // Java @@ -70,14 +70,21 @@ import org.apache.fop.layoutmgr.LeafNodeLayoutManager; import org.apache.fop.area.inline.InlineArea; /** - * fo:inline-container element. + * Class modelling the fo:inline-container object. See Sec. 6.6.8 of the XSL-FO + * Standard. */ public class InlineContainer extends FObj { + /** + * @param parent FONode that is the parent of this object + */ public InlineContainer(FONode parent) { super(parent); } + /** + * @see org.apache.fop.fo.FObj#addLayoutManager + */ public void addLayoutManager(List lms) { ArrayList childList = new ArrayList(); super.addLayoutManager(childList); @@ -87,6 +94,9 @@ public class InlineContainer extends FObj { lms.add(lm); } + /** + * @see org.apache.fop.fo.FObj#handleAttrs + */ public void handleAttrs(Attributes attlist) throws FOPException { super.handleAttrs(attlist); // Common Border, Padding, and Background Properties @@ -121,6 +131,9 @@ public class InlineContainer extends FObj { // this.properties.get("writing-mode"); } + /** + * @return true (InlineContainer can contain Markers) + */ protected boolean containsMarkers() { return true; } @@ -131,7 +144,7 @@ public class InlineContainer extends FObj { * and id areas are maintained for later retrieval. */ class ICLayoutManager extends LeafNodeLayoutManager { - + private List childrenLM; ICLayoutManager(List childLM) { diff --git a/src/java/org/apache/fop/fo/flow/Leader.java b/src/java/org/apache/fop/fo/flow/Leader.java index 23eaf5c04..bfce80be3 100644 --- a/src/java/org/apache/fop/fo/flow/Leader.java +++ b/src/java/org/apache/fop/fo/flow/Leader.java @@ -3,34 +3,34 @@ * ============================================================================ * The Apache Software License, Version 1.1 * ============================================================================ - * + * * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * 3. The end-user documentation included with the redistribution, if any, must * include the following acknowledgment: "This product includes software * developed by the Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, if * and wherever such third-party acknowledgments normally appear. - * + * * 4. The names "FOP" and "Apache Software Foundation" must not be used to * endorse or promote products derived from this software without prior * written permission. For written permission, please contact * apache@apache.org. - * + * * 5. Products derived from this software may not be called "Apache", nor may * "Apache" appear in their name, without prior written permission of the * Apache Software Foundation. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -42,12 +42,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ============================================================================ - * + * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by * James Tauber . For more information on the Apache * Software Foundation, please see . - */ + */ package org.apache.fop.fo.flow; // Java @@ -83,23 +83,33 @@ import org.apache.fop.layoutmgr.MinOptMax; import org.apache.fop.util.CharUtilities; /** - * Implements fo:leader; main property of leader leader-pattern. + * Class modelling fo:leader object. See Sec. 6.6.9 of the XSL-FO Standard. + * The main property of fo:leader is leader-pattern. * The following patterns are treated: rule, space, dots and use-content. */ public class Leader extends FObjMixed { - + private int ruleStyle; private int ruleThickness; private int leaderPattern; private int patternWidth; + /** FontInfo for this object */ protected FontInfo fontInfo = null; + /** FontState for this object */ protected FontState fontState; protected InlineArea leaderArea = null; + /** + * @param parent FONode that is the parent of this object + */ public Leader(FONode parent) { super(parent); } + /** + * + * @param list the list to which the layout manager(s) should be added + */ public void addLayoutManager(List list) { LeafNodeLayoutManager lm = new LeafNodeLayoutManager() { public InlineArea get(LayoutContext context) { @@ -202,12 +212,15 @@ public class Leader extends FObjMixed { } } + /** + * @param st StructureHandler to set + */ public void setStructHandler(StructureHandler st) { super.setStructHandler(st); fontInfo = st.getFontInfo(); } - public void setup() { + private void setup() { // Common Accessibility Properties AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); diff --git a/src/java/org/apache/fop/fo/flow/ListBlock.java b/src/java/org/apache/fop/fo/flow/ListBlock.java index 6618ead78..6f7348e38 100644 --- a/src/java/org/apache/fop/fo/flow/ListBlock.java +++ b/src/java/org/apache/fop/fo/flow/ListBlock.java @@ -3,34 +3,34 @@ * ============================================================================ * The Apache Software License, Version 1.1 * ============================================================================ - * + * * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * 3. The end-user documentation included with the redistribution, if any, must * include the following acknowledgment: "This product includes software * developed by the Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, if * and wherever such third-party acknowledgments normally appear. - * + * * 4. The names "FOP" and "Apache Software Foundation" must not be used to * endorse or promote products derived from this software without prior * written permission. For written permission, please contact * apache@apache.org. - * + * * 5. Products derived from this software may not be called "Apache", nor may * "Apache" appear in their name, without prior written permission of the * Apache Software Foundation. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -42,12 +42,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ============================================================================ - * + * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by * James Tauber . For more information on the Apache * Software Foundation, please see . - */ + */ package org.apache.fop.fo.flow; // Java @@ -66,6 +66,10 @@ import org.apache.fop.layout.MarginProps; import org.apache.fop.layout.RelativePositionProps; import org.apache.fop.layoutmgr.list.ListBlockLayoutManager; +/** + * Class modelling the fo:list-block object. See Sec. 6.8.2 of the XSL-FO + * Standard. + */ public class ListBlock extends FObj { private int align; @@ -80,10 +84,17 @@ public class ListBlock extends FObj { private int spaceBetweenListRows = 0; private ColorType backgroundColor; + /** + * @param parent FONode that is the parent of this object + */ public ListBlock(FONode parent) { super(parent); } + /** + * + * @param list the list to which the layout manager(s) should be added + */ public void addLayoutManager(List list) { ListBlockLayoutManager blm = new ListBlockLayoutManager(); blm.setUserAgent(getUserAgent()); @@ -91,7 +102,7 @@ public class ListBlock extends FObj { list.add(blm); } - public void setup() throws FOPException { + private void setup() throws FOPException { // Common Accessibility Properties AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); @@ -136,10 +147,16 @@ public class ListBlock extends FObj { } + /** + * @return false (ListBlock does not generate inline areas) + */ public boolean generatesInlineAreas() { return false; } + /** + * @return true (ListBlock can contain Markers) + */ protected boolean containsMarkers() { return true; } diff --git a/src/java/org/apache/fop/fo/flow/ListItem.java b/src/java/org/apache/fop/fo/flow/ListItem.java index a3e9a3b17..0624f3a84 100644 --- a/src/java/org/apache/fop/fo/flow/ListItem.java +++ b/src/java/org/apache/fop/fo/flow/ListItem.java @@ -3,34 +3,34 @@ * ============================================================================ * The Apache Software License, Version 1.1 * ============================================================================ - * + * * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * 3. The end-user documentation included with the redistribution, if any, must * include the following acknowledgment: "This product includes software * developed by the Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, if * and wherever such third-party acknowledgments normally appear. - * + * * 4. The names "FOP" and "Apache Software Foundation" must not be used to * endorse or promote products derived from this software without prior * written permission. For written permission, please contact * apache@apache.org. - * + * * 5. Products derived from this software may not be called "Apache", nor may * "Apache" appear in their name, without prior written permission of the * Apache Software Foundation. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -42,12 +42,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ============================================================================ - * + * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by * James Tauber . For more information on the Apache * Software Foundation, please see . - */ + */ package org.apache.fop.fo.flow; // Java @@ -64,8 +64,12 @@ import org.apache.fop.layout.MarginProps; import org.apache.fop.layout.RelativePositionProps; import org.apache.fop.layoutmgr.list.ListItemLayoutManager; +/** + * Class modelling the fo:list-item object. See Sec. 6.8.3 of the XSL-FO + * Standard. + */ public class ListItem extends FObj { - + private ListItemLabel label = null; private ListItemBody body = null; @@ -79,10 +83,16 @@ public class ListItem extends FObj { private int spaceBefore; private int spaceAfter; + /** + * @param parent FONode that is the parent of this object + */ public ListItem(FONode parent) { super(parent); } + /** + * @param list the list to which the layout manager(s) should be added + */ public void addLayoutManager(List list) { if (label != null && body != null) { ListItemLayoutManager blm = new ListItemLayoutManager(); @@ -96,7 +106,7 @@ public class ListItem extends FObj { } } - public void setup() { + private void setup() { // Common Accessibility Properties AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); @@ -133,6 +143,10 @@ public class ListItem extends FObj { } + /** + * Overridden from FObj + * @param child the child object to be added + */ public void addChild(FONode child) { if ("fo:list-item-label".equals(child.getName())) { label = (ListItemLabel)child; @@ -145,10 +159,16 @@ public class ListItem extends FObj { } } + /** + * @return false (ListItem cannot generate inline areas) + */ public boolean generatesInlineAreas() { return false; } + /** + * @return true (ListItem can contain Markers) + */ protected boolean containsMarkers() { return true; } diff --git a/src/java/org/apache/fop/fo/flow/ListItemBody.java b/src/java/org/apache/fop/fo/flow/ListItemBody.java index 77a25c0ab..e44a5e207 100644 --- a/src/java/org/apache/fop/fo/flow/ListItemBody.java +++ b/src/java/org/apache/fop/fo/flow/ListItemBody.java @@ -3,34 +3,34 @@ * ============================================================================ * The Apache Software License, Version 1.1 * ============================================================================ - * + * * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * 3. The end-user documentation included with the redistribution, if any, must * include the following acknowledgment: "This product includes software * developed by the Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, if * and wherever such third-party acknowledgments normally appear. - * + * * 4. The names "FOP" and "Apache Software Foundation" must not be used to * endorse or promote products derived from this software without prior * written permission. For written permission, please contact * apache@apache.org. - * + * * 5. Products derived from this software may not be called "Apache", nor may * "Apache" appear in their name, without prior written permission of the * Apache Software Foundation. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -42,12 +42,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ============================================================================ - * + * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by * James Tauber . For more information on the Apache * Software Foundation, please see . - */ + */ package org.apache.fop.fo.flow; // FOP @@ -56,12 +56,22 @@ import org.apache.fop.fo.FObj; import org.apache.fop.layout.AccessibilityProps; import org.apache.fop.layoutmgr.list.Item; +/** + * Class modelling the fo:list-item-body object. See Sec. 6.8.4 of the XSL-FO + * Standard. + */ public class ListItemBody extends FObj { + /** + * @param parent FONode that is the parent of this object + */ public ListItemBody(FONode parent) { super(parent); } + /** + * @return Item layout manager + */ public Item getItemLayoutManager() { Item item = new Item(); item.setUserAgent(getUserAgent()); @@ -69,7 +79,7 @@ public class ListItemBody extends FObj { return item; } - public void setup() { + private void setup() { // Common Accessibility Properties AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); @@ -86,6 +96,9 @@ public class ListItemBody extends FObj { } + /** + * @return true (ListItemBody can contain Markers) + */ protected boolean containsMarkers() { return true; } diff --git a/src/java/org/apache/fop/fo/flow/ListItemLabel.java b/src/java/org/apache/fop/fo/flow/ListItemLabel.java index 0080331a2..b93ee29cc 100644 --- a/src/java/org/apache/fop/fo/flow/ListItemLabel.java +++ b/src/java/org/apache/fop/fo/flow/ListItemLabel.java @@ -3,34 +3,34 @@ * ============================================================================ * The Apache Software License, Version 1.1 * ============================================================================ - * + * * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * 3. The end-user documentation included with the redistribution, if any, must * include the following acknowledgment: "This product includes software * developed by the Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, if * and wherever such third-party acknowledgments normally appear. - * + * * 4. The names "FOP" and "Apache Software Foundation" must not be used to * endorse or promote products derived from this software without prior * written permission. For written permission, please contact * apache@apache.org. - * + * * 5. Products derived from this software may not be called "Apache", nor may * "Apache" appear in their name, without prior written permission of the * Apache Software Foundation. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -42,12 +42,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ============================================================================ - * + * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by * James Tauber . For more information on the Apache * Software Foundation, please see . - */ + */ package org.apache.fop.fo.flow; // FOP @@ -56,12 +56,22 @@ import org.apache.fop.fo.FObj; import org.apache.fop.layout.AccessibilityProps; import org.apache.fop.layoutmgr.list.Item; +/** + * Class modelling the fo:list-item-label object. See Sec. 6.8.5 of the XSL-FO + * Standard. + */ public class ListItemLabel extends FObj { + /** + * @param parent FONode that is the parent of this object + */ public ListItemLabel(FONode parent) { super(parent); } + /** + * @return this object's Item layout manager + */ public Item getItemLayoutManager() { Item itemLabel = new Item(); itemLabel.setUserAgent(getUserAgent()); @@ -69,7 +79,7 @@ public class ListItemLabel extends FObj { return itemLabel; } - public void setup() { + private void setup() { // Common Accessibility Properties AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); @@ -86,6 +96,9 @@ public class ListItemLabel extends FObj { } + /** + * @return true (ListItemLabel may contain Markers) + */ protected boolean containsMarkers() { return true; }