*/
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;
* ============================================================================
* 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;
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);
}
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;
}
* ============================================================================
* 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;
-
+/**
+ * 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
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;
}
* 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;
}
-
* ============================================================================
* 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.ColorType;
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.
*/
* 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();