Browse Source

javadoc changes to clean up gump warnings.


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196344 13f79535-47bb-0310-9956-ffa450edef68
pull/30/head
William Victor Mote 21 years ago
parent
commit
a62ed1dbaa

+ 12
- 12
src/java/org/apache/fop/apps/XSLTInputHandler.java View 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
@@ -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.apps;

// Imported java.io classes
@@ -65,7 +65,7 @@ import org.apache.fop.tools.xslt.XSLTransform;
/**
* XSLTInputHandler basically takes an XML file and transforms it with an XSLT
* file and the resulting XSL-FO document is input for FOP.
* @todo add URL constructor
* (todo) add URL constructor
*/
public class XSLTInputHandler extends InputHandler {

@@ -122,7 +122,7 @@ public class XSLTInputHandler extends InputHandler {
return new InputSource(reader);
} catch (Exception ex) {
ex.printStackTrace();
/**@todo do proper logging of exceptions */
/**(todo) do proper logging of exceptions */
return null;
}
} else {

+ 1
- 1
src/java/org/apache/fop/fo/FOText.java View File

@@ -415,7 +415,7 @@ public class FOText extends FObj {
* We have not found a definition of "word" in the standard (1.0), so the
* logic used here is based on the programmer's best guess.
*
* @parameter char inputChar: the character to be tested.
* @param char inputChar: the character to be tested.
* @return int IS_WORD_CHAR_TRUE, IS_WORD_CHAR_FALSE, or IS_WORD_CHAR_MAYBE,
* depending on whether the character should be considered part of a word
* or not.

+ 15
- 15
src/java/org/apache/fop/fo/FOUserAgent.java View 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
@@ -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;

// Java
@@ -88,7 +88,7 @@ import org.apache.fop.render.RendererContext;
* with other resolveable areas
*/
public class FOUserAgent implements LogEnabled {
private Logger log;
private Map defaults = new java.util.HashMap();
private Map handlers = new java.util.HashMap();
@@ -107,7 +107,7 @@ public class FOUserAgent implements LogEnabled {
/**
* Returns the logger to use.
* @see org.apache.avalon.framework.logger.AbstractLogEnabled#getLogger()
* @todo This breaks IoC/SoC. Should be improved.
* (todo) This breaks IoC/SoC. Should be improved.
*/
public Logger getLogger() {
return this.log;
@@ -143,14 +143,14 @@ public class FOUserAgent implements LogEnabled {

/**
* Sets the parameters for PDF encryption.
* @param pdfEncryptionParams the PDF encryption parameters, null to
* @param pdfEncryptionParams the PDF encryption parameters, null to
* disable PDF encryption
*/
public void setPDFEncryptionParams(PDFEncryptionParams pdfEncryptionParams) {
this.pdfEncryptionParams = pdfEncryptionParams;
}
/**
* Get an input stream for a reference.
* Temporary solution until API better.

+ 11
- 11
src/java/org/apache/fop/fo/expr/Numeric.java View 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
@@ -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 java.util.Vector;
@@ -95,7 +95,7 @@ public class Numeric {
* is set.
* @param dim The dimension of the value. 0 for a Number, 1 for a Length
* (any type), >1, <0 if Lengths have been multiplied or divided.
* @pcBase The PercentBase object used to calculate an actual value for
* @param pcBase The PercentBase object used to calculate an actual value for
* a PC_LENGTH.
*/
protected Numeric(int valType, double absValue, double pcValue,

+ 2
- 2
src/java/org/apache/fop/fonts/CIDFont.java View File

@@ -106,11 +106,11 @@ public abstract class CIDFont extends CustomFont {
public boolean isMultiByte() {
return true;
}
/**
* Returns a PDFWArray containing all the widths of the subset to be used.
* @return the character widths
* @todo Try to avoid dependency on PDF library
* (todo) Try to avoid dependency on PDF library
*/
public abstract PDFWArray getSubsetWidths();


+ 33
- 33
src/java/org/apache/fop/fonts/CustomFont.java View 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
@@ -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.fonts;

import java.util.Map;
@@ -56,7 +56,7 @@ import java.util.Map;
/**
* Abstract base class for custom fonts loaded from files, for example.
*/
public abstract class CustomFont extends Font
public abstract class CustomFont extends Font
implements FontDescriptor, MutableFont {

private String fontName = null;
@@ -75,9 +75,9 @@ public abstract class CustomFont extends Font
private FontType fontType = FontType.TYPE1;
private int firstChar = 0;
private int lastChar = 255;
private Map kerning = new java.util.HashMap();

private boolean useKerning = true;

@@ -99,9 +99,9 @@ public abstract class CustomFont extends Font
}

/**
* Returns the lookup name to an embeddable font file available as a
* Returns the lookup name to an embeddable font file available as a
* resource.
* @todo Remove this method, this should be done using a resource: URI.
* (todo) Remove this method, this should be done using a resource: URI.
* @return the lookup name
*/
public String getEmbedResourceName() {
@@ -187,7 +187,7 @@ public abstract class CustomFont extends Font

/**
* Returns the width to be used when no width is available.
* @return a character width
* @return a character width
*/
public int getMissingWidth() {
return missingWidth;
@@ -199,7 +199,7 @@ public abstract class CustomFont extends Font
public FontType getFontType() {
return fontType;
}
/**
* Returns the index of the first character defined in this font.
* @return the index of the first character
@@ -207,7 +207,7 @@ public abstract class CustomFont extends Font
public int getFirstChar() {
return 0;
// return firstChar;
/**@todo Why is this hardcoded??? This code was in SingleByteFont.java */
/**(todo) Why is this hardcoded??? This code was in SingleByteFont.java */
}

/**
@@ -246,35 +246,35 @@ public abstract class CustomFont extends Font


/* ---- MutableFont interface ---- */
/**
* @see org.apache.fop.fonts.MutableFont#setFontName(String)
*/
public void setFontName(String name) {
this.fontName = name;
}
/**
* @see org.apache.fop.fonts.MutableFont#setEmbedFileName(String)
*/
public void setEmbedFileName(String path) {
this.embedFileName = path;
}
/**
* @see org.apache.fop.fonts.MutableFont#setEmbedResourceName(String)
*/
public void setEmbedResourceName(String name) {
this.embedResourceName = name;
}
/**
* @see org.apache.fop.fonts.MutableFont#setCapHeight(int)
*/
public void setCapHeight(int capHeight) {
this.capHeight = capHeight;
}
/**
* Returns the XHeight value of the font.
* @param xHeight the XHeight value
@@ -282,56 +282,56 @@ public abstract class CustomFont extends Font
public void setXHeight(int xHeight) {
this.xHeight = xHeight;
}
/**
* @see org.apache.fop.fonts.MutableFont#setAscender(int)
*/
public void setAscender(int ascender) {
this.ascender = ascender;
}
/**
* @see org.apache.fop.fonts.MutableFont#setDescender(int)
*/
public void setDescender(int descender) {
this.descender = descender;
}
/**
* @see org.apache.fop.fonts.MutableFont#setFontBBox(int[])
*/
public void setFontBBox(int[] bbox) {
this.fontBBox = bbox;
}
/**
* @see org.apache.fop.fonts.MutableFont#setFlags(int)
*/
public void setFlags(int flags) {
this.flags = flags;
}
/**
* @see org.apache.fop.fonts.MutableFont#setStemV(int)
*/
public void setStemV(int stemV) {
this.stemV = stemV;
}
/**
* @see org.apache.fop.fonts.MutableFont#setItalicAngle(int)
*/
public void setItalicAngle(int italicAngle) {
this.italicAngle = italicAngle;
}
/**
* @see org.apache.fop.fonts.MutableFont#setMissingWidth(int)
*/
public void setMissingWidth(int width) {
this.missingWidth = width;
}
/**
* @see org.apache.fop.fonts.MutableFont#setFontType(FontType)
*/
@@ -345,14 +345,14 @@ public abstract class CustomFont extends Font
public void setFirstChar(int index) {
this.firstChar = index;
}
/**
* @see org.apache.fop.fonts.MutableFont#setLastChar(int)
*/
public void setLastChar(int index) {
this.lastChar = index;
}
/**
* @see org.apache.fop.fonts.MutableFont#setKerningEnabled(boolean)
*/

+ 18
- 18
src/java/org/apache/fop/image/FopImage.java View 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
@@ -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.image;

import java.io.InputStream;
@@ -115,7 +115,7 @@ public interface FopImage {
* @return the color space
*/
ColorSpace getColorSpace();
/**
* Returns the ICC profile.
* @return the ICC profile, null if none is available
@@ -133,21 +133,21 @@ public interface FopImage {
* @return True if it is transparent
*/
boolean isTransparent();
/**
* For transparent images. Returns the transparent color.
* @return the transparent color
* @todo Remove the PDF dependency
* (todo) Remove the PDF dependency
*/
PDFColor getTransparentColor();
/**
* Indicates whether the image has a Soft Mask (See section 7.5.4 in the
* Indicates whether the image has a Soft Mask (See section 7.5.4 in the
* PDF specs)
* @return True if a Soft Mask exists
*/
boolean hasSoftMask();
/**
* For images with a Soft Mask. Returns the Soft Mask as an array.
* @return the Soft Mask
@@ -155,7 +155,7 @@ public interface FopImage {
byte[] getSoftMask();

/**
* Returns the decoded and uncompressed image as a array of
* Returns the decoded and uncompressed image as a array of
* width * height * [colorspace-multiplicator] pixels.
* @return the bitmap
*/
@@ -172,7 +172,7 @@ public interface FopImage {
* @return the raw image
*/
byte[] getRessourceBytes();
/**
* Returns the number of bytes of the raw image.
* @return the size in bytes

+ 11
- 11
src/java/org/apache/fop/image/analyser/XMLReader.java View 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
@@ -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.image.analyser;

// Java
@@ -106,7 +106,7 @@ public class XMLReader implements ImageReader {
/**
* Creates an ImageInfo object from an XML image read from a stream.
*
* @todo This means the external svg document will be loaded twice. Possibly need
* (todo) This means the external svg document will be loaded twice. Possibly need
* a slightly different design for the image stuff.
*
* @param uri The URI to the image

+ 12
- 12
src/java/org/apache/fop/layout/AreaClass.java View 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
@@ -42,19 +42,19 @@
* (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.layout;

import org.apache.fop.apps.FOPException;

/**
* This class defines area classes.
* @todo Would better be replaced by an Enum (Avalon or Commons)
* (todo) Would better be replaced by an Enum (Avalon or Commons)
*/
public class AreaClass {
public static final String UNASSIGNED = "unassigned";
@@ -67,7 +67,7 @@ public class AreaClass {

// checker method
public static String setAreaClass(String areaClass) throws FOPException {
if (areaClass.equals(XSL_NORMAL)
if (areaClass.equals(XSL_NORMAL)
|| areaClass.equals(XSL_ABSOLUTE)
|| areaClass.equals(XSL_FOOTNOTE)
|| areaClass.equals(XSL_SIDE_FLOAT)

+ 11
- 11
src/java/org/apache/fop/layout/hyphenation/HyphenationException.java View 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
@@ -42,17 +42,17 @@
* (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.layout.hyphenation;

/**
* @author Carlos Villegas <cav@uniscope.co.jp>
* @todo Derive from FOPException
* (todo) Derive from FOPException
*/
public class HyphenationException extends Exception {


+ 1
- 1
src/java/org/apache/fop/layout/hyphenation/TernaryTree.java View File

@@ -123,7 +123,7 @@ public class TernaryTree implements Cloneable, Serializable {
protected char[] eq;

/**
* <P>The character stored in this node: splitchar
* <P>The character stored in this node: splitchar.
* Two special values are reserved:</P>
* <ul><li>0x0000 as string terminator</li>
* <li>0xFFFF to indicate that the branch starting at

+ 12
- 12
src/java/org/apache/fop/layoutmgr/LayoutProcessor.java View 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
@@ -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.layoutmgr;

import org.apache.fop.fo.flow.Marker;
@@ -149,7 +149,7 @@ public interface LayoutProcessor extends LayoutManager {
* area passed in.
*
* @param childArea the child area to get the parent for
* @return the parent Area
* @return the parent Area
*/
Area getParentArea(Area childArea);

@@ -191,7 +191,7 @@ public interface LayoutProcessor extends LayoutManager {

/**
* Add an id to the page.
* @todo add the location of the area on the page
* (todo) add the location of the area on the page
*
* @param id the id reference to add.
*/

+ 11
- 11
src/java/org/apache/fop/pdf/PDFImage.java View 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
@@ -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.pdf;

import java.io.IOException;
@@ -73,7 +73,7 @@ public interface PDFImage {
* add an ICC profile to the document).
*
* @param doc the PDF parent document
* @todo Remove this and deletgate to the XObject
* (todo) Remove this and delegate to the XObject
*/
void setup(PDFDocument doc);


+ 5
- 5
src/java/org/apache/fop/render/AbstractRenderer.java View File

@@ -176,7 +176,7 @@ public abstract class AbstractRenderer extends AbstractLogEnabled
}

/**
* @param ext <todo> Description of the Parameter
* @param ext (todo) Description of the Parameter
* @see org.apache.fop.render.Renderer
*/
public void renderExtension(TreeExt ext) { }
@@ -293,7 +293,7 @@ public abstract class AbstractRenderer extends AbstractLogEnabled
}

/**
* <todo> Description of the Method
* (todo) Description of the Method
*
* @param ctm The coordinate transformation matrix to use
*/
@@ -311,7 +311,7 @@ public abstract class AbstractRenderer extends AbstractLogEnabled
}

/**
* <todo> Description of the Method
* (todo) Description of the Method
*/
protected void endVParea() { }

@@ -550,7 +550,7 @@ public abstract class AbstractRenderer extends AbstractLogEnabled
*
* @param image The image
* @param pos The target position of the image
* <todo> Make renderImage() protected
* (todo) Make renderImage() protected
*/
public void renderImage(Image image, Rectangle2D pos) {
// Default: do nothing.
@@ -576,7 +576,7 @@ public abstract class AbstractRenderer extends AbstractLogEnabled
*
* @param fo The foreign object area
* @param pos The target position of the foreign object
* <todo> Make renderForeignObject() protected
* (todo) Make renderForeignObject() protected
*/
public void renderForeignObject(ForeignObject fo, Rectangle2D pos) {
// Default: do nothing.

+ 22
- 22
src/java/org/apache/fop/render/ps/PSDocumentGraphics2D.java View 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
@@ -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.render.ps;

//Java
@@ -75,7 +75,7 @@ import org.apache.fop.layout.FontInfo;
* @see org.apache.fop.svg.PSGraphics2D
*/
public class PSDocumentGraphics2D extends PSGraphics2D {
private int width;
private int height;

@@ -122,26 +122,26 @@ public class PSDocumentGraphics2D extends PSGraphics2D {

//Setup for PostScript generation
setPSGenerator(new PSGenerator(stream));
//PostScript Header
gen.writeln(DSCConstants.PS_ADOBE_30);
gen.writeDSCComment(DSCConstants.CREATOR,
gen.writeDSCComment(DSCConstants.CREATOR,
new String[] {"FOP PostScript Transcoder for SVG"});
gen.writeDSCComment(DSCConstants.CREATION_DATE,
gen.writeDSCComment(DSCConstants.CREATION_DATE,
new Object[] {new java.util.Date()});
gen.writeDSCComment(DSCConstants.PAGES, new Object[] {new Integer(1)});
gen.writeDSCComment(DSCConstants.BBOX, new Object[]
{zero, zero, pagewidth, pageheight});
gen.writeDSCComment(DSCConstants.END_COMMENTS);
//Defaults
gen.writeDSCComment(DSCConstants.BEGIN_DEFAULTS);
gen.writeDSCComment(DSCConstants.END_DEFAULTS);
//Prolog
gen.writeDSCComment(DSCConstants.BEGIN_PROLOG);
gen.writeDSCComment(DSCConstants.END_PROLOG);
//Setup
gen.writeDSCComment(DSCConstants.BEGIN_SETUP);
PSProcSets.writeFOPStdProcSet(gen);
@@ -151,15 +151,15 @@ public class PSDocumentGraphics2D extends PSGraphics2D {

//Start page
Integer pageNumber = new Integer(1);
gen.writeDSCComment(DSCConstants.PAGE, new Object[]
gen.writeDSCComment(DSCConstants.PAGE, new Object[]
{pageNumber.toString(), pageNumber});
gen.writeDSCComment(DSCConstants.PAGE_BBOX, new Object[]
{zero, zero, pagewidth, pageheight});
gen.writeDSCComment(DSCConstants.BEGIN_PAGE_SETUP);
gen.writeDSCComment(DSCConstants.BEGIN_PAGE_SETUP);
gen.writeln("FOPFonts begin");
gen.writeln("0.001 0.001 scale");
gen.concatMatrix(1, 0, 0, -1, 0, pageheight.doubleValue() * 1000);
gen.writeDSCComment(DSCConstants.END_PAGE_SETUP);
gen.writeDSCComment(DSCConstants.END_PAGE_SETUP);

}

@@ -212,7 +212,7 @@ public class PSDocumentGraphics2D extends PSGraphics2D {
* @param col the background colour to fill
*/
public void setBackgroundColor(Color col) {
/**@todo Implement this */
/**(todo) Implement this */
/*
Color c = col;
PDFColor currentColour = new PDFColor(c.getRed(), c.getGreen(), c.getBlue());
@@ -236,7 +236,7 @@ public class PSDocumentGraphics2D extends PSGraphics2D {
*/
public void finish() throws IOException {
//Finish page
gen.writeln("showpage");
gen.writeln("showpage");
gen.writeDSCComment(DSCConstants.PAGE_TRAILER);
gen.writeDSCComment(DSCConstants.END_PAGE);


+ 12
- 12
src/java/org/apache/fop/render/ps/PSTextPainter.java View 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
@@ -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.render.ps;

import java.awt.Graphics2D;
@@ -84,8 +84,8 @@ import org.apache.fop.layout.FontInfo;
* drawString. If the text is complex or the cannot be translated
* into a simple drawString the StrokingTextPainter is used instead.
*
* @todo handle underline, overline and strikethrough
* @todo use drawString(AttributedCharacterIterator iterator...) for some
* (todo) handle underline, overline and strikethrough
* (todo) use drawString(AttributedCharacterIterator iterator...) for some
*
* @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
* @version $Id: PSTextPainter.java,v 1.15 2003/01/08 14:03:55 jeremias Exp $

+ 19
- 19
src/java/org/apache/fop/servlet/FopPrintServlet.java View 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
@@ -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.servlet;

import java.io.File;
@@ -94,13 +94,13 @@ import org.apache.fop.render.awt.AWTRenderer;
* Example URL: http://servername/fop/servlet/FopPrintServlet?fo=readme.fo
* <br/>
* Example URL: http://servername/fop/servlet/FopPrintServlet?xml=data.xml&xsl=format.xsl
*
*
* @author <a href="mailto:fop-dev@xml.apache.org">Apache XML FOP Development Team</a>
* @version $Id: FopPrintServlet.java,v 1.2 2003/03/07 09:48:05 jeremias Exp $
* @todo Doesn't work since there's no AWTRenderer at the moment. Revisit when
* (todo) Doesn't work since there's no AWTRenderer at the moment. Revisit when
* available.
* @todo Don't use XSLTInputHandler anymore
* @todo Ev. add caching mechanism for Templates objects
* (todo) Don't use XSLTInputHandler anymore
* (todo) Ev. add caching mechanism for Templates objects
*/
public class FopPrintServlet extends HttpServlet {

@@ -110,7 +110,7 @@ public class FopPrintServlet extends HttpServlet {
protected static final String XML_REQUEST_PARAM = "xml";
/** Name of the parameter used for the XSLT file */
protected static final String XSLT_REQUEST_PARAM = "xslt";
/** Logger to give to FOP */
protected Logger log = null;
/** The TransformerFactory to use to create Transformer instances */
@@ -213,8 +213,8 @@ public class FopPrintServlet extends HttpServlet {
// private helper, tell (browser) user that file printed
private void reportOK(HttpServletResponse response)
throws ServletException {
String sMsg = "<html><title>Success</title>\n"
+ "<body><h1>FopPrintServlet: </h1>"
String sMsg = "<html><title>Success</title>\n"
+ "<body><h1>FopPrintServlet: </h1>"
+ "<h3>The requested data was printed</h3></body></html>";

response.setContentType("text/html");
@@ -270,12 +270,12 @@ public class FopPrintServlet extends HttpServlet {
//removePage(
// Integer.parseInt((String) numbers.elementAt(i)));
}
try {
printerJob.print();
} catch (PrinterException e) {
e.printStackTrace();
throw new IOException("Unable to print: "
throw new IOException("Unable to print: "
+ e.getClass().getName() + ": " + e.getMessage());
}
}

+ 27
- 27
src/java/org/apache/fop/servlet/FopServlet.java View 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
@@ -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.servlet;

import java.io.ByteArrayOutputStream;
@@ -91,22 +91,22 @@ import org.apache.fop.apps.FOPException;
* <br/>
* Example URL: http://servername/fop/servlet/FopServlet?xml=data.xml&xslt=format.xsl
* <br/>
* For this to work with Internet Explorer, you might need to append "&ext=.pdf"
* For this to work with Internet Explorer, you might need to append "&ext=.pdf"
* to the URL.
*
*
* @author <a href="mailto:fop-dev@xml.apache.org">Apache XML FOP Development Team</a>
* @version $Id: FopServlet.java,v 1.2 2003/03/07 09:48:05 jeremias Exp $
* @todo Ev. add caching mechanism for Templates objects
* (todo) Ev. add caching mechanism for Templates objects
*/
public class FopServlet extends HttpServlet {
/** Name of the parameter used for the XSL-FO file */
protected static final String FO_REQUEST_PARAM = "fo";
/** Name of the parameter used for the XML file */
protected static final String XML_REQUEST_PARAM = "xml";
/** Name of the parameter used for the XSLT file */
protected static final String XSLT_REQUEST_PARAM = "xslt";
/** Logger to give to FOP */
protected Logger log = null;
/** The TransformerFactory to use to create Transformer instances */
@@ -130,7 +130,7 @@ public class FopServlet extends HttpServlet {
String foParam = request.getParameter(FO_REQUEST_PARAM);
String xmlParam = request.getParameter(XML_REQUEST_PARAM);
String xsltParam = request.getParameter(XSLT_REQUEST_PARAM);
//Analyze parameters and decide with method to use
byte[] content = null;
if (foParam != null) {
@@ -167,24 +167,24 @@ public class FopServlet extends HttpServlet {
}

/**
* Renders an XSL-FO file into a PDF file. The PDF is written to a byte
* Renders an XSL-FO file into a PDF file. The PDF is written to a byte
* array that is returned as the method's result.
* @param fo the XSL-FO file
* @return byte[] the rendered PDF file
* @throws FOPException If an error occurs during the rendering of the
* @throws FOPException If an error occurs during the rendering of the
* XSL-FO
* @throws TransformerException If an error occurs while parsing the input
* file
*/
protected byte[] renderFO(String fo)
throws FOPException, TransformerException {
//Setup source
Source foSrc = convertString2Source(fo);

//Setup the identity transformation
Transformer transformer = this.transFactory.newTransformer();
//Start transformation and rendering process
return render(foSrc, transformer);
}
@@ -196,12 +196,12 @@ public class FopServlet extends HttpServlet {
* @param xml the XML file
* @param xslt the XSLT file
* @return byte[] the rendered PDF file
* @throws FOPException If an error occurs during the rendering of the
* @throws FOPException If an error occurs during the rendering of the
* XSL-FO
* @throws TransformerException If an error occurs during XSL
* transformation
*/
protected byte[] renderXML(String xml, String xslt)
protected byte[] renderXML(String xml, String xslt)
throws FOPException, TransformerException {

//Setup sources
@@ -218,18 +218,18 @@ public class FopServlet extends HttpServlet {
/**
* Renders an input file (XML or XSL-FO) into a PDF file. It uses the JAXP
* transformer given to optionally transform the input document to XSL-FO.
* The transformer may be an identity transformer in which case the input
* The transformer may be an identity transformer in which case the input
* must already be XSL-FO. The PDF is written to a byte array that is
* returned as the method's result.
* @param src Input XML or XSL-FO
* @param transformer Transformer to use for optional transformation
* @return byte[] the rendered PDF file
* @throws FOPException If an error occurs during the rendering of the
* @throws FOPException If an error occurs during the rendering of the
* XSL-FO
* @throws TransformerException If an error occurs during XSL
* transformation
*/
protected byte[] render(Source src, Transformer transformer)
protected byte[] render(Source src, Transformer transformer)
throws FOPException, TransformerException {

//Setup FOP
@@ -241,10 +241,10 @@ public class FopServlet extends HttpServlet {
//Setup output
ByteArrayOutputStream out = new ByteArrayOutputStream();
driver.setOutputStream(out);
//Make sure the XSL transformation's result is piped through to FOP
Result res = new SAXResult(driver.getContentHandler());
//Start the transformation and rendering process
transformer.transform(src, res);


+ 12
- 12
src/java/org/apache/fop/svg/PDFTextPainter.java View 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
@@ -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.svg;

import java.awt.Graphics2D;
@@ -84,8 +84,8 @@ import org.apache.fop.layout.FontInfo;
* drawString. If the text is complex or the cannot be translated
* into a simple drawString the StrokingTextPainter is used instead.
*
* @todo handle underline, overline and strikethrough
* @todo use drawString(AttributedCharacterIterator iterator...) for some
* (todo) handle underline, overline and strikethrough
* (todo) use drawString(AttributedCharacterIterator iterator...) for some
*
* @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
* @version $Id: PDFTextPainter.java,v 1.16 2003/03/07 09:51:25 jeremias Exp $

Loading…
Cancel
Save