From: William Victor Mote Date: Mon, 14 Jul 2003 01:53:41 +0000 (+0000) Subject: style changes only X-Git-Tag: Root_Temp_KnuthStylePageBreaking~1286 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d66c5b6844917fe51848ca89b084398571ba8823;p=xmlgraphics-fop.git style changes only git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196700 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/flow/BasicLink.java b/src/java/org/apache/fop/fo/flow/BasicLink.java index 5076861cb..30724295b 100644 --- a/src/java/org/apache/fop/fo/flow/BasicLink.java +++ b/src/java/org/apache/fop/fo/flow/BasicLink.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 @@ -77,15 +77,21 @@ import org.apache.fop.layoutmgr.LayoutProcessor; * that are created by the fo element. */ public class BasicLink extends Inline { - + private String link = null; private boolean external = false; + /** + * @param parent FONode that is the parent of this object + */ public BasicLink(FONode parent) { super(parent); } - // add start and end properties for the link + /** + * Add start and end properties for the link + * @see org.apache.fop.fo.FObj#addLayoutManager + */ public void addLayoutManager(List lms) { setup(); InlineStackingLayoutManager lm; @@ -119,7 +125,7 @@ public class BasicLink extends Inline { } } - public void setup() { + private void setup() { String destination; int linkType; @@ -168,6 +174,9 @@ public class BasicLink extends Inline { } + /** + * @return true (BasicLink can contain Markers) + */ protected boolean containsMarkers() { return true; } @@ -192,6 +201,9 @@ public class BasicLink extends Inline { area = a; } + /** + * @return true if this link is resolved + */ public boolean isResolved() { return resolved; } diff --git a/src/java/org/apache/fop/fo/flow/BidiOverride.java b/src/java/org/apache/fop/fo/flow/BidiOverride.java index 8e53e1e0a..eba9384f9 100644 --- a/src/java/org/apache/fop/fo/flow/BidiOverride.java +++ b/src/java/org/apache/fop/fo/flow/BidiOverride.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 @@ -68,10 +68,16 @@ import java.util.ArrayList; */ public class BidiOverride extends FObjMixed { + /** + * @param parent FONode that is the parent of this object + */ public BidiOverride(FONode parent) { super(parent); } + /** + * @see org.apache.fop.fo.FObj#addLayoutManager + */ public void addLayoutManager(List list) { if (false) { super.addLayoutManager(list); @@ -91,7 +97,7 @@ public class BidiOverride extends FObjMixed { } } - public void setup() { + private void setup() { // Common Aural Properties AuralProps mAurProps = propMgr.getAuralProps(); @@ -116,6 +122,9 @@ public class BidiOverride extends FObjMixed { } + /** + * @return true (BidiOverride can contain Markers) + */ protected boolean containsMarkers() { return true; } @@ -126,7 +135,7 @@ public class BidiOverride extends FObjMixed { * reverses the inline areas (at the character level). */ class BidiLayoutManager extends LeafNodeLayoutManager { - + private List children; BidiLayoutManager(LeafNodeLayoutManager cLM) { diff --git a/src/java/org/apache/fop/fo/flow/Block.java b/src/java/org/apache/fop/fo/flow/Block.java index 35c1f1f19..69b7ac413 100644 --- a/src/java/org/apache/fop/fo/flow/Block.java +++ b/src/java/org/apache/fop/fo/flow/Block.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 @@ -90,6 +90,9 @@ import org.apache.fop.util.CharUtilities; there are only a few sematic changes; mostly I just got rid of "this." from blockArea since BlockArea is now local. */ + /** + * Class modelling the fo:block object. See Sec. 6.5.2 of the XSL-FO Standard. + */ public class Block extends FObjMixed { private int align; @@ -121,10 +124,16 @@ public class Block extends FObjMixed { */ private FONode firstInlineChild = null; + /** + * @param parent FONode that is the parent of this object + */ public Block(FONode parent) { super(parent); } + /** + * @see org.apache.fop.fo.FObj#handleAttrs + */ public void handleAttrs(Attributes attlist) throws FOPException { super.handleAttrs(attlist); this.span = this.properties.get("span").getEnum(); @@ -141,7 +150,7 @@ public class Block extends FObjMixed { structHandler.startBlock(this); } - public void setup() { + private void setup() { // Common Accessibility Properties AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); @@ -220,14 +229,23 @@ public class Block extends FObjMixed { } + /** + * @return true (Block can contain Markers) + */ protected boolean containsMarkers() { return true; } + /** + * @return span for this Block, in millipoints (??) + */ public int getSpan() { return this.span; } + /** + * @see org.apache.fop.fo.FObj#addLayoutManager + */ public void addLayoutManager(List list) { BlockLayoutManager blm = new BlockLayoutManager(); blm.setUserAgent(getUserAgent()); @@ -237,10 +255,16 @@ public class Block extends FObjMixed { list.add(blm); } + /** + * @return false (Block cannot generate inline areas) + */ public boolean generatesInlineAreas() { return false; } + /** + * @see org.apache.fop.fo.FObj#addChild + */ public void addChild(FONode child) { // Handle whitespace based on values of properties // Handle a sequence of inline-producing children in @@ -257,6 +281,9 @@ public class Block extends FObjMixed { super.addChild(child); } + /** + * @see org.apache.fop.fo.FONode#end + */ public void end() { handleWhiteSpace(); structHandler.endBlock(this); @@ -296,7 +323,7 @@ public class Block extends FObjMixed { if (bIgnore) { charIter.remove(); } else if (bWScollapse) { - if (bInWS || (lfTreatment == Constants.PRESERVE + if (bInWS || (lfTreatment == Constants.PRESERVE && (bPrevWasLF || lfCheck.nextIsLF()))) { charIter.remove(); } else { @@ -368,7 +395,7 @@ public class Block extends FObjMixed { if (c == '\n') { bNextIsLF = true; break; - } else if (CharUtilities.classOf(c) + } else if (CharUtilities.classOf(c) != CharUtilities.XMLWHITESPACE) { break; } diff --git a/src/java/org/apache/fop/fo/flow/BlockContainer.java b/src/java/org/apache/fop/fo/flow/BlockContainer.java index 0163c0094..55ed11e77 100644 --- a/src/java/org/apache/fop/fo/flow/BlockContainer.java +++ b/src/java/org/apache/fop/fo/flow/BlockContainer.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 @@ -65,6 +65,10 @@ import org.xml.sax.Attributes; import java.util.List; +/** + * Class modelling the fo:block-container object. See Sec. 6.5.3 of the XSL-FO + * Standard. + */ public class BlockContainer extends FObj { private ColorType backgroundColor; @@ -79,16 +83,25 @@ public class BlockContainer extends FObj { private int span; + /** + * @param parent FONode that is the parent of this object + */ public BlockContainer(FONode parent) { super(parent); } + /** + * @see org.apache.fop.fo.FObj#handleAttrs + */ public void handleAttrs(Attributes attlist) throws FOPException { super.handleAttrs(attlist); this.span = this.properties.get("span").getEnum(); setupID(); } + /** + * @see org.apache.fop.fo.FObj#addLayoutManager + */ public void addLayoutManager(List list) { BlockContainerLayoutManager blm = new BlockContainerLayoutManager(); blm.setUserAgent(getUserAgent()); @@ -97,7 +110,7 @@ public class BlockContainer extends FObj { list.add(blm); } - public void setup() { + private void setup() { // Common Accessibility Properties AbsolutePositionProps mAbsProps = propMgr.getAbsolutePositionProps(); @@ -134,18 +147,30 @@ public class BlockContainer extends FObj { } + /** + * @return true (BlockContainer can generate Reference Areas) + */ public boolean generatesReferenceAreas() { return true; } + /** + * @return false (BlockContainer cannot generate inline areas) + */ public boolean generatesInlineAreas() { return false; } + /** + * @return true (BlockContainer can contain Markers) + */ protected boolean containsMarkers() { return true; } + /** + * @return the span for this object + */ public int getSpan() { return this.span; } diff --git a/src/java/org/apache/fop/fo/flow/Character.java b/src/java/org/apache/fop/fo/flow/Character.java index d18924836..b8c589eaf 100644 --- a/src/java/org/apache/fop/fo/flow/Character.java +++ b/src/java/org/apache/fop/fo/flow/Character.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 @@ -82,16 +82,24 @@ import org.apache.fop.layoutmgr.LeafNodeLayoutManager; * */ public class Character extends FObj { - + + /** constant indicating that the character is OK */ public static final int OK = 0; + /** constant indicating that the character does not fit */ public static final int DOESNOT_FIT = 1; private char characterValue; + /** + * @param parent FONode that is the parent of this object + */ public Character(FONode parent) { super(parent); } + /** + * @see org.apache.fop.fo.FObj#addLayoutManager + */ public void addLayoutManager(List list) { InlineArea inline = getInlineArea(); if (inline != null) { @@ -114,7 +122,7 @@ public class Character extends FObj { return null; } - public void setup() throws FOPException { + private void setup() throws FOPException { // Common Aural Properties AuralProps mAurProps = propMgr.getAuralProps(); @@ -161,6 +169,9 @@ public class Character extends FObj { // this.properties.get("word-spacing"); } + /** + * @see org.apache.fop.fo.FObj#charIterator + */ public CharIterator charIterator() { return new OneCharIterator(characterValue); // But what it the character is ignored due to white space handling?