xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r496556 [5/5] - in /xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics: image/ image/codec/png/ image/codec/tiff/ image/codec/util/ image/rendered/ image/writer/ image/writer/internal/ java2d/ util/ util/i18n/ util/io/
Date Tue, 16 Jan 2007 00:59:50 GMT
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/internal/JPEGImageWriter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/internal/JPEGImageWriter.java?view=diff&rev=496556&r1=496555&r2=496556
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/internal/JPEGImageWriter.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/internal/JPEGImageWriter.java
Mon Jan 15 16:59:48 2007
@@ -1,88 +1,88 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.xmlgraphics.image.writer.internal;
-
-import java.awt.image.BufferedImage;
-import java.awt.image.RenderedImage;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.apache.xmlgraphics.image.GraphicsUtil;
-import org.apache.xmlgraphics.image.writer.AbstractImageWriter;
-import org.apache.xmlgraphics.image.writer.ImageWriter;
-import org.apache.xmlgraphics.image.writer.ImageWriterParams;
-
-import com.sun.image.codec.jpeg.JPEGCodec;
-import com.sun.image.codec.jpeg.JPEGEncodeParam;
-import com.sun.image.codec.jpeg.JPEGImageEncoder;
-
-/**
- * ImageWriter implementation that uses the sun.com.image.codec.jpeg
- * intefaces to write JPEG files.
- * <p>
- * Note: This class depends on a Sun runtime environment and is therefore not compatible
with 
- * non-Sun VMs (such as Harmony or GNU Classpath based VMs).
- *
- * @version $Id$
- */
-public class JPEGImageWriter extends AbstractImageWriter {
-
-    /**
-     * @see ImageWriter#writeImage(java.awt.image.RenderedImage, java.io.OutputStream)
-     */
-    public void writeImage(RenderedImage image, OutputStream out)
-            throws IOException {
-        writeImage(image, out, null);
-    }
-
-    /**
-     * @see ImageWriter#writeImage(java.awt.image.RenderedImage, java.io.OutputStream, ImageWriterParams)
-     */
-    public void writeImage(RenderedImage image, OutputStream out,
-            ImageWriterParams params) throws IOException {
-        BufferedImage bi;
-        if (image instanceof BufferedImage) {
-            bi = (BufferedImage)image;
-        } else {
-            //TODO Is this the right way?
-            bi = GraphicsUtil.makeLinearBufferedImage(
-                    image.getWidth(), image.getHeight(), false);
-        }
-        JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
-        if (params != null) {
-            JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
-            if (params.getJPEGQuality() != null) {
-                param.setQuality(
-                        params.getJPEGQuality().floatValue(),
-                        params.getJPEGForceBaseline().booleanValue());
-            }
-            encoder.encode(bi, param);
-        } else {
-            encoder.encode(bi);
-        }
-    }
-
-    /**
-     * @see ImageWriter#getMIMEType()
-     */
-    public String getMIMEType() {
-        return "image/jpeg";
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.xmlgraphics.image.writer.internal;
+
+import java.awt.image.BufferedImage;
+import java.awt.image.RenderedImage;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.xmlgraphics.image.GraphicsUtil;
+import org.apache.xmlgraphics.image.writer.AbstractImageWriter;
+import org.apache.xmlgraphics.image.writer.ImageWriter;
+import org.apache.xmlgraphics.image.writer.ImageWriterParams;
+
+import com.sun.image.codec.jpeg.JPEGCodec;
+import com.sun.image.codec.jpeg.JPEGEncodeParam;
+import com.sun.image.codec.jpeg.JPEGImageEncoder;
+
+/**
+ * ImageWriter implementation that uses the sun.com.image.codec.jpeg
+ * intefaces to write JPEG files.
+ * <p>
+ * Note: This class depends on a Sun runtime environment and is therefore not compatible
with
+ * non-Sun VMs (such as Harmony or GNU Classpath based VMs).
+ *
+ * @version $Id$
+ */
+public class JPEGImageWriter extends AbstractImageWriter {
+
+    /**
+     * @see ImageWriter#writeImage(java.awt.image.RenderedImage, java.io.OutputStream)
+     */
+    public void writeImage(RenderedImage image, OutputStream out)
+            throws IOException {
+        writeImage(image, out, null);
+    }
+
+    /**
+     * @see ImageWriter#writeImage(java.awt.image.RenderedImage, java.io.OutputStream, ImageWriterParams)
+     */
+    public void writeImage(RenderedImage image, OutputStream out,
+            ImageWriterParams params) throws IOException {
+        BufferedImage bi;
+        if (image instanceof BufferedImage) {
+            bi = (BufferedImage)image;
+        } else {
+            //TODO Is this the right way?
+            bi = GraphicsUtil.makeLinearBufferedImage(
+                    image.getWidth(), image.getHeight(), false);
+        }
+        JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
+        if (params != null) {
+            JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
+            if (params.getJPEGQuality() != null) {
+                param.setQuality(
+                        params.getJPEGQuality().floatValue(),
+                        params.getJPEGForceBaseline().booleanValue());
+            }
+            encoder.encode(bi, param);
+        } else {
+            encoder.encode(bi);
+        }
+    }
+
+    /**
+     * @see ImageWriter#getMIMEType()
+     */
+    public String getMIMEType() {
+        return "image/jpeg";
+    }
+}

Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/internal/JPEGImageWriter.java
            ('svn:executable' removed)

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/internal/PNGImageWriter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/internal/PNGImageWriter.java?view=diff&rev=496556&r1=496555&r2=496556
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/internal/PNGImageWriter.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/internal/PNGImageWriter.java
Mon Jan 15 16:59:48 2007
@@ -1,62 +1,62 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.xmlgraphics.image.writer.internal;
-
-import java.awt.image.RenderedImage;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.apache.xmlgraphics.image.codec.png.PNGImageEncoder;
-import org.apache.xmlgraphics.image.writer.AbstractImageWriter;
-import org.apache.xmlgraphics.image.writer.ImageWriter;
-import org.apache.xmlgraphics.image.writer.ImageWriterParams;
-
-/**
- * ImageWriter implementation that uses the internal PNG codec to 
- * write PNG files.
- *
- * @version $Id$
- */
-public class PNGImageWriter extends AbstractImageWriter {
-
-    /**
-     * @see ImageWriter#writeImage(java.awt.image.RenderedImage, java.io.OutputStream)
-     */
-    public void writeImage(RenderedImage image, OutputStream out)
-            throws IOException {
-        writeImage(image, out, null);
-    }
-
-    /**
-     * @see ImageWriter#writeImage(java.awt.image.RenderedImage, java.io.OutputStream, ImageWriterParams)
-     */
-    public void writeImage(RenderedImage image, OutputStream out,
-            ImageWriterParams params) throws IOException {
-        PNGImageEncoder encoder = new PNGImageEncoder(out, null);
-        encoder.encode(image);
-    }
-
-    /**
-     * @see ImageWriter#getMIMEType()
-     */
-    public String getMIMEType() {
-        return "image/png";
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.xmlgraphics.image.writer.internal;
+
+import java.awt.image.RenderedImage;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.xmlgraphics.image.codec.png.PNGImageEncoder;
+import org.apache.xmlgraphics.image.writer.AbstractImageWriter;
+import org.apache.xmlgraphics.image.writer.ImageWriter;
+import org.apache.xmlgraphics.image.writer.ImageWriterParams;
+
+/**
+ * ImageWriter implementation that uses the internal PNG codec to
+ * write PNG files.
+ *
+ * @version $Id$
+ */
+public class PNGImageWriter extends AbstractImageWriter {
+
+    /**
+     * @see ImageWriter#writeImage(java.awt.image.RenderedImage, java.io.OutputStream)
+     */
+    public void writeImage(RenderedImage image, OutputStream out)
+            throws IOException {
+        writeImage(image, out, null);
+    }
+
+    /**
+     * @see ImageWriter#writeImage(java.awt.image.RenderedImage, java.io.OutputStream, ImageWriterParams)
+     */
+    public void writeImage(RenderedImage image, OutputStream out,
+            ImageWriterParams params) throws IOException {
+        PNGImageEncoder encoder = new PNGImageEncoder(out, null);
+        encoder.encode(image);
+    }
+
+    /**
+     * @see ImageWriter#getMIMEType()
+     */
+    public String getMIMEType() {
+        return "image/png";
+    }
+}

Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/internal/PNGImageWriter.java
            ('svn:executable' removed)

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/AbstractGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/AbstractGraphics2D.java?view=diff&rev=496556&r1=496555&r2=496556
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/AbstractGraphics2D.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/AbstractGraphics2D.java
Mon Jan 15 16:59:48 2007
@@ -536,7 +536,7 @@
      * @see         java.awt.Graphics#drawPolygon(int[], int[], int)
      * @since       JDK1.1
      */
-    public void drawPolyline(int xPoints[], int yPoints[],
+    public void drawPolyline(int[] xPoints, int[] yPoints,
                              int nPoints){
         if(nPoints > 0){
             GeneralPath path = new GeneralPath();
@@ -567,7 +567,7 @@
      * @see          java.awt.Graphics#fillPolygon(int[],int[],int)
      * @see          java.awt.Graphics#drawPolyline
      */
-    public void drawPolygon(int xPoints[], int yPoints[],
+    public void drawPolygon(int[] xPoints, int[] yPoints,
                             int nPoints){
         Polygon polygon = new Polygon(xPoints, yPoints, nPoints);
         draw(polygon);
@@ -594,7 +594,7 @@
      * @param        nPoints   a the total number of points.
      * @see          java.awt.Graphics#drawPolygon(int[], int[], int)
      */
-    public void fillPolygon(int xPoints[], int yPoints[],
+    public void fillPolygon(int[] xPoints, int[] yPoints,
                             int nPoints){
         Polygon polygon = new Polygon(xPoints, yPoints, nPoints);
         fill(polygon);
@@ -1446,7 +1446,7 @@
 
     /**
      * @return the {@link GraphicContext} of this <code>Graphics2D</code>.
-     */    
+     */
     public GraphicContext getGraphicContext() {
         return gc;
     }

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/GraphicContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/GraphicContext.java?view=diff&rev=496556&r1=496555&r2=496556
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/GraphicContext.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/GraphicContext.java Mon
Jan 15 16:59:48 2007
@@ -35,7 +35,8 @@
 import java.awt.geom.GeneralPath;
 import java.awt.geom.NoninvertibleTransformException;
 import java.util.Map;
-import java.util.Vector;
+import java.util.List;
+import java.util.ArrayList;
 
 /**
  * Handles the attributes in a graphic context:<br>
@@ -68,7 +69,7 @@
     /**
      * Transform stack
      */
-    protected Vector transformStack = new Vector();
+    protected List transformStack = new ArrayList();
 
     /**
      * Defines whether the transform stack is valide or not.
@@ -138,7 +139,7 @@
         defaultTransform = new AffineTransform(defaultDeviceTransform);
         transform = new AffineTransform(defaultTransform);
         if (!defaultTransform.isIdentity())
-            transformStack.addElement(TransformStackElement.createGeneralTransformElement(defaultTransform));
+            transformStack.add(TransformStackElement.createGeneralTransformElement(defaultTransform));
     }
 
     /**
@@ -158,11 +159,11 @@
         copyGc.transform = new AffineTransform(this.transform);
 
         // Transform stack
-        copyGc.transformStack = new Vector();
+        copyGc.transformStack = new ArrayList( transformStack.size() );
         for(int i=0; i<this.transformStack.size(); i++){
             TransformStackElement stackElement =
-                (TransformStackElement)this.transformStack.elementAt(i);
-            copyGc.transformStack.addElement(stackElement.clone());
+                (TransformStackElement)this.transformStack.get(i);
+            copyGc.transformStack.add(stackElement.clone());
         }
 
         // Transform stack validity
@@ -375,7 +376,7 @@
      * there is a security manager, its <code>checkPermission</code>
      * method is called with an <code>AWTPermission("readDisplayPixels")</code>
      * permission.
-     * 
+     *
      * @param comp the <code>Composite</code> object to be used for rendering
      * @throws SecurityException
      *         if a custom <code>Composite</code> object is being
@@ -523,7 +524,7 @@
     public void translate(int x, int y){
         if(x!=0 || y!=0){
             transform.translate(x, y);
-            transformStack.addElement(TransformStackElement.createTranslateElement(x, y));
+            transformStack.add(TransformStackElement.createTranslateElement(x, y));
         }
     }
 
@@ -546,7 +547,7 @@
      */
     public void translate(double tx, double ty){
         transform.translate(tx, ty);
-        transformStack.addElement(TransformStackElement.createTranslateElement(tx, ty));
+        transformStack.add(TransformStackElement.createTranslateElement(tx, ty));
     }
 
     /**
@@ -567,7 +568,7 @@
      */
     public void rotate(double theta){
         transform.rotate(theta);
-        transformStack.addElement(TransformStackElement.createRotateElement(theta));
+        transformStack.add(TransformStackElement.createRotateElement(theta));
     }
 
     /**
@@ -591,9 +592,9 @@
      */
     public void rotate(double theta, double x, double y){
         transform.rotate(theta, x, y);
-        transformStack.addElement(TransformStackElement.createTranslateElement(x, y));
-        transformStack.addElement(TransformStackElement.createRotateElement(theta));
-        transformStack.addElement(TransformStackElement.createTranslateElement(-x, -y));
+        transformStack.add(TransformStackElement.createTranslateElement(x, y));
+        transformStack.add(TransformStackElement.createRotateElement(theta));
+        transformStack.add(TransformStackElement.createTranslateElement(-x, -y));
     }
 
     /**
@@ -617,7 +618,7 @@
      */
     public void scale(double sx, double sy){
         transform.scale(sx, sy);
-        transformStack.addElement(TransformStackElement.createScaleElement(sx, sy));
+        transformStack.add(TransformStackElement.createScaleElement(sx, sy));
     }
 
     /**
@@ -640,7 +641,7 @@
      */
     public void shear(double shx, double shy){
         transform.shear(shx, shy);
-        transformStack.addElement(TransformStackElement.createShearElement(shx, shy));
+        transformStack.add(TransformStackElement.createShearElement(shx, shy));
     }
 
     /**
@@ -662,7 +663,7 @@
      */
     public void transform(AffineTransform Tx){
         transform.concatenate(Tx);
-        transformStack.addElement(TransformStackElement.createGeneralTransformElement(Tx));
+        transformStack.add(TransformStackElement.createGeneralTransformElement(Tx));
     }
 
     /**
@@ -677,7 +678,7 @@
         transform = new AffineTransform(Tx);
         invalidateTransformStack();
         if(!Tx.isIdentity())
-            transformStack.addElement(TransformStackElement.createGeneralTransformElement(Tx));
+            transformStack.add(TransformStackElement.createGeneralTransformElement(Tx));
     }
 
     /**
@@ -702,8 +703,8 @@
      *         were concatenated with the original one.
      */
     public TransformStackElement[] getTransformStack(){
-        TransformStackElement stack[] = new TransformStackElement[transformStack.size()];
-        transformStack.copyInto(stack);
+        TransformStackElement[] stack = new TransformStackElement[transformStack.size()];
+        transformStack.toArray( stack );
         return stack;
     }
 
@@ -714,7 +715,7 @@
      * can override this memento
      */
     protected void invalidateTransformStack(){
-        transformStack.removeAllElements();
+        transformStack.clear();
         transformStackValid = false;
     }
 

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/TransformStackElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/TransformStackElement.java?view=diff&rev=496556&r1=496555&r2=496556
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/TransformStackElement.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/TransformStackElement.java
Mon Jan 15 16:59:48 2007
@@ -40,18 +40,18 @@
     /**
      * Value
      */
-    private double transformParameters[];
+    private double[] transformParameters;
 
     /**
      * @param type transform type
      * @param transformParameters parameters for transform
      */
     protected TransformStackElement(TransformType type,
-                                    double transformParameters[]){
+                                    double[] transformParameters){
         this.type = type;
         this.transformParameters = transformParameters;
     }
-    
+
     /**
      * @return an object which is a deep copy of this one
      */
@@ -64,7 +64,7 @@
         } catch(java.lang.CloneNotSupportedException ex) {}
 
         // now deep copy the parameter array
-        double transformParameters[] = new double[this.transformParameters.length];
+        double[] transformParameters = new double[this.transformParameters.length];
         System.arraycopy(this.transformParameters, 0, transformParameters, 0, transformParameters.length);
         newElement.transformParameters = transformParameters;
         return newElement;
@@ -74,9 +74,9 @@
      * Factory methods
      */
 
-    public static TransformStackElement createTranslateElement(double tx, 
+    public static TransformStackElement createTranslateElement(double tx,
                                                                double ty){
-        return new TransformStackElement(TransformType.TRANSLATE, 
+        return new TransformStackElement(TransformType.TRANSLATE,
                                          new double[]{ tx, ty }) {
                 boolean isIdentity(double[] parameters) {
                     return parameters[0] == 0 && parameters[1] == 0;
@@ -85,7 +85,7 @@
     }
 
     public static TransformStackElement createRotateElement(double theta){
-        return new TransformStackElement(TransformType.ROTATE, 
+        return new TransformStackElement(TransformType.ROTATE,
                                          new double[]{ theta }) {
                 boolean isIdentity(double[] parameters) {
                     return Math.cos(parameters[0]) == 1;
@@ -93,19 +93,19 @@
             };
     }
 
-    public static TransformStackElement createScaleElement(double scaleX, 
+    public static TransformStackElement createScaleElement(double scaleX,
                                                            double scaleY){
-        return new TransformStackElement(TransformType.SCALE, 
+        return new TransformStackElement(TransformType.SCALE,
                                          new double[]{ scaleX, scaleY }) {
                 boolean isIdentity(double[] parameters) {
                     return parameters[0] == 1 && parameters[1] == 1;
                 }
             };
     }
-    
-    public static TransformStackElement createShearElement(double shearX, 
+
+    public static TransformStackElement createShearElement(double shearX,
                                                            double shearY){
-        return new TransformStackElement(TransformType.SHEAR, 
+        return new TransformStackElement(TransformType.SHEAR,
                                          new double[]{ shearX, shearY }) {
                 boolean isIdentity(double[] parameters) {
                     return parameters[0] == 0 && parameters[1] == 0;
@@ -115,7 +115,7 @@
 
     public static TransformStackElement createGeneralTransformElement
         (AffineTransform txf){
-        double matrix[] = new double[6];
+        double[] matrix = new double[6];
         txf.getMatrix(matrix);
         return new TransformStackElement(TransformType.GENERAL, matrix) {
                 boolean isIdentity(double[] m) {
@@ -124,13 +124,13 @@
                 }
             };
     }
-    
+
     /**
      * Implementation should determine if the parameter list represents
      * an identity transform, for the instance transform type.
      */
     abstract boolean isIdentity(double[] parameters);
-    
+
     /**
      * @return true iff this transform is the identity transform
      */
@@ -181,8 +181,8 @@
                 transformParameters[1] *= stackElement.transformParameters[1];
                 break;
             case TransformType.TRANSFORM_GENERAL:
-                transformParameters 
-                    = matrixMultiply(transformParameters, 
+                transformParameters
+                    = matrixMultiply(transformParameters,
                                      stackElement.transformParameters);
                 break;
             default:

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/Service.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/Service.java?view=diff&rev=496556&r1=496555&r2=496556
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/Service.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/Service.java Mon Jan 15
16:59:48 2007
@@ -34,7 +34,7 @@
  * This class handles looking up service providers on the class path.
  * It implements the system described in:
  *
- * <a href='http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service Provider'>
JAR
+ * <a href='http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service Provider'>JAR
  * File Specification Under Service Provider</a>. Note that this
  * interface is very similar to the one they describe which seems to
  * be missing in the JDK.
@@ -154,4 +154,4 @@
         return l.iterator();
     }
     
-}
\ No newline at end of file
+}

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/i18n/LocaleGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/i18n/LocaleGroup.java?view=diff&rev=496556&r1=496555&r2=496556
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/i18n/LocaleGroup.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/i18n/LocaleGroup.java Mon
Jan 15 16:59:48 2007
@@ -32,7 +32,7 @@
     /**
      * The default group.
      */
-    public final static LocaleGroup DEFAULT = new LocaleGroup();
+    public static final LocaleGroup DEFAULT = new LocaleGroup();
 
     /**
      * The shared Locale.
@@ -41,7 +41,7 @@
 
     /**
      * Sets the default locale for all the instances of ExtendedLocalizable
-     * in this group. 
+     * in this group.
      */
     public void setLocale(Locale l) {
         locale = l;

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java?view=diff&rev=496556&r1=496555&r2=496556
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java
Mon Jan 15 16:59:48 2007
@@ -53,10 +53,10 @@
     InputStream src;
 
     public Base64DecodeStream(InputStream src) {
-	this.src = src;
+        this.src = src;
     }
 
-    private final static byte pem_array[] = new byte[256];
+    private static final byte pem_array[] = new byte[256];
     static {
         for (int i=0; i<pem_array.length; i++)
             pem_array[i] = -1;
@@ -68,7 +68,7 @@
         for (char c='a'; c<='z'; c++) {
             pem_array[c] = (byte)idx++;
         }
-	
+
         for (char c='0'; c<='9'; c++) {
             pem_array[c] = (byte)idx++;
         }
@@ -79,12 +79,12 @@
 
     public boolean markSupported() { return false; }
 
-    public void close() 
+    public void close()
         throws IOException {
         EOF = true;
     }
 
-    public int available() 
+    public int available()
         throws IOException {
         return 3-out_offset;
     }
@@ -106,7 +106,7 @@
         return ((int)out_buffer[out_offset++])&0xFF;
     }
 
-    public int read(byte []out, int offset, int len) 
+    public int read(byte []out, int offset, int len)
         throws IOException {
 
         int idx = 0;
@@ -137,7 +137,7 @@
 
             int in=off, out=off;
             while(in < off+count) {
-                if ((decode_buffer[in] != '\n') && 
+                if ((decode_buffer[in] != '\n') &&
                     (decode_buffer[in] != '\r') &&
                     (decode_buffer[in] != ' '))
                     decode_buffer[out++] = decode_buffer[in];
@@ -151,7 +151,7 @@
         b = pem_array[((int)decode_buffer[1])&0xFF];
         c = pem_array[((int)decode_buffer[2])&0xFF];
         d = pem_array[((int)decode_buffer[3])&0xFF];
-	
+
         out_buffer[0] = (byte)((a<<2) | (b>>>4));
         out_buffer[1] = (byte)((b<<4) | (c>>>2));
         out_buffer[2] = (byte)((c<<6) |  d     );
@@ -171,7 +171,7 @@
             out_offset = 1;
             EOF=true;
         }
-            
+
         return false;
     }
 }



---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message