xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vhenneb...@apache.org
Subject svn commit: r986451 [10/13] - in /xmlgraphics/fop/branches/Temp_ComplexScripts: ./ examples/plan/src/org/apache/fop/plan/ src/codegen/java/org/apache/fop/tools/ src/codegen/unicode/data/ src/codegen/unicode/java/org/apache/fop/hyphenation/ src/codegen/...
Date Tue, 17 Aug 2010 18:57:15 GMT
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/Renderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/Renderer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/Renderer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/Renderer.java Tue Aug 17 18:57:04 2010
@@ -149,7 +149,7 @@ public interface Renderer {
      * Tells the renderer that a new page sequence starts.
      *
      * @param seqTitle  The title of the page sequence
-     * @deprecated Use startPageSequence(PageSequence) instead
+     * @deprecated Use {@link #startPageSequence(PageSequence)} instead
      */
     void startPageSequence(LineArea seqTitle);
 
@@ -162,7 +162,7 @@ public interface Renderer {
 
     /**
      * Tells the renderer to render a particular page. A renderer typically
-     * reponds by packing up the current page and writing it immediately to the
+     * responds by packing up the current page and writing it immediately to the
      * output device.
      *
      * @param page              The page to be rendered

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/RendererEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/RendererEventProducer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/RendererEventProducer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/RendererEventProducer.java Tue Aug 17 18:57:04 2010
@@ -30,7 +30,10 @@ import org.apache.fop.events.EventProduc
 public interface RendererEventProducer extends EventProducer {
 
     /** Provider class for the event producer. */
-    class Provider {
+    final class Provider {
+
+        private Provider() {
+        }
 
         /**
          * Returns an event producer.

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPForeignAttributeReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPForeignAttributeReader.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPForeignAttributeReader.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPForeignAttributeReader.java Tue Aug 17 18:57:04 2010
@@ -35,7 +35,7 @@ import org.apache.fop.render.afp.extensi
  * Parses any AFP foreign attributes
  */
 public class AFPForeignAttributeReader {
-    private static final Log log = LogFactory.getLog("org.apache.xmlgraphics.afp");
+    private static final Log LOG = LogFactory.getLog("org.apache.xmlgraphics.afp");
 
     /** the resource-name attribute */
     public static final QName RESOURCE_NAME = new QName(
@@ -94,7 +94,7 @@ public class AFPForeignAttributeReader {
                         = (String)foreignAttributes.get(RESOURCE_GROUP_FILE);
                     if (resourceGroupFile == null) {
                         String msg = RESOURCE_GROUP_FILE + " not specified";
-                        log.error(msg);
+                        LOG.error(msg);
                         throw new UnsupportedOperationException(msg);
                     }
                     File resourceExternalGroupFile = new File(resourceGroupFile);
@@ -106,20 +106,20 @@ public class AFPForeignAttributeReader {
                     } catch (SecurityException ex) {
                         String msg = "unable to gain write access to external resource file: "
                         + resourceGroupFile;
-                        log.error(msg);
+                        LOG.error(msg);
                     }
 
                     try {
                         boolean exists = resourceExternalGroupFile.exists();
                         if (exists) {
-                            log.warn("overwriting external resource file: "
+                            LOG.warn("overwriting external resource file: "
                                     + resourceGroupFile);
                         }
                         resourceLevel.setExternalFilePath(resourceGroupFile);
                     } catch (SecurityException ex) {
                         String msg = "unable to gain read access to external resource file: "
                             + resourceGroupFile;
-                        log.error(msg);
+                        LOG.error(msg);
                     }
                 }
             }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java Tue Aug 17 18:57:04 2010
@@ -86,9 +86,10 @@ public class AFPImageHandlerRenderedImag
         return imageObjectInfo;
     }
 
-    private AFPDataObjectInfo updateDataObjectInfo(AFPImageObjectInfo imageObjectInfo,
-            AFPPaintingState paintingState, ImageRendered imageRendered, Dimension targetSize)
-            throws IOException {
+    private AFPDataObjectInfo updateDataObjectInfo              // CSOK: MethodLength
+        (AFPImageObjectInfo imageObjectInfo,
+         AFPPaintingState paintingState, ImageRendered imageRendered, Dimension targetSize)
+        throws IOException {
 
         long start = System.currentTimeMillis();
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPImageHandlerSVG.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPImageHandlerSVG.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPImageHandlerSVG.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPImageHandlerSVG.java Tue Aug 17 18:57:04 2010
@@ -65,7 +65,7 @@ public class AFPImageHandlerSVG implemen
         BatikImageFlavors.SVG_DOM
     };
 
-    /** {@inheritDoc} */
+    /** @return a new AFP data object info instance */
     protected AFPDataObjectInfo createDataObjectInfo() {
         return new AFPGraphicsObjectInfo();
     }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPInfo.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPInfo.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPInfo.java Tue Aug 17 18:57:04 2010
@@ -256,7 +256,8 @@ public final class AFPInfo {
     public boolean strokeText() {
         boolean strokeText = false;
         if (handlerConfiguration != null) {
-            strokeText = handlerConfiguration.getChild("stroke-text", true).getValueAsBoolean(strokeText);
+            strokeText
+                = handlerConfiguration.getChild("stroke-text", true).getValueAsBoolean(strokeText);
         }
         return strokeText;
     }
@@ -286,8 +287,9 @@ public final class AFPInfo {
      * @return a newly created AFPGraphics2D
      */
     public AFPGraphics2D createGraphics2D(boolean textAsShapes) {
-        AFPGraphics2D g2d = new AFPGraphics2D(
-                    textAsShapes, paintingState, resourceManager, resourceInfo, fontInfo);
+        AFPGraphics2D g2d
+            = new AFPGraphics2D
+            (textAsShapes, paintingState, resourceManager, resourceInfo, fontInfo);
         g2d.setGraphicContext(new org.apache.xmlgraphics.java2d.GraphicContext());
         return g2d;
     }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPPainter.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPPainter.java Tue Aug 17 18:57:04 2010
@@ -281,7 +281,8 @@ public class AFPPainter extends Abstract
             return mpt / 1000f;
         }
 
-        protected void drawBorderLine(int x1, int y1, int x2, int y2, boolean horz,
+        protected void drawBorderLine                           // CSOK: ParameterNumber
+            (int x1, int y1, int x2, int y2, boolean horz,
                 boolean startOrBefore, int style, Color color) throws IOException {
             BorderPaintingInfo borderPaintInfo = new BorderPaintingInfo(
                     toPoints(x1), toPoints(y1), toPoints(x2), toPoints(y2),
@@ -316,9 +317,9 @@ public class AFPPainter extends Abstract
     }
 
     /** {@inheritDoc} */
-    public void drawText(int x, int y,
-            final int letterSpacing, final int wordSpacing, final int[] dx,
-            final String text) throws IFException {
+    public void drawText                                        // CSOK: MethodLength
+        (int x, int y, final int letterSpacing, final int wordSpacing, final int[] dx,
+         final String text) throws IFException {
         final int fontSize = this.state.getFontSize();
         getPaintingState().setFontSize(fontSize);
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPRenderer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPRenderer.java Tue Aug 17 18:57:04 2010
@@ -404,9 +404,11 @@ public class AFPRenderer extends Abstrac
     }
 
     /** {@inheritDoc} */
-    public void drawBorderLine(float x1, float y1, float x2, float y2,
-            boolean horz, boolean startOrBefore, int style, Color col) {
-        BorderPaintingInfo borderPaintInfo = new BorderPaintingInfo(x1, y1, x2, y2, horz, style, col);
+    public void drawBorderLine                                  // CSOK: ParameterNumber
+        (float x1, float y1, float x2, float y2,
+         boolean horz, boolean startOrBefore, int style, Color col) {
+        BorderPaintingInfo borderPaintInfo
+            = new BorderPaintingInfo(x1, y1, x2, y2, horz, style, col);
         borderPainter.paint(borderPaintInfo);
     }
 
@@ -654,7 +656,8 @@ public class AFPRenderer extends Abstrac
         textDataInfo.setString(textString);
 
         try {
-            dataStream.createText(textDataInfo, textLetterSpaceAdjust, textWordSpaceAdjust, fnt, charSet);
+            dataStream.createText
+                (textDataInfo, textLetterSpaceAdjust, textWordSpaceAdjust, fnt, charSet);
         } catch (UnsupportedEncodingException e) {
             AFPEventProducer eventProducer
                 = AFPEventProducer.Provider.get(userAgent.getEventBroadcaster());
@@ -784,7 +787,8 @@ public class AFPRenderer extends Abstrac
                         if (AFPElementMapping.INCLUDE_PAGE_OVERLAY.equals(element)) {
                             String overlay = ipo.getName();
                             if (overlay != null) {
-                                dataStream.createIncludePageOverlay(overlay, ipo.getX(), ipo.getY());
+                                dataStream.createIncludePageOverlay
+                                    (overlay, ipo.getX(), ipo.getY());
                             }
                         }
                     }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java Tue Aug 17 18:57:04 2010
@@ -149,7 +149,7 @@ public class AFPRendererConfigurator ext
      * @param encoding character encoding e.g. 'Cp500', 'UnicodeBigUnmarked'
      * @param accessor
      * @param afpFontCfg
-     * @return
+     * @return the created AFPFont
      * @throws ConfigurationException
      */
     private AFPFont fontFromType(String type, String codepage, String encoding,

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPRenderingContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPRenderingContext.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPRenderingContext.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPRenderingContext.java Tue Aug 17 18:57:04 2010
@@ -43,6 +43,7 @@ public class AFPRenderingContext extends
      * Main constructor.
      * @param userAgent the user agent
      * @param resourceManager the resource manager
+     * @param paintingState the painting state
      * @param fontInfo the font list
      * @param foreignAttributes a map of foreign attributes
      */
@@ -70,6 +71,7 @@ public class AFPRenderingContext extends
         return this.resourceManager;
     }
 
+    /** @return painting state */
     public AFPPaintingState getPaintingState() {
         return this.paintingState;
     }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPSVGHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPSVGHandler.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPSVGHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/AFPSVGHandler.java Tue Aug 17 18:57:04 2010
@@ -174,7 +174,8 @@ public class AFPSVGHandler extends Abstr
         return objectAreaInfo;
     }
 
-    private AFPGraphicsObjectInfo createGraphicsObjectInfo(AFPPaintingState paintingState, Graphics2DImagePainter painter,
+    private AFPGraphicsObjectInfo createGraphicsObjectInfo
+        (AFPPaintingState paintingState, Graphics2DImagePainter painter,
             FOUserAgent userAgent, AFPResourceInfo resourceInfo, AFPGraphics2D g2d) {
         AFPGraphicsObjectInfo graphicsObjectInfo = new AFPGraphicsObjectInfo();
 
@@ -193,6 +194,11 @@ public class AFPSVGHandler extends Abstr
         return graphicsObjectInfo;
     }
 
+    /**
+     * @param userAgent a user agent instance
+     * @param g2d a graphics context
+     * @return a bridge context
+     */
     public static BridgeContext createBridgeContext(FOUserAgent userAgent, AFPGraphics2D g2d) {
         ImageManager imageManager = userAgent.getFactory().getImageManager();
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java Tue Aug 17 18:57:04 2010
@@ -19,8 +19,6 @@
 
 package org.apache.fop.render.afp.extensions;
 
-import java.net.URI;
-
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.AttributesImpl;

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/awt/AWTRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/awt/AWTRenderer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/awt/AWTRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/awt/AWTRenderer.java Tue Aug 17 18:57:04 2010
@@ -60,10 +60,10 @@ public class AWTRenderer extends Java2DR
     public static final String MIME_TYPE = MimeConstants.MIME_FOP_AWT_PREVIEW;
 
     /** flag for debugging */
-    public boolean debug;
+    public boolean debug;                                       // CSOK: VisibilityModifier
 
     /** If true, preview dialog is shown. */
-    public boolean dialogDisplay = true;
+    public boolean dialogDisplay = true;                        // CSOK: VisibilityModifier
 
     /** true if the preview dialog should be the main window of the application */
     private boolean previewAsMainWindow;

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/awt/viewer/ImageProxyPanel.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/awt/viewer/ImageProxyPanel.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/awt/viewer/ImageProxyPanel.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/awt/viewer/ImageProxyPanel.java Tue Aug 17 18:57:04 2010
@@ -106,7 +106,7 @@ public class ImageProxyPanel extends JPa
     /**
      * Gets the image data and paints it on screen. Will make
      * calls to getPageImage as required.
-     * @param graphics
+     * @param graphics a graphics context
      * @see javax.swing.JComponent#paintComponent(Graphics)
      * @see org.apache.fop.render.java2d.Java2DRenderer#getPageImage(int)
      */

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java Tue Aug 17 18:57:04 2010
@@ -17,11 +17,12 @@
 
 /* $Id$ */
 
+package org.apache.fop.render.awt.viewer;
+
 // Originally contributed by:
 // Juergen Verwohlt: Juergen.Verwohlt@jCatalog.com,
 // Rainer Steinkuhle: Rainer.Steinkuhle@jCatalog.com,
 // Stanislav Gorkhover: Stanislav.Gorkhover@jCatalog.com
-package org.apache.fop.render.awt.viewer;
 
 // Java
 import java.awt.BorderLayout;
@@ -105,7 +106,8 @@ public class PreviewDialog extends JFram
      * @param renderable the Renderable instance that is used to reload/re-render a document
      *                   after modifications.
      */
-    public PreviewDialog(FOUserAgent foUserAgent, Renderable renderable) {
+    public PreviewDialog                                        // CSOK: MethodLength
+        (FOUserAgent foUserAgent, Renderable renderable) {
         renderer = (AWTRenderer) foUserAgent.getRendererOverride();
         this.foUserAgent = foUserAgent;
         this.configuredTargetResolution = this.foUserAgent.getTargetResolution();
@@ -579,7 +581,10 @@ public class PreviewDialog extends JFram
         }
     }
 
-    /** Prints the document */
+    /**
+     * Prints the document.
+     * @param showDialog true if show dialog
+     */
     public void startPrinterJob(boolean showDialog) {
         //Restore originally configured target resolution
         float saveResolution = foUserAgent.getTargetResolution();

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/bitmap/BitmapRendererEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/bitmap/BitmapRendererEventProducer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/bitmap/BitmapRendererEventProducer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/bitmap/BitmapRendererEventProducer.java Tue Aug 17 18:57:04 2010
@@ -30,7 +30,10 @@ import org.apache.fop.events.EventProduc
 public interface BitmapRendererEventProducer extends EventProducer {
 
     /** Provider class for the event producer. */
-    class Provider {
+    final class Provider {
+
+        private Provider() {
+        }
 
         /**
          * Returns an event producer.

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java Tue Aug 17 18:57:04 2010
@@ -219,10 +219,12 @@ public class TIFFRenderer extends Java2D
         }
     }
 
+    /** @param bufferedImageType an image type */
     public void setBufferedImageType(int bufferedImageType) {
         this.bufferedImageType = bufferedImageType;
     }
 
+    /** @return image writer parameters */
     public ImageWriterParams getWriterParams() {
         return writerParams;
     }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java Tue Aug 17 18:57:04 2010
@@ -19,9 +19,6 @@
 
 package org.apache.fop.render.intermediate;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.apache.fop.apps.FOUserAgent;
 
 /**
@@ -29,9 +26,6 @@ import org.apache.fop.apps.FOUserAgent;
  */
 public abstract class AbstractIFDocumentHandler implements IFDocumentHandler {
 
-    /** logging instance */
-    private static Log log = LogFactory.getLog(AbstractIFDocumentHandler.class);
-
     private IFContext ifContext;
 
     /**

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/BorderPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/BorderPainter.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/BorderPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/BorderPainter.java Tue Aug 17 18:57:04 2010
@@ -41,7 +41,7 @@ public abstract class BorderPainter {
      * @param bpsEnd the border specification on the end side
      * @throws IOException if an I/O error occurs while creating the borders
      */
-    public void drawBorders(Rectangle borderRect,
+    public void drawBorders(Rectangle borderRect,               // CSOK: MethodLength
             BorderProps bpsBefore, BorderProps bpsAfter,
             BorderProps bpsStart, BorderProps bpsEnd) throws IOException {
         int startx = borderRect.x;
@@ -217,8 +217,9 @@ public abstract class BorderPainter {
      * @param color the border color
      * @throws IOException if an I/O error occurs
      */
-    protected abstract void drawBorderLine(int x1, int y1, int x2, int y2,
-            boolean horz, boolean startOrBefore, int style, Color color) throws IOException;
+    protected abstract void drawBorderLine                      // CSOK: ParameterNumber
+        (int x1, int y1, int x2, int y2,
+         boolean horz, boolean startOrBefore, int style, Color color) throws IOException;
 
     /**
      * Draws a line/rule.

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFConstants.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFConstants.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFConstants.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFConstants.java Tue Aug 17 18:57:04 2010
@@ -33,22 +33,39 @@ public interface IFConstants extends XML
     /** XML namespace of the intermediate format. */
     String NAMESPACE = "http://xmlgraphics.apache.org/fop/intermediate";
 
+    /** element name document */
     String EL_DOCUMENT = "document";
+    /** element name header */
     String EL_HEADER = "header";
+    /** element name trailer */
     String EL_TRAILER = "trailer";
+    /** element name page-sequence */
     String EL_PAGE_SEQUENCE = "page-sequence";
+    /** element name page */
     String EL_PAGE = "page";
+    /** element name page-header */
     String EL_PAGE_HEADER = "page-header";
+    /** element name page-trailer */
     String EL_PAGE_TRAILER = "page-trailer";
+    /** element name content */
     String EL_PAGE_CONTENT = "content";
+    /** element name viewport */
     String EL_VIEWPORT = "viewport";
+    /** element name group */
     String EL_GROUP = "g";
+    /** element name image */
     String EL_IMAGE = "image";
+    /** element name clip-rect */
     String EL_CLIP_RECT = "clip-rect";
+    /** element name rect */
     String EL_RECT = "rect";
+    /** element name line */
     String EL_LINE = "line";
+    /** element name border-rect */
     String EL_BORDER_RECT = "border-rect";
+    /** element name font */
     String EL_FONT = "font";
+    /** element name text */
     String EL_TEXT = "text";
     /** Parent element of the logical structure tree. */
     String EL_STRUCTURE_TREE = "structure-tree";

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFContentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFContentHandler.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFContentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFContentHandler.java Tue Aug 17 18:57:04 2010
@@ -24,62 +24,74 @@ import org.xml.sax.ContentHandler;
 import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
 
+/** intermediate format content handler */
 public class IFContentHandler implements ContentHandler {
 
+    /** {@inheritDoc} */
     public void characters(char[] arg0, int arg1, int arg2) throws SAXException {
         // TODO Auto-generated method stub
 
     }
 
+    /** {@inheritDoc} */
     public void endDocument() throws SAXException {
         // TODO Auto-generated method stub
 
     }
 
+    /** {@inheritDoc} */
     public void endElement(String arg0, String arg1, String arg2)
             throws SAXException {
         // TODO Auto-generated method stub
 
     }
 
+    /** {@inheritDoc} */
     public void endPrefixMapping(String arg0) throws SAXException {
         // TODO Auto-generated method stub
 
     }
 
+    /** {@inheritDoc} */
     public void ignorableWhitespace(char[] arg0, int arg1, int arg2)
             throws SAXException {
         // TODO Auto-generated method stub
 
     }
 
+    /** {@inheritDoc} */
     public void processingInstruction(String arg0, String arg1)
             throws SAXException {
         // TODO Auto-generated method stub
 
     }
 
+    /** {@inheritDoc} */
     public void setDocumentLocator(Locator arg0) {
         // TODO Auto-generated method stub
 
     }
 
+    /** {@inheritDoc} */
     public void skippedEntity(String arg0) throws SAXException {
         // TODO Auto-generated method stub
 
     }
 
+    /** {@inheritDoc} */
     public void startDocument() throws SAXException {
         // TODO Auto-generated method stub
 
     }
 
+    /** {@inheritDoc} */
     public void startElement(String arg0, String arg1, String arg2,
             Attributes arg3) throws SAXException {
         // TODO Auto-generated method stub
 
     }
 
+    /** {@inheritDoc} */
     public void startPrefixMapping(String arg0, String arg1)
             throws SAXException {
         // TODO Auto-generated method stub

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFDocumentNavigationHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFDocumentNavigationHandler.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFDocumentNavigationHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFDocumentNavigationHandler.java Tue Aug 17 18:57:04 2010
@@ -45,8 +45,16 @@ public interface IFDocumentNavigationHan
      */
     void renderBookmarkTree(BookmarkTree tree) throws IFException;
 
+    /**
+     * @param link a link
+     * @throws IFException of not caught
+     */
     void renderLink(Link link) throws IFException;
 
+    /**
+     * @param action an action
+     * @throws IFException of not caught
+     */
     void addResolvedAction(AbstractAction action) throws IFException;
 
 }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFGraphicContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFGraphicContext.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFGraphicContext.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFGraphicContext.java Tue Aug 17 18:57:04 2010
@@ -56,6 +56,7 @@ public class IFGraphicContext extends Gr
         return new IFGraphicContext(this);
     }
 
+    /** @param group a group */
     public void pushGroup(Group group) {
         //this.groupDepth++;
         this.groupList.add(group);
@@ -64,44 +65,66 @@ public class IFGraphicContext extends Gr
         }
     }
 
+    /** @return array of groups */
     public Group[] getGroups() {
         return (Group[])this.groupList.toArray(new Group[getGroupStackSize()]);
     }
 
+    /** @return array of groups after clearing group list */
     public Group[] dropGroups() {
         Group[] groups = getGroups();
         this.groupList.clear();
         return groups;
     }
 
+    /** @return size of group list */
     public int getGroupStackSize() {
         return this.groupList.size();
     }
 
+    /** a group */
     public static class Group {
 
         private AffineTransform[] transforms;
 
+        /**
+         * Construct a Group.
+         * @param transforms an array of transforms
+         */
         public Group(AffineTransform[] transforms) {
             this.transforms = transforms;
         }
 
+        /**
+         * Construct a Group.
+         * @param transform a transform
+         */
         public Group(AffineTransform transform) {
             this(new AffineTransform[] {transform});
         }
 
+        /** Default constructor. */
         public Group() {
             this(EMPTY_TRANSFORM_ARRAY);
         }
 
+        /** @return array of transforms */
         public AffineTransform[] getTransforms() {
             return this.transforms;
         }
 
+        /**
+         * @param painter a painter
+         * @throws IFException in not caught
+         */
         public void start(IFPainter painter) throws IFException {
             painter.startGroup(transforms);
         }
 
+        /**
+         * @param painter a painter
+         * @throws IFException in not caught
+         */
         public void end(IFPainter painter) throws IFException {
             painter.endGroup();
         }
@@ -115,33 +138,50 @@ public class IFGraphicContext extends Gr
 
     }
 
+    /** a viewport */
     public static class Viewport extends Group {
 
         private Dimension size;
         private Rectangle clipRect;
 
+        /**
+         * Construct a viewport.
+         * @param transforms an array of transforms
+         * @param size a dimension
+         * @param clipRect a clip rectangle
+         */
         public Viewport(AffineTransform[] transforms, Dimension size, Rectangle clipRect) {
             super(transforms);
             this.size = size;
             this.clipRect = clipRect;
         }
 
+        /**
+         * Construct a viewport.
+         * @param transform a transform
+         * @param size a dimension
+         * @param clipRect a clip rectangle
+         */
         public Viewport(AffineTransform transform, Dimension size, Rectangle clipRect) {
             this(new AffineTransform[] {transform}, size, clipRect);
         }
 
+        /** @return the viewport's size */
         public Dimension getSize() {
             return this.size;
         }
 
+        /** @return the clip rectangle */
         public Rectangle getClipRect() {
             return this.clipRect;
         }
 
+        /** {@inheritDoc} */
         public void start(IFPainter painter) throws IFException {
             painter.startViewport(getTransforms(), size, clipRect);
         }
 
+        /** {@inheritDoc} */
         public void end(IFPainter painter) throws IFException {
             painter.endViewport();
         }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFRenderer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFRenderer.java Tue Aug 17 18:57:04 2010
@@ -1238,7 +1238,8 @@ public class IFRenderer extends Abstract
     }
 
     /** {@inheritDoc} */
-    protected void drawBorders(float startx, float starty,
+    protected void drawBorders                                  // CSOK: ParameterNumber
+        (float startx, float starty,
             float width, float height,
             BorderProps bpsBefore, BorderProps bpsAfter,
             BorderProps bpsStart, BorderProps bpsEnd) {
@@ -1251,7 +1252,8 @@ public class IFRenderer extends Abstract
     }
 
     /** {@inheritDoc} */
-    protected void drawBorderLine(float x1, float y1, float x2, float y2, boolean horz,
+    protected void drawBorderLine                               // CSOK: ParameterNumber
+        (float x1, float y1, float x2, float y2, boolean horz,
             boolean startOrBefore, int style, Color col) {
         //Simplified implementation that is only used by renderTextDecoration()
         //drawBorders() is overridden and uses the Painter's high-level method drawBorderRect()

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFSerializer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFSerializer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFSerializer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFSerializer.java Tue Aug 17 18:57:04 2010
@@ -633,8 +633,11 @@ public class IFSerializer extends Abstra
         }
     }
 
-    /** {@inheritDoc} */
-    protected RenderingContext createRenderingContext() {
+    /**
+     * @return a new rendering context
+     * @throws IllegalStateException unless overridden
+     */
+    protected RenderingContext createRenderingContext() throws IllegalStateException {
         throw new IllegalStateException("Should never be called!");
     }
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFState.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFState.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFState.java Tue Aug 17 18:57:04 2010
@@ -21,7 +21,8 @@ package org.apache.fop.render.intermedia
 
 import java.awt.Color;
 
-public class IFState {
+/** a state class for intermediate format data */
+public final class IFState {
 
     private IFState parent;
 
@@ -50,22 +51,27 @@ public class IFState {
         this.textColor = parent.textColor;
     }
 
+    /** @return create state */
     public static IFState create() {
         return new IFState();
     }
 
+    /** @return push state */
     public IFState push() {
         return new IFState(this);
     }
 
+    /** @return pop state */
     public IFState pop() {
         return this.parent;
     }
 
+    /** @return true if font changed */
     public boolean isFontChanged() {
         return this.fontChanged;
     }
 
+    /** reset font changed */
     public void resetFontChanged() {
         this.fontChanged = false;
     }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFUtil.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFUtil.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/intermediate/IFUtil.java Tue Aug 17 18:57:04 2010
@@ -30,7 +30,10 @@ import org.apache.fop.util.DecimalFormat
 /**
  * Utility functions for the intermediate format.
  */
-public class IFUtil {
+public final class IFUtil {
+
+    private IFUtil() {
+    }
 
     private static String format(double value) {
         if (value == -0.0) {

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/CustomFontMetricsMapper.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/CustomFontMetricsMapper.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/CustomFontMetricsMapper.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/CustomFontMetricsMapper.java Tue Aug 17 18:57:04 2010
@@ -16,6 +16,7 @@
  */
 
 /* $Id$ */
+
 package org.apache.fop.render.java2d;
 
 import java.awt.Font;
@@ -29,6 +30,7 @@ import javax.xml.transform.Source;
 import javax.xml.transform.stream.StreamSource;
 
 import org.apache.fop.fonts.CustomFont;
+import org.apache.fop.fonts.FontMetrics;
 import org.apache.fop.fonts.FontType;
 import org.apache.fop.fonts.LazyFont;
 import org.apache.fop.fonts.Typeface;
@@ -36,7 +38,7 @@ import org.apache.fop.fonts.Typeface;
 /**
  * FontMetricsMapper that delegates most methods to an underlying
  * {@link FontMetrics} instance. This class was designed to allow
- * the underlying {@link java.awt.Font} to be loaded from a
+ * the underlying {@link Font} to be loaded from a
  * user-configured file not registered in the current graphics environment.
  */
 public class CustomFontMetricsMapper extends Typeface implements FontMetricsMapper {

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/FontMetricsMapper.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/FontMetricsMapper.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/FontMetricsMapper.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/FontMetricsMapper.java Tue Aug 17 18:57:04 2010
@@ -28,7 +28,7 @@ import org.apache.fop.fonts.FontMetrics;
 public interface FontMetricsMapper extends FontMetrics {
 
     /**
-     * Gets a {@link Font} instance of the font that this
+     * Gets a {@link java.awt.Font} instance of the font that this
      * {@link FontMetrics} describes in the desired size.
      * @param size font size
      * @return font with the desired characteristics.

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DBorderPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DBorderPainter.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DBorderPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DBorderPainter.java Tue Aug 17 18:57:04 2010
@@ -47,6 +47,10 @@ public class Java2DBorderPainter extends
 
     private GeneralPath currentPath = null;
 
+    /**
+     * Construct a java2d border painter.
+     * @param painter a painter
+     */
     public Java2DBorderPainter(Java2DPainter painter) {
         this.painter = painter;
     }
@@ -60,7 +64,8 @@ public class Java2DBorderPainter extends
     }
 
     /** {@inheritDoc} */
-    protected void drawBorderLine(int x1, int y1, int x2, int y2, boolean horz,
+    protected void drawBorderLine                               // CSOK: ParameterNumber
+        (int x1, int y1, int x2, int y2, boolean horz,
             boolean startOrBefore, int style, Color color) {
         float w = x2 - x1;
         float h = y2 - y1;

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DPainter.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DPainter.java Tue Aug 17 18:57:04 2010
@@ -33,9 +33,6 @@ import java.util.Stack;
 
 import org.w3c.dom.Document;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.apache.fop.fonts.Font;
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.fonts.FontTriplet;
@@ -54,9 +51,6 @@ import org.apache.fop.util.CharUtilities
  */
 public class Java2DPainter extends AbstractIFPainter {
 
-    /** logging instance */
-    private static Log log = LogFactory.getLog(Java2DPainter.class);
-
     /** the IF context */
     protected IFContext ifContext;
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DRenderer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DRenderer.java Tue Aug 17 18:57:04 2010
@@ -536,7 +536,8 @@ public abstract class Java2DRenderer ext
     }
 
     /** {@inheritDoc} */
-    protected void drawBorderLine(float x1, float y1, float x2, float y2,
+    protected void drawBorderLine                               // CSOK: ParameterNumber
+        (float x1, float y1, float x2, float y2,
             boolean horz, boolean startOrBefore, int style, Color col) {
         Graphics2D g2d = state.getGraph();
         float width = x2 - x1;

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DSVGHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DSVGHandler.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DSVGHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DSVGHandler.java Tue Aug 17 18:57:04 2010
@@ -81,16 +81,17 @@ public class Java2DSVGHandler extends Ab
      */
     public static class Java2DInfo {
         /** see Java2D_STATE */
-        public Java2DGraphicsState state;
+        public Java2DGraphicsState state;                       // CSOK: VisibilityModifier
         /** see Java2D_WIDTH */
-        public int width;
+        public int width;                                       // CSOK: VisibilityModifier
         /** see Java2D_HEIGHT */
-        public int height;
+        public int height;                                      // CSOK: VisibilityModifier
         /** see Java2D_XPOS */
-        public int currentXPosition;
+        public int currentXPosition;                            // CSOK: VisibilityModifier
         /** see Java2D_YPOS */
-        public int currentYPosition;
-        public boolean paintAsBitmap;
+        public int currentYPosition;                            // CSOK: VisibilityModifier
+        /** paint as bitmap */
+        public boolean paintAsBitmap;                           // CSOK: VisibilityModifier
 
         /** {@inheritDoc} */
         public String toString() {

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DUtil.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DUtil.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DUtil.java Tue Aug 17 18:57:04 2010
@@ -30,7 +30,10 @@ import org.apache.fop.fonts.FontManager;
 /**
  * Rendering-related utilities for Java2D.
  */
-public class Java2DUtil {
+public final class Java2DUtil {
+
+    private Java2DUtil() {
+    }
 
     /**
      * Builds a default {@link FontInfo} object for use with output formats using the Java2D

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/HardcodedFonts.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/HardcodedFonts.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/HardcodedFonts.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/HardcodedFonts.java Tue Aug 17 18:57:04 2010
@@ -28,10 +28,13 @@ import org.apache.commons.logging.LogFac
  * This class hold code for selecting a set of hard-coded fonts available in practically all
  * PCL implementations. We hope this can be improved in the future.
  */
-class HardcodedFonts {
+final class HardcodedFonts {
+
+    private HardcodedFonts() {
+    }
 
     /** logging instance */
-    private static Log log = LogFactory.getLog(HardcodedFonts.class);
+    private static final Log LOG = LogFactory.getLog(HardcodedFonts.class);
 
     /**
      * Sets the current font (NOTE: Hard-coded font mappings ATM!)
@@ -58,7 +61,7 @@ class HardcodedFonts {
             try {
                 fontcode = Integer.parseInt(name.substring(1));
             } catch (Exception e) {
-                log.error(e);
+                LOG.error(e);
             }
         }
         //Note "(ON" selects ISO 8859-1 symbol set as used by PCLGenerator

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLEventProducer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLEventProducer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLEventProducer.java Tue Aug 17 18:57:04 2010
@@ -28,7 +28,10 @@ import org.apache.fop.events.EventProduc
 public interface PCLEventProducer extends EventProducer {
 
     /** Provider class for the event producer. */
-    class Provider {
+    final class Provider {
+
+        private Provider() {
+        }
 
         /**
          * Returns an event producer.

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLPainter.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLPainter.java Tue Aug 17 18:57:04 2010
@@ -34,9 +34,6 @@ import java.util.Stack;
 
 import org.w3c.dom.Document;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.apache.xmlgraphics.image.loader.ImageException;
 import org.apache.xmlgraphics.image.loader.ImageInfo;
 import org.apache.xmlgraphics.image.loader.ImageProcessingHints;
@@ -65,9 +62,6 @@ import org.apache.fop.util.CharUtilities
  */
 public class PCLPainter extends AbstractIFPainter implements PCLConstants {
 
-    /** logging instance */
-    private static Log log = LogFactory.getLog(PCLPainter.class);
-
     private static final boolean DEBUG = false;
 
     private PCLDocumentHandler parent;
@@ -396,10 +390,11 @@ public class PCLPainter extends Abstract
 
     private static final double SAFETY_MARGIN_FACTOR = 0.05;
 
-    private Rectangle getTextBoundingBox(int x, int y,
-            int letterSpacing, int wordSpacing, int[] dx,
-            String text,
-            Font font, FontMetricsMapper metrics) {
+    private Rectangle getTextBoundingBox                        // CSOK: ParameterNumber
+        (int x, int y,
+         int letterSpacing, int wordSpacing, int[] dx,
+         String text,
+         Font font, FontMetricsMapper metrics) {
         int maxAscent = metrics.getMaxAscent(font.getFontSize()) / 1000;
         int descent = metrics.getDescender(font.getFontSize()) / 1000; //is negative
         int safetyMargin = (int)(SAFETY_MARGIN_FACTOR * font.getFontSize());

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLRenderer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLRenderer.java Tue Aug 17 18:57:04 2010
@@ -445,7 +445,7 @@ public class PCLRenderer extends PrintRe
 
     /**
      * {@inheritDoc}
-     * @todo Copied from AbstractPathOrientedRenderer
+     * @asf.todo Copied from AbstractPathOrientedRenderer
      */
     protected void handleRegionTraits(RegionViewport region) {
         Rectangle2D viewArea = region.getViewArea();
@@ -723,7 +723,7 @@ public class PCLRenderer extends PrintRe
      * Render an inline viewport.
      * This renders an inline viewport by clipping if necessary.
      * @param viewport the viewport to handle
-     * @todo Copied from AbstractPathOrientedRenderer
+     * @asf.todo Copied from AbstractPathOrientedRenderer
      */
     public void renderViewport(Viewport viewport) {
 
@@ -1062,7 +1062,7 @@ public class PCLRenderer extends PrintRe
      * The all borders and padding are drawn outside the specified area.
      * @param area the inline area for which the background, border and padding is to be
      * rendered
-     * @todo Copied from AbstractPathOrientedRenderer
+     * @asf.todo Copied from AbstractPathOrientedRenderer
      */
     protected void renderInlineAreaBackAndBorders(InlineArea area) {
         float x = currentIPPosition / 1000f;
@@ -1245,7 +1245,8 @@ public class PCLRenderer extends PrintRe
      * @param bpsStart the border specification on the start side
      * @param bpsEnd the border specification on the end side
      */
-    protected void drawQualityBorders(Rectangle2D.Float borderRect,
+    protected void drawQualityBorders                           // CSOK: MethodLength
+        (Rectangle2D.Float borderRect,
             final BorderProps bpsBefore, final BorderProps bpsAfter,
             final BorderProps bpsStart, final BorderProps bpsEnd) {
         Graphics2DAdapter g2a = getGraphics2DAdapter();
@@ -1277,7 +1278,8 @@ public class PCLRenderer extends PrintRe
 
         Graphics2DImagePainter painter = new Graphics2DImagePainter() {
 
-            public void paint(Graphics2D g2d, Rectangle2D area) {
+                public void paint                                   // CSOK: MethodLength
+                (Graphics2D g2d, Rectangle2D area) {
                 g2d.translate(xoffset, yoffset);
                 g2d.scale(1000, 1000);
                 float startx = effBorderRect.x;

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLRendererContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLRendererContext.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLRendererContext.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLRendererContext.java Tue Aug 17 18:57:04 2010
@@ -19,9 +19,6 @@
 
 package org.apache.fop.render.pcl;
 
-import org.apache.xmlgraphics.util.QName;
-
-import org.apache.fop.fo.extensions.ExtensionElementMapping;
 import org.apache.fop.render.ImageHandlerUtil;
 import org.apache.fop.render.RendererContext;
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLRenderingContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLRenderingContext.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLRenderingContext.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLRenderingContext.java Tue Aug 17 18:57:04 2010
@@ -41,6 +41,7 @@ public abstract class PCLRenderingContex
      * Main constructor.
      * @param userAgent the user agent
      * @param generator the PCL generator
+     * @param pclUtil rendering utility
      */
     public PCLRenderingContext(FOUserAgent userAgent,
             PCLGenerator generator, PCLRenderingUtil pclUtil) {

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java Tue Aug 17 18:57:04 2010
@@ -165,7 +165,7 @@ public abstract class AbstractImageAdapt
         return null;
     }
 
-    /** {@inheritDoc} */
+    /** @return null (if not overridden) */
     public String getSoftMask() {
         return null;
     }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/CTMHelper.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/CTMHelper.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/CTMHelper.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/CTMHelper.java Tue Aug 17 18:57:04 2010
@@ -33,6 +33,10 @@ import org.apache.fop.pdf.PDFNumber;
  * @see org.apache.fop.area.CTM
  */
 public final class CTMHelper {
+
+    private CTMHelper() {
+    }
+
     /**
      * <p>Converts the sourceMatrix to a string for use in the PDFRenderer cm operations.</p>
      * <p>For example:

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFBorderPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFBorderPainter.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFBorderPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFBorderPainter.java Tue Aug 17 18:57:04 2010
@@ -37,29 +37,39 @@ import org.apache.fop.util.ColorUtil;
 public class PDFBorderPainter extends BorderPainter {
 
     /** logging instance */
-    private static Log log = LogFactory.getLog(PDFBorderPainter.class);
+    private static final Log LOG = LogFactory.getLog(PDFBorderPainter.class);
 
     private PDFContentGenerator generator;
 
+    /**
+     * Construct a border painter.
+     * @param generator a pdf content generator
+     */
     public PDFBorderPainter(PDFContentGenerator generator) {
         this.generator = generator;
     }
 
     /** {@inheritDoc} */
-    protected void drawBorderLine(int x1, int y1, int x2, int y2, boolean horz,
-            boolean startOrBefore, int style, Color col) {
+    protected void drawBorderLine                               // CSOK: ParameterNumber
+        (int x1, int y1, int x2, int y2, boolean horz,
+         boolean startOrBefore, int style, Color col) {
        drawBorderLine(generator, x1 / 1000f, y1 / 1000f, x2 / 1000f, y2 / 1000f,
                horz, startOrBefore, style, col);
     }
 
-    /** {@inheritDoc} */
-    public static void drawBorderLine(PDFContentGenerator generator,
-            float x1, float y1, float x2, float y2, boolean horz,
-            boolean startOrBefore, int style, Color col) {
+    /**
+     * @param generator pdf content generator
+     * @see BorderPainter#drawBorderLine
+     */
+    public static void drawBorderLine       // CSOK: ParameterNumber|MethodLength
+        (PDFContentGenerator generator,
+         float x1, float y1, float x2, float y2, boolean horz,  // CSOK: JavadocMethod
+         boolean startOrBefore, int style, Color col) {         // CSOK: JavadocMethod
+        float colFactor;
         float w = x2 - x1;
         float h = y2 - y1;
         if ((w < 0) || (h < 0)) {
-            log.error("Negative extent received (w=" + w + ", h=" + h
+            LOG.error("Negative extent received (w=" + w + ", h=" + h
                     + "). Border won't be painted.");
             return;
         }
@@ -146,8 +156,7 @@ public class PDFBorderPainter extends Bo
                 break;
             case Constants.EN_GROOVE:
             case Constants.EN_RIDGE:
-            {
-                float colFactor = (style == Constants.EN_GROOVE ? 0.4f : -0.4f);
+                colFactor = (style == Constants.EN_GROOVE ? 0.4f : -0.4f);
                 generator.add("[] 0 d ");
                 if (horz) {
                     Color uppercol = ColorUtil.lightenColor(col, -colFactor);
@@ -181,11 +190,9 @@ public class PDFBorderPainter extends Bo
                                         + format(xm1 + w3 + w3) + " " + format(y2) + " l S\n");
                 }
                 break;
-            }
             case Constants.EN_INSET:
             case Constants.EN_OUTSET:
-            {
-                float colFactor = (style == Constants.EN_OUTSET ? 0.4f : -0.4f);
+                colFactor = (style == Constants.EN_OUTSET ? 0.4f : -0.4f);
                 generator.add("[] 0 d ");
                 Color c = col;
                 if (horz) {
@@ -204,7 +211,6 @@ public class PDFBorderPainter extends Bo
                             + format(xm1) + " " + format(y2) + " l S\n");
                 }
                 break;
-            }
             case Constants.EN_HIDDEN:
                 break;
             default:

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java Tue Aug 17 18:57:04 2010
@@ -115,7 +115,7 @@ public class PDFContentGenerator {
     }
 
     /**
-     * Returns the {@link PDFState} associated with this instance.
+     * Returns the {@link PDFPaintingState} associated with this instance.
      * @return the PDF state
      */
     public PDFPaintingState getState() {
@@ -148,14 +148,18 @@ public class PDFContentGenerator {
         }
     }
 
-    /** {@inheritDoc} */
+    /** Save graphics state. */
     protected void saveGraphicsState() {
         endTextObject();
         currentState.save();
         currentStream.add("q\n");
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Save graphics state.
+     * @param structElemType an element type
+     * @param sequenceNum a sequence number
+     */
     protected void saveGraphicsState(String structElemType, int sequenceNum) {
         endTextObject();
         currentState.save();

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java Tue Aug 17 18:57:04 2010
@@ -51,6 +51,7 @@ import org.apache.fop.render.intermediat
 import org.apache.fop.render.intermediate.IFDocumentNavigationHandler;
 import org.apache.fop.render.intermediate.IFException;
 import org.apache.fop.render.intermediate.IFPainter;
+import org.apache.fop.render.pdf.extensions.PDFEmbeddedFileExtensionAttachment;
 import org.apache.fop.util.XMLUtil;
 
 /**
@@ -292,6 +293,14 @@ public class PDFDocumentHandler extends 
         } else if (extension instanceof Metadata) {
             XMPMetadata wrapper = new XMPMetadata(((Metadata)extension));
             pdfUtil.renderXMPMetadata(wrapper);
+        } else if (extension instanceof PDFEmbeddedFileExtensionAttachment) {
+            PDFEmbeddedFileExtensionAttachment embeddedFile
+                = (PDFEmbeddedFileExtensionAttachment)extension;
+            try {
+                pdfUtil.addEmbeddedFile(embeddedFile);
+            } catch (IOException ioe) {
+                throw new IFException("Error adding embedded file: " + embeddedFile.getSrc(), ioe);
+            }
         } else {
             log.debug("Don't know how to handle extension object. Ignoring: "
                     + extension + " (" + extension.getClass().getName() + ")");

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java Tue Aug 17 18:57:04 2010
@@ -166,10 +166,11 @@ public class PDFDocumentNavigationHandle
         } else if (action instanceof URIAction) {
             URIAction u = (URIAction)action;
             assert u.isComplete();
+            String uri = u.getURI();
             PDFFactory factory = getPDFDoc().getFactory();
-            pdfAction = factory.getExternalAction(u.getURI(), u.isNewWindow());
+            pdfAction = factory.getExternalAction(uri, u.isNewWindow());
             if (!pdfAction.hasObjectNumber()) {
-                //Some PDF actions a pooled
+                //Some PDF actions are pooled
                 getPDFDoc().registerObject(pdfAction);
             }
             this.completeActions.put(action.getID(), pdfAction);

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFLogicalStructureHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFLogicalStructureHandler.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFLogicalStructureHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFLogicalStructureHandler.java Tue Aug 17 18:57:04 2010
@@ -87,12 +87,12 @@ class PDFLogicalStructureHandler {
          * operator. This is the structure type of the corresponding structure
          * element.
          */
-        final String tag;
+        final String tag;                                       // CSOK: VisibilityModifier
 
         /**
          * The value for the MCID entry of the marked-content sequence's property list.
          */
-        final int mcid;
+        final int mcid;                                         // CSOK: VisibilityModifier
 
         private final PDFStructElem parent;
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFPainter.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFPainter.java Tue Aug 17 18:57:04 2010
@@ -162,10 +162,7 @@ public class PDFPainter extends Abstract
 
     /**
      * Places a previously registered image at a certain place on the page.
-     * @param x X coordinate
-     * @param y Y coordinate
-     * @param w width for image
-     * @param h height for image
+     * @param rect the rectangle for the image
      * @param xobj the image XObject
      */
     private void placeImage(Rectangle rect, PDFXObject xobj) {
@@ -179,10 +176,7 @@ public class PDFPainter extends Abstract
     }
     /**
      * Places a previously registered image at a certain place on the page - Accessibility version
-     * @param x X coordinate
-     * @param y Y coordinate
-     * @param w width for image
-     * @param h height for image
+     * @param rect the rectangle for the image
      * @param xobj the image XObject
      */
     private void placeImageAccess(Rectangle rect, PDFXObject xobj) {

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFRenderer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFRenderer.java Tue Aug 17 18:57:04 2010
@@ -97,6 +97,7 @@ import org.apache.fop.render.AbstractPat
 import org.apache.fop.render.Graphics2DAdapter;
 import org.apache.fop.render.RendererContext;
 import org.apache.fop.render.pdf.PDFLogicalStructureHandler.MarkedContentInfo;
+import org.apache.fop.render.pdf.extensions.PDFEmbeddedFileExtensionAttachment;
 import org.apache.fop.traits.RuleStyle;
 import org.apache.fop.util.AbstractPaintingState;
 import org.apache.fop.util.CharUtilities;
@@ -312,6 +313,13 @@ public class PDFRenderer extends Abstrac
             ExtensionAttachment attachment = ((OffDocumentExtensionAttachment)odi).getAttachment();
             if (XMPMetadata.CATEGORY.equals(attachment.getCategory())) {
                 pdfUtil.renderXMPMetadata((XMPMetadata)attachment);
+            } else if (PDFEmbeddedFileExtensionAttachment.CATEGORY.equals(
+                    attachment.getCategory())) {
+                try {
+                    pdfUtil.addEmbeddedFile((PDFEmbeddedFileExtensionAttachment)attachment);
+                } catch (IOException ioe) {
+                    throw new RuntimeException("Error embedding file", ioe);
+                }
             }
         }
     }
@@ -476,7 +484,7 @@ public class PDFRenderer extends Abstrac
     public void renderPage(PageViewport page)
                 throws IOException, FOPException {
         if (pages != null
-                && (currentPage = (PDFPage) pages.get(page)) != null) {
+            && (currentPage = (PDFPage) pages.get(page)) != null) { // CSOK: InnerAssignment
             //Retrieve previously prepared page (out-of-line rendering)
             pages.remove(page);
         } else {
@@ -558,7 +566,8 @@ public class PDFRenderer extends Abstrac
     }
 
     /** {@inheritDoc} */
-    protected void drawBorderLine(float x1, float y1, float x2, float y2,
+    protected void drawBorderLine                               // CSOK: ParameterNumber
+        (float x1, float y1, float x2, float y2,
             boolean horz, boolean startOrBefore, int style, Color col) {
         PDFBorderPainter.drawBorderLine(generator, x1, y1, x2, y2, horz, startOrBefore, style, col);
     }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java Tue Aug 17 18:57:04 2010
@@ -20,6 +20,7 @@
 package org.apache.fop.render.pdf;
 
 import java.awt.color.ICC_Profile;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -33,6 +34,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import org.apache.xmlgraphics.image.loader.util.ImageUtil;
 import org.apache.xmlgraphics.xmp.Metadata;
 import org.apache.xmlgraphics.xmp.schemas.XMPBasicAdapter;
 import org.apache.xmlgraphics.xmp.schemas.XMPBasicSchema;
@@ -41,19 +43,27 @@ import org.apache.fop.accessibility.Acce
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.fo.extensions.xmp.XMPMetadata;
 import org.apache.fop.pdf.PDFAMode;
+import org.apache.fop.pdf.PDFArray;
 import org.apache.fop.pdf.PDFConformanceException;
 import org.apache.fop.pdf.PDFDictionary;
 import org.apache.fop.pdf.PDFDocument;
+import org.apache.fop.pdf.PDFEmbeddedFile;
+import org.apache.fop.pdf.PDFEmbeddedFiles;
 import org.apache.fop.pdf.PDFEncryptionManager;
 import org.apache.fop.pdf.PDFEncryptionParams;
+import org.apache.fop.pdf.PDFFileSpec;
 import org.apache.fop.pdf.PDFICCBasedColorSpace;
 import org.apache.fop.pdf.PDFICCStream;
 import org.apache.fop.pdf.PDFInfo;
 import org.apache.fop.pdf.PDFMetadata;
+import org.apache.fop.pdf.PDFNames;
 import org.apache.fop.pdf.PDFNumsArray;
 import org.apache.fop.pdf.PDFOutputIntent;
 import org.apache.fop.pdf.PDFPageLabels;
+import org.apache.fop.pdf.PDFReference;
+import org.apache.fop.pdf.PDFText;
 import org.apache.fop.pdf.PDFXMode;
+import org.apache.fop.render.pdf.extensions.PDFEmbeddedFileExtensionAttachment;
 import org.apache.fop.util.ColorProfileUtil;
 
 /**
@@ -413,4 +423,63 @@ class PDFRenderingUtil implements PDFCon
         nums.put(pageIndex, dict);
     }
 
+    /**
+     * Adds an embedded file to the PDF file.
+     * @param embeddedFile the object representing the embedded file to be added
+     * @throws IOException if an I/O error occurs
+     */
+    public void addEmbeddedFile(PDFEmbeddedFileExtensionAttachment embeddedFile)
+            throws IOException {
+        this.pdfDoc.getProfile().verifyEmbeddedFilesAllowed();
+        PDFNames names = this.pdfDoc.getRoot().getNames();
+        if (names == null) {
+            //Add Names if not already present
+            names = this.pdfDoc.getFactory().makeNames();
+            this.pdfDoc.getRoot().setNames(names);
+        }
+
+        //Create embedded file
+        PDFEmbeddedFile file = new PDFEmbeddedFile();
+        this.pdfDoc.registerObject(file);
+        Source src = getUserAgent().resolveURI(embeddedFile.getSrc());
+        InputStream in = ImageUtil.getInputStream(src);
+        if (in == null) {
+            throw new FileNotFoundException(embeddedFile.getSrc());
+        }
+        try {
+            OutputStream out = file.getBufferOutputStream();
+            IOUtils.copyLarge(in, out);
+        } finally {
+            IOUtils.closeQuietly(in);
+        }
+        PDFDictionary dict = new PDFDictionary();
+        dict.put("F", file);
+        String filename = PDFText.toPDFString(embeddedFile.getFilename(), '_');
+        PDFFileSpec fileSpec = new PDFFileSpec(filename);
+        fileSpec.setEmbeddedFile(dict);
+        if (embeddedFile.getDesc() != null) {
+            fileSpec.setDescription(embeddedFile.getDesc());
+        }
+        this.pdfDoc.registerObject(fileSpec);
+
+        //Make sure there is an EmbeddedFiles in the Names dictionary
+        PDFEmbeddedFiles embeddedFiles = names.getEmbeddedFiles();
+        if (embeddedFiles == null) {
+            embeddedFiles = new PDFEmbeddedFiles();
+            this.pdfDoc.assignObjectNumber(embeddedFiles);
+            this.pdfDoc.addTrailerObject(embeddedFiles);
+            names.setEmbeddedFiles(embeddedFiles);
+        }
+
+        //Add to EmbeddedFiles in the Names dictionary
+        PDFArray nameArray = embeddedFiles.getNames();
+        if (nameArray == null) {
+            nameArray = new PDFArray();
+            embeddedFiles.setNames(nameArray);
+        }
+        String name = PDFText.toPDFString(filename);
+        nameArray.add(name);
+        nameArray.add(new PDFReference(fileSpec));
+    }
+
 }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java Tue Aug 17 18:57:04 2010
@@ -97,33 +97,33 @@ public class PDFSVGHandler extends Abstr
      */
     public static class PDFInfo {
         /** see PDF_DOCUMENT */
-        public PDFDocument pdfDoc;
+        public PDFDocument pdfDoc;                              // CSOK: VisibilityModifier
         /** see OUTPUT_STREAM */
-        public OutputStream outputStream;
+        public OutputStream outputStream;                       // CSOK: VisibilityModifier
         /** see PDF_PAGE */
-        public PDFPage pdfPage;
+        public PDFPage pdfPage;                                 // CSOK: VisibilityModifier
         /** see PDF_CONTEXT */
-        public PDFResourceContext pdfContext;
+        public PDFResourceContext pdfContext;                   // CSOK: VisibilityModifier
         /** see PDF_STREAM */
         //public PDFStream currentStream;
         /** see PDF_WIDTH */
-        public int width;
+        public int width;                                       // CSOK: VisibilityModifier
         /** see PDF_HEIGHT */
-        public int height;
+        public int height;                                      // CSOK: VisibilityModifier
         /** see PDF_FONT_INFO */
-        public FontInfo fi;
+        public FontInfo fi;                                     // CSOK: VisibilityModifier
         /** see PDF_FONT_NAME */
-        public String currentFontName;
+        public String currentFontName;                          // CSOK: VisibilityModifier
         /** see PDF_FONT_SIZE */
-        public int currentFontSize;
+        public int currentFontSize;                             // CSOK: VisibilityModifier
         /** see PDF_XPOS */
-        public int currentXPosition;
+        public int currentXPosition;                            // CSOK: VisibilityModifier
         /** see PDF_YPOS */
-        public int currentYPosition;
+        public int currentYPosition;                            // CSOK: VisibilityModifier
         /** see PDF_HANDLER_CONFIGURATION */
-        public Configuration cfg;
+        public Configuration cfg;                               // CSOK: VisibilityModifier
         /** true if SVG should be rendered as a bitmap instead of natively */
-        public boolean paintAsBitmap;
+        public boolean paintAsBitmap;                           // CSOK: VisibilityModifier
     }
 
     /**

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSBorderPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSBorderPainter.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSBorderPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSBorderPainter.java Tue Aug 17 18:57:04 2010
@@ -52,8 +52,9 @@ public class PSBorderPainter extends Bor
     }
 
     /** {@inheritDoc} */
-    protected void drawBorderLine(int x1, int y1, int x2, int y2, boolean horz,
-            boolean startOrBefore, int style, Color col) throws IOException {
+    protected void drawBorderLine                               // CSOK: ParameterNumber
+        (int x1, int y1, int x2, int y2, boolean horz,
+         boolean startOrBefore, int style, Color col) throws IOException {
        drawBorderLine(generator, toPoints(x1), toPoints(y1), toPoints(x2), toPoints(y2),
                horz, startOrBefore, style, col);
     }
@@ -66,10 +67,15 @@ public class PSBorderPainter extends Bor
                 + gen.formatDouble(endy) + " lineto stroke newpath");
     }
 
-    /** {@inheritDoc} */
-    public static void drawBorderLine(PSGenerator gen,
-            float x1, float y1, float x2, float y2, boolean horz,
-            boolean startOrBefore, int style, Color col) throws IOException {
+    /**
+     * @param gen ps content generator
+     * @see BorderPainter#drawBorderLine
+     */
+    public static void drawBorderLine                           // CSOK: ParameterNumber
+        (PSGenerator gen,
+         float x1, float y1, float x2, float y2, boolean horz,  // CSOK: JavadocMethod
+         boolean startOrBefore, int style, Color col)           // CSOK: JavadocMethod
+        throws IOException {                                    // CSOK: JavadocMethod
         float w = x2 - x1;
         float h = y2 - y1;
         if ((w < 0) || (h < 0)) {

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSBridgeContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSBridgeContext.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSBridgeContext.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSBridgeContext.java Tue Aug 17 18:57:04 2010
@@ -102,6 +102,7 @@ public class PSBridgeContext extends Abs
 
     // Make sure any 'sub bridge contexts' also have our bridges.
     //TODO There's no matching method in the super-class here
+    /** @return a bridge context */
     public BridgeContext createBridgeContext() {
         return new PSBridgeContext(getUserAgent(), getDocumentLoader(),
                                     fontInfo,

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSEventProducer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSEventProducer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSEventProducer.java Tue Aug 17 18:57:04 2010
@@ -28,7 +28,10 @@ import org.apache.fop.events.EventProduc
 public interface PSEventProducer extends EventProducer {
 
     /** Provider class for the event producer. */
-    class Provider {
+    final class Provider {
+        
+        private Provider() {
+        }
 
         /**
          * Returns an event producer.

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSFontUtils.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSFontUtils.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSFontUtils.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/PSFontUtils.java Tue Aug 17 18:57:04 2010
@@ -351,8 +351,9 @@ public class PSFontUtils extends org.apa
      * @return the PSResource representing the derived font
      * @throws IOException In case of an I/O problem
      */
-    public static PSResource defineDerivedFont(PSGenerator gen, String baseFontName, String fontName,
-            String encoding) throws IOException {
+    public static PSResource defineDerivedFont
+        (PSGenerator gen, String baseFontName, String fontName, String encoding)
+        throws IOException {
         PSResource res = new PSResource(PSResource.TYPE_FONT, fontName);
         gen.writeDSCComment(DSCConstants.BEGIN_RESOURCE, res);
         gen.commentln("%XGCDependencies: font " + baseFontName);



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message