diff options
author | William Victor Mote <vmote@apache.org> | 2003-07-15 16:18:50 +0000 |
---|---|---|
committer | William Victor Mote <vmote@apache.org> | 2003-07-15 16:18:50 +0000 |
commit | 382e6b7bdc55b8118e32bfbb7f6aca853c2fb7f8 (patch) | |
tree | 427de5376af322a4e48aa39ad72160f1507cdb48 /src/java/org | |
parent | f2b0b0e0dd08cf575d25aa95d4bd041b96bbf045 (diff) | |
download | xmlgraphics-fop-382e6b7bdc55b8118e32bfbb7f6aca853c2fb7f8.tar.gz xmlgraphics-fop-382e6b7bdc55b8118e32bfbb7f6aca853c2fb7f8.zip |
style changes only
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196716 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r-- | src/java/org/apache/fop/datatypes/FODimension.java | 6 | ||||
-rw-r--r-- | src/java/org/apache/fop/fo/SpaceProperty.java | 46 | ||||
-rw-r--r-- | src/java/org/apache/fop/fo/StringProperty.java | 47 | ||||
-rw-r--r-- | src/java/org/apache/fop/fo/TextInfo.java | 19 | ||||
-rw-r--r-- | src/java/org/apache/fop/fo/expr/PropertyParser.java | 24 |
5 files changed, 102 insertions, 40 deletions
diff --git a/src/java/org/apache/fop/datatypes/FODimension.java b/src/java/org/apache/fop/datatypes/FODimension.java index e8d8d3a55..1e15945e6 100644 --- a/src/java/org/apache/fop/datatypes/FODimension.java +++ b/src/java/org/apache/fop/datatypes/FODimension.java @@ -57,13 +57,15 @@ package org.apache.fop.datatypes; */ public class FODimension { + /** distance (in millipoints) on the inline-progression-direction */ public int ipd; + /** distance (in millipoints) on the block-progression-direction */ public int bpd; /** * Constructor - * @param ipd length (in millipoints ??) of the inline-progression-direction - * @param bpd length (in millipoints ??) of the block-progression-direction + * @param ipd length (in millipoints) of the inline-progression-direction + * @param bpd length (in millipoints) of the block-progression-direction */ public FODimension(int ipd, int bpd) { this.ipd = ipd; diff --git a/src/java/org/apache/fop/fo/SpaceProperty.java b/src/java/org/apache/fop/fo/SpaceProperty.java index d0fac678e..fde4e6a8c 100644 --- a/src/java/org/apache/fop/fo/SpaceProperty.java +++ b/src/java/org/apache/fop/fo/SpaceProperty.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,20 +42,32 @@ * (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; import org.apache.fop.datatypes.Space; import org.apache.fop.datatypes.LengthRange; +/** + * Base class used for handling properties of the fo:space-before and + * fo:space-after variety. It is extended by org.apache.fop.fo.properties.GenericSpace, + * which is extended by many other properties. + */ public class SpaceProperty extends Property { + /** + * Inner class used to create new instances of SpaceProperty + */ public static class Maker extends LengthRangeProperty.Maker { + + /** + * @param name name of the property whose Maker is to be created + */ protected Maker(String name) { super(name); } @@ -64,19 +76,31 @@ public class SpaceProperty extends Property { private Space space; + /** + * @param space the Space object (datatype) to be stored here + */ public SpaceProperty(Space space) { this.space = space; } + /** + * @return the Space (datatype) object contained here + */ public Space getSpace() { return this.space; } - /* Space extends LengthRange */ + /** + * Space extends LengthRange. + * @return the Space (datatype) object contained here + */ public LengthRange getLengthRange() { return this.space; } + /** + * @return the Space (datatype) object contained here + */ public Object getObject() { return this.space; } diff --git a/src/java/org/apache/fop/fo/StringProperty.java b/src/java/org/apache/fop/fo/StringProperty.java index ef5fa9028..2986e7ca5 100644 --- a/src/java/org/apache/fop/fo/StringProperty.java +++ b/src/java/org/apache/fop/fo/StringProperty.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,23 +42,39 @@ * (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; - +/** + * Exists primarily as a container for its Maker inner class, which is + * extended by many string-based FO property classes. + */ public class StringProperty extends Property { + /** + * Inner class for making instances of StringProperty + */ public static class Maker extends Property.Maker { + /** + * @param propName name of property for which to create a Maker + */ public Maker(String propName) { super(propName); } + /** + * Make a new StringProperty object + * @param propertyList not used + * @param value String value of the new object + * @param fo not used + * @return the StringProperty object + */ public Property make(PropertyList propertyList, String value, FObj fo) { // Work around the fact that most String properties are not @@ -91,15 +107,24 @@ public class StringProperty extends Property { private String str; + /** + * @param str String value to place in this object + */ public StringProperty(String str) { this.str = str; // System.err.println("Set StringProperty: " + str); } + /** + * @return the Object equivalent of this property + */ public Object getObject() { return this.str; } + /** + * @return the String equivalent of this property + */ public String getString() { return this.str; } diff --git a/src/java/org/apache/fop/fo/TextInfo.java b/src/java/org/apache/fop/fo/TextInfo.java index fadaec464..860bbd119 100644 --- a/src/java/org/apache/fop/fo/TextInfo.java +++ b/src/java/org/apache/fop/fo/TextInfo.java @@ -60,26 +60,37 @@ import org.apache.fop.fo.properties.TextTransform; * Collection of properties used in */ public class TextInfo { + /** object containing the font information */ public FontState fs; + /** fo:color property */ public ColorType color; + /** fo:wrap-option property */ public int wrapOption; - public boolean bWrap ; // True if wrap-option = WRAP + /** fo:wrap-option property: true if wrapOption = WRAP */ + public boolean bWrap ; + /** fo:white-space-collapse property*/ public int whiteSpaceCollapse; + /** fo:vertical-align property */ public int verticalAlign; + /** fo:line-height property */ public int lineHeight; + /** fo:text-transform property */ public int textTransform = TextTransform.NONE; // Props used for calculating inline-progression-dimension + /** fo:word-spacing property */ public SpaceVal wordSpacing; + /** fo:letter-spacing property */ public SpaceVal letterSpacing; - // Add hyphenation props too + /** can this text be hyphenated? */ public boolean bCanHyphenate = true; - // Textdecoration + /** fo:text-decoration property: is text underlined? */ public boolean underlined = false; + /** fo:text-decoration property: is text overlined? */ public boolean overlined = false; + /** fo:text-decoration property: is text overstriked? */ public boolean lineThrough = false; } - diff --git a/src/java/org/apache/fop/fo/expr/PropertyParser.java b/src/java/org/apache/fop/fo/expr/PropertyParser.java index 8fea26bc6..3d2c9b3e2 100644 --- a/src/java/org/apache/fop/fo/expr/PropertyParser.java +++ b/src/java/org/apache/fop/fo/expr/PropertyParser.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 <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.ColorType; @@ -65,7 +65,7 @@ import org.apache.fop.fo.ColorTypeProperty; import java.util.HashMap; /** - * Class to parse XSL FO property expression. + * Class to parse XSL-FO property expressions. * This class is heavily based on the epxression parser in James Clark's * XT, an XSLT processor. */ @@ -291,7 +291,7 @@ public class PropertyParser extends PropertyTokenizer { * Get the length base value object from the Maker. If null, then * this property can't have % values. Treat it as a real number. */ - double pcval = new Double(currentTokenValue.substring(0, + double pcval = new Double(currentTokenValue.substring(0, currentTokenValue.length() - 1)).doubleValue() / 100.0; // LengthBase lbase = this.propInfo.getPercentLengthBase(); PercentBase pcBase = this.propInfo.getPercentBase(); |