]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
style changes only
authorWilliam Victor Mote <vmote@apache.org>
Sun, 13 Jul 2003 03:16:11 +0000 (03:16 +0000)
committerWilliam Victor Mote <vmote@apache.org>
Sun, 13 Jul 2003 03:16:11 +0000 (03:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196690 13f79535-47bb-0310-9956-ffa450edef68

18 files changed:
src/java/org/apache/fop/extensions/ExtensionElementMapping.java
src/java/org/apache/fop/fo/expr/AbsFunction.java
src/java/org/apache/fop/fo/expr/BodyStartFunction.java
src/java/org/apache/fop/fo/expr/FopPropValFunction.java
src/java/org/apache/fop/fo/expr/FromParentFunction.java
src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java
src/java/org/apache/fop/fo/expr/Function.java
src/java/org/apache/fop/fo/expr/FunctionBase.java
src/java/org/apache/fop/fo/expr/InheritedPropFunction.java
src/java/org/apache/fop/fo/expr/LabelEndFunction.java
src/java/org/apache/fop/fo/expr/MaxFunction.java
src/java/org/apache/fop/fo/expr/MinFunction.java
src/java/org/apache/fop/fo/expr/NCnameProperty.java
src/java/org/apache/fop/fo/expr/NearestSpecPropFunction.java
src/java/org/apache/fop/fo/expr/Numeric.java
src/java/org/apache/fop/fo/expr/PPColWidthFunction.java
src/java/org/apache/fop/fo/expr/PropertyException.java
src/java/org/apache/fop/fo/expr/PropertyInfo.java

index b95a54ba75e46d2ac2934eda6d71a31698d31374..bb39a0fcfdc1729e09f648bdd2cb5935066ee50f 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.extensions;
 
 import org.apache.fop.fo.FONode;
@@ -62,10 +62,16 @@ import java.util.HashMap;
  */
 public class ExtensionElementMapping extends ElementMapping {
 
+    /**
+     * Constructor.
+     */
     public ExtensionElementMapping() {
         URI = "http://xml.apache.org/fop/extensions";
     }
 
+    /**
+     * Initialize the data structures.
+     */
     protected void initialize() {
         if (foObjs == null) {
             foObjs = new HashMap();
index 58f173f201620bdd081011f05e1f678ab2bdb939..9acfb1596d20a535040458534a478363c0249cd0 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import org.apache.fop.fo.Property;
 
+/**
+ * Class modelling the abs Number Function. See Sec. 5.10.1 of the XSL-FO spec.
+ */
 public class AbsFunction extends FunctionBase {
 
+    /**
+     * @return 1 (the number of arguments required for the abs function)
+     */
     public int nbArgs() {
         return 1;
     }
 
+    /**
+     * @param args array of arguments to be evaluated, the first of which
+     * should be a numeric value
+     * @param propInfo the PropertyInfo object to be evaluated
+     * @return the absolute value of the input
+     * @throws PropertyException for non-numeric input
+     */
     public Property eval(Property[] args,
                          PropertyInfo propInfo) throws PropertyException {
         Numeric num = args[0].getNumeric();
         if (num == null) {
             throw new PropertyException("Non numeric operand to abs function");
         }
-        // What if has relative composants (percent, table-col units)?
+        // TODO: What if it has relative components (percent, table-col units)?
         return new NumericProperty(num.abs());
     }
 
index 7eb3ee7731b41a147c66b9b1b7d48057b0eaee2c..c6cada8aedbbcc49046ea0bb9ffda4a915b6c72b 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import org.apache.fop.fo.Property;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.flow.ListItem;
 
+/**
+ * Class corresponding to the body-start Property Value function. See Sec.
+ * 5.10.4 of the XSL-FO spec.
+ */
 public class BodyStartFunction extends FunctionBase {
 
+    /**
+     * @return 0 (there are no arguments for body-start)
+     */
     public int nbArgs() {
         return 0;
     }
 
+    /**
+     * @param args array of arguments (none are used, but this is required by
+     * the Function interface)
+     * @param pInfo PropertyInfo object to be evaluated
+     * @return numeric object containing the calculated body-start value
+     * @throws PropertyException if called from outside of an fo:list-item
+     */
     public Property eval(Property[] args,
                          PropertyInfo pInfo) throws PropertyException {
         Numeric distance =
index 16163f6c0aaf94da204b6a4f4f38caa310482e2c..9378d320f39dbce2ad05a4213b6cdccea5be5d10 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import org.apache.fop.fo.Property;
 
 
 /**
- * Return the specified or initial value of the property on this object.
+ * This appearst to be an artificial function (??), which handles the specified
+ * or initial value of the property on this object.
  */
 public class FopPropValFunction extends FunctionBase {
 
+    /**
+     * @return 1 (the maximum number of arguments)
+     */
     public int nbArgs() {
         return 1;
     }
 
+    /**
+     *
+     * @param args array of arguments, which should either be empty, or the
+     * first of which should be an NCName corresponding to a property name
+     * @param pInfo PropertyInfo object to be evaluated
+     * @return the Property corresponding to the input
+     * @throws PropertyException for incorrect parameters
+     */
     public Property eval(Property[] args,
                          PropertyInfo pInfo) throws PropertyException {
         String propName = args[0].getString();
index f22bb948f37f495308f9a6eb8e2717eb04dfc8cd..2cc3228b33c56669db5578b713cc153d0c4e9924 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import org.apache.fop.fo.Property;
 
-
+/**
+ * Class modelling the from-parent Property Value function. See Sec. 5.10.4 of
+ * the XSL-FO spec.
+ */
 public class FromParentFunction extends FunctionBase {
 
+    /**
+     * @return 1 (maximum arguments for the from-parent function)
+     */
     public int nbArgs() {
         return 1;
     }
 
+    /**
+     * @param args array of arguments, which should either be empty, or the
+     * first of which should contain an NCName corresponding to property name
+     * @param pInfo PropertyInfo object to be evaluated
+     * @return property containing the computed value
+     * @throws PropertyException if the arguments are incorrect
+     */
     public Property eval(Property[] args,
                          PropertyInfo pInfo) throws PropertyException {
         String propName = args[0].getString();
index 4f43aefee8744b96c58d4ff37ee7e79eedb9e7f2..e6241ff16e8123f38ca25dcd7fce0d870304a9fc 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import org.apache.fop.fo.Property;
 
-
+/**
+ * Class modelling the from-table-column Property Value function. See Sec.
+ * 5.10.4 of the XSL-FO spec.
+ */
 public class FromTableColumnFunction extends FunctionBase {
 
+    /**
+     * @return 1 (maximum argumenst for the from-table-column function)
+     */
     public int nbArgs() {
         return 1;
     }
 
+    /**
+     *
+     * @param args array of arguments, which should either be empty, or the
+     * first of which should contain an NCName corresponding to a property name
+     * @param pInfo PropertyInfo object to be evaluated
+     * @return the Property corresponding to the property name specified, or, if
+     * none, for the property for which the expression is being evaluated
+     * @throws PropertyException for incorrect arguments, and (for now) in all
+     * cases, because this function is not implemented
+     */
     public Property eval(Property[] args,
                          PropertyInfo pInfo) throws PropertyException {
         String propName = args[0].getString();
index b83463c926e90492ad044d9fc7b42bb33f5c18e3..0910ec173eb30c0103b853283d72c8be82cd8fd3 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import org.apache.fop.fo.Property;
 import org.apache.fop.datatypes.PercentBase;
 
+/**
+ * Interface for managing XSL-FO Functions
+ */
 public interface Function {
+
+    /**
+     * @return the number of arguments that must be passed to this function. For
+     * example, if the function should determine the minimum of two numbers, it
+     * must be passed two arguments, one for each of the two values.
+     */
     int nbArgs();
+
+    /**
+     * @return the basis for percentage calculations
+     */
     PercentBase getPercentBase();
+
+    /**
+     * Evaluate the function
+     * @param args an array of Properties that should be evaluated
+     * @param propInfo the PropertyInfo
+     * @return the Property satisfying the function
+     * @throws PropertyException for problems when evaluating the function
+     */
     Property eval(Property[] args,
                   PropertyInfo propInfo) throws PropertyException;
 }
index d58e096b6407e296617cc7938cbe91596568daea..cd5c1c6963bacf267d333c81d4b70d1d883975f1 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import org.apache.fop.datatypes.PercentBase;
 
+/**
+ * Abstract Base class for XSL-FO functions
+ */
 public abstract class FunctionBase implements Function {
-    // abstract int nbArgs() ;
 
     /**
-     * By default, functions have no percent-based arguments.
+     * @return null (by default, functions have no percent-based arguments)
      */
     public PercentBase getPercentBase() {
         return null;
     }
 
-    /*
-     * abstract Property eval(Property[] args, PropertyInfo propInfo)
-     * throws PropertyException;
-     */
 }
 
index 86937a489893f2e60a426a986d061a0de412c2f0..7cdcdd85015851d358ea36d91306f92c40765a50 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import org.apache.fop.fo.Property;
 
-
+/**
+ * Class modelling the inherited-property-value Property Value function. See
+ * Sec. 5.10.4 of the XSL-FO standard.
+ */
 public class InheritedPropFunction extends FunctionBase {
 
+    /**
+     * @return 1 (maximum number of arguments for the inherited-property-value
+     * function)
+     */
     public int nbArgs() {
         return 1;
     }
 
+    /**
+     *
+     * @param args arguments to be evaluated
+     * @param pInfo PropertyInfo object to be evaluated
+     * @return Property satisfying the inherited-property-value
+     * @throws PropertyException for invalid parameter
+     */
     public Property eval(Property[] args,
                          PropertyInfo pInfo) throws PropertyException {
         String propName = args[0].getString();
index 402a35306059b5b93438af9b1ece63dcaf1d747e..ba129c1bac0c35097e409c339becbc0017b5a9b8 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import org.apache.fop.datatypes.Length;
@@ -59,12 +59,27 @@ import org.apache.fop.fo.LengthProperty;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.flow.ListItem;
 
+/**
+ * Class modelling the label-end Property Value function. See Sec. 5.10.4 of the
+ * XSL-FO spec.
+ */
 public class LabelEndFunction extends FunctionBase {
 
+    /**
+     * @return 0 (the number of arguments required for the label-end function)
+     */
     public int nbArgs() {
         return 0;
     }
 
+    /**
+     *
+     * @param args array of arguments for the function (none are needed, but
+     * required for the Function interface)
+     * @param pInfo PropertyInfo object for the function
+     * @return the calculated label-end value for the list
+     * @throws PropertyException if called from outside of an fo:list-item
+     */
     public Property eval(Property[] args,
                          PropertyInfo pInfo) throws PropertyException {
 
index b45aef60354a3b27a0ccd8c5f46ac808a24838c7..dc208d0aeb4d2a0d0d718d8729b01ef8d630f205 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import org.apache.fop.fo.Property;
 
-
+/**
+ * Class for managing the "max" Number Function. See Sec. 5.10.1 in the XSL-FO
+ * standard.
+ */
 public class MaxFunction extends FunctionBase {
+
+    /**
+     * @return 2 (the number of arguments required for the max function)
+     */
     public int nbArgs() {
         return 2;
     }
 
-    // Handle "numerics" if no proportional/percent parts!
+    /**
+     * Handle "numerics" if no proportional/percent parts
+     * @param args array of arguments to be processed
+     * @param pInfo PropertyInfo to be processed
+     * @return the maximum of the two args elements passed
+     * @throws PropertyException for invalid operands
+     */
     public Property eval(Property[] args,
                          PropertyInfo pInfo) throws PropertyException {
         Numeric n1 = args[0].getNumeric();
index c287772cf5da5c4b1545d84363f2394ecdaf0f97..02b4e3f620e239d9fbf3a7ee540e88cb3455d56d 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import org.apache.fop.fo.Property;
 
-
+/**
+ * Class for managing the "min" Number Function. See Sec. 5.10.1 in the XSL-FO
+ * standard.
+ */
 public class MinFunction extends FunctionBase {
+
+    /**
+     * @return 2 (the number of arguments required for the min function)
+     */
     public int nbArgs() {
         return 2;
     }
 
-    // Handle "numerics" if no proportional/percent parts!
+    /**
+     * Handle "numerics" if no proportional/percent parts
+     * @param args array of arguments to be processed
+     * @param pInfo PropertyInfo to be processed
+     * @return the minimum of the two args elements passed
+     * @throws PropertyException for invalid operands
+     */
     public Property eval(Property[] args,
                          PropertyInfo pInfo) throws PropertyException {
         Numeric n1 = args[0].getNumeric();
index 3e3471693b3b22f1a5ec31ee0d4414704eeed5f7..7fff73df2764ca69c38c7951a01aaf1e5901d460 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import org.apache.fop.fo.Property;
 import org.apache.fop.datatypes.ColorType;
 
+/**
+ * Class for handling NC Name objects
+ */
 public class NCnameProperty extends Property {
 
     private final String ncName;
 
+    /**
+     * Constructor
+     * @param ncName string representing the ncName
+     */
     public NCnameProperty(String ncName) {
         this.ncName = ncName;
     }
 
+    /**
+     * If a system color, return the corresponding value (appears to be
+     * unimplemented)
+     * @return ColorType object corresponding to the NCName
+     * @throws PropertyException in all cases currently
+     */
     public ColorType getColor() throws PropertyException {
-        // If a system color, return the corresponding value
         throw new PropertyException("Not a Color");
     }
 
     /**
-     * Return the name as a String (should be specified with quotes!)
+     * @return the name as a String (should be specified with quotes!)
      */
     public String getString() {
         return this.ncName;
     }
 
+    /**
+     * @return ncName for this
+     */
     public String getNCname() {
         return this.ncName;
     }
index c6036d5d468f715968e63fe914b7561f98f3b997..7dc64a31ca545e4df02a44a4b1282458e057fd95 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import org.apache.fop.fo.Property;
 
+/**
+ * Class modelling the from-nearest-specified-value function. See Sec. 5.10.4
+ * of the XSL-FO standard.
+ */
 public class NearestSpecPropFunction extends FunctionBase {
 
+    /**
+     * @return 1 (maximum number of arguments for from-nearest-specified-value
+     * function)
+     */
     public int nbArgs() {
         return 1;
     }
 
+    /**
+     *
+     * @param args array of arguments for the function
+     * @param pInfo PropertyInfo for the function
+     * @return Property containing the nearest-specified-value
+     * @throws PropertyException for invalid arguments to the function
+     */
     public Property eval(Property[] args,
                          PropertyInfo pInfo) throws PropertyException {
         String propName = args[0].getString();
index f5cad4257af5fe87f8df0de107d556dcb1c615b2..2845637e53e18a1db3cc02780db0b01369ac2606 100644 (file)
@@ -72,9 +72,13 @@ import org.apache.fop.datatypes.PercentBase;
  */
 public class Numeric {
     // Bit fields
-    public static final int ABS_LENGTH = 1;     // abs units (or number)
-    public static final int PC_LENGTH = 2;      // Percentage
-    public static final int TCOL_LENGTH = 4;    // Table units
+
+    /** constant for a length of absolute units (or number) */
+    public static final int ABS_LENGTH = 1;
+    /** constant for a percentage */
+    public static final int PC_LENGTH = 2;
+    /** constant for table units */
+    public static final int TCOL_LENGTH = 4;
 
     private int valType;
     private double absValue;
@@ -156,7 +160,7 @@ public class Numeric {
 
 
     /**
-     * Return the current value as a Length if possible. This constructs
+     * @return the current value as a Length if possible. This constructs
      * a new Length or Length subclass based on the current value type
      * of the Numeric.
      * If the stored value has a unit dimension other than 1, null
@@ -187,13 +191,16 @@ public class Numeric {
     }
 
     /**
-     * Return the current value as a Number if possible.
+     * @return the current value as a Number if possible.
      * Calls asDouble().
      */
     public Number asNumber() {
         return asDouble();
     }
 
+    /**
+     * @return the current value as a Double
+     */
     public Double asDouble() {
         if (dim == 0 && valType == ABS_LENGTH) {
             return new Double(absValue);
@@ -365,7 +372,8 @@ public class Numeric {
     }
 
     /**
-     * Return a Numeric which is the maximum of the current value and the
+     * @param op the operand to which the current value should be compared
+     * @return a Numeric which is the maximum of the current value and the
      * operand.
      * @throws PropertyException If the dimensions or value types of the
      * object and the operand are different.
@@ -391,7 +399,8 @@ public class Numeric {
     }
 
     /**
-     * Return a Numeric which is the minimum of the current value and the
+     * @param op the operand to which the current value should be compared
+     * @return a Numeric which is the minimum of the current value and the
      * operand.
      * @throws PropertyException If the dimensions or value types of the
      * object and the operand are different.
index c25b42a9f4cf75a916b3c3debcf1de952b3986ee..8ae05d3e441251af6c471eb812387f7a48c063a3 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 
@@ -55,17 +55,35 @@ import org.apache.fop.fo.Property;
 import org.apache.fop.fo.LengthProperty;
 import org.apache.fop.datatypes.TableColLength;
 
+/**
+ * Class modelling the proportional-column-width function. See Sec. 5.10.4 of
+ * the XSL-FO standard.
+ */
 public class PPColWidthFunction extends FunctionBase {
 
+    /**
+     * @return 1 (the number of arguments for the proportional-column-width
+     * function)
+     */
     public int nbArgs() {
         return 1;
     }
 
+    /**
+     *
+     * @param args array of arguments for this function
+     * @param pInfo PropertyInfo for this function
+     * @return numeric Property containing the units of proportional measure
+     * for this column
+     * @throws PropertyException for non-numeric operand, or if the parent
+     * element is not a table-column
+     */
     public Property eval(Property[] args,
                          PropertyInfo pInfo) throws PropertyException {
         Number d = args[0].getNumber();
         if (d == null) {
-            throw new PropertyException("Non number operand to proportional-column-width function");
+            throw new PropertyException("Non numeric operand to "
+                    + "proportional-column-width function");
         }
         if (!pInfo.getPropertyList().getElement().equals("table-column")) {
             throw new PropertyException("proportional-column-width function "
index 3c9d5a795580846b7550693d308bdf8babbaabd8..2c076cef3e89f20e10bf27fb85f686b1db6bf1e6 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
+/**
+ * Class for managing exceptions that are raised in Property processing.
+ */
 public class PropertyException extends Exception {
+
+    /**
+     * Constructor
+     * @param detail string containing the detail message
+     */
     public PropertyException(String detail) {
         super(detail);
     }
index 9731faf2d978638a7a8d887ad337edb25b9b775c..02fee893a7c48a923d5b840d9f1e2f6a577f3bb0 100644 (file)
@@ -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
  * (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 <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
- */ 
+ */
 package org.apache.fop.fo.expr;
 
 import java.util.Stack;
@@ -70,6 +70,12 @@ public class PropertyInfo {
     private FObj fo;
     private Stack stkFunction;    // Stack of functions being evaluated
 
+    /**
+     * Constructor
+     * @param maker Property.Maker object
+     * @param plist PropertyList object
+     * @param fo FObj
+     */
     public PropertyInfo(Property.Maker maker, PropertyList plist, FObj fo) {
         this.maker = maker;
         this.plist = plist;
@@ -98,20 +104,32 @@ public class PropertyInfo {
     }
 
     /**
-     * Return the current font-size value as base units (milli-points).
+     * @return the current font-size value as base units (milli-points).
      */
     public int currentFontSize() {
         return plist.get("font-size").getLength().getValue();
     }
 
+    /**
+     * accessor for FObj
+     * @return FObj
+     */
     public FObj getFO() {
         return fo;
     }
 
+    /**
+     * accessor for PropertyList
+     * @return PropertyList object
+     */
     public PropertyList getPropertyList() {
         return plist;
     }
 
+    /**
+     * push a function onto the function stack
+     * @param func function to push onto stack
+     */
     public void pushFunction(Function func) {
         if (stkFunction == null) {
             stkFunction = new Stack();
@@ -119,6 +137,9 @@ public class PropertyInfo {
         stkFunction.push(func);
     }
 
+    /**
+     * pop a function off of the function stack
+     */
     public void popFunction() {
         if (stkFunction != null) {
             stkFunction.pop();