[Patch][gui] Added missing final keywords in java.awt.image
Michael Koch
konqueror@gmx.de
Wed Nov 17 08:13:00 GMT 2004
Hi list,
I just commited the attached patch to add some missing final keywords in
java.awt.image.
Michael
2004-11-17 Michael Koch <konqueror@gmx.de>
* java/awt/image/AffineTransformOp.java,
java/awt/image/ColorConvertOp.java,
java/awt/image/LookupOp.java,
java/awt/image/RescaleOp.java:
Added final keywords where they belong.
-------------- next part --------------
Index: java/awt/image/AffineTransformOp.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/AffineTransformOp.java,v
retrieving revision 1.1.2.10
diff -u -r1.1.2.10 AffineTransformOp.java
--- java/awt/image/AffineTransformOp.java 6 Nov 2004 06:39:03 -0000 1.1.2.10
+++ java/awt/image/AffineTransformOp.java 17 Nov 2004 08:04:40 -0000
@@ -164,7 +164,7 @@
* @param dst destination image
* @return transformed source image
*/
- public BufferedImage filter (BufferedImage src, BufferedImage dst)
+ public final BufferedImage filter (BufferedImage src, BufferedImage dst)
{
if (dst == src)
@@ -195,7 +195,7 @@
* @param dst destination raster
* @return transformed raster
*/
- public WritableRaster filter (Raster src, WritableRaster dst)
+ public final WritableRaster filter (Raster src, WritableRaster dst)
{
if (dst == src)
throw new IllegalArgumentException("src image cannot be the same as"
@@ -297,7 +297,7 @@
* @param src image to be transformed
* @return bounds of the transformed image.
*/
- public Rectangle2D getBounds2D (BufferedImage src)
+ public final Rectangle2D getBounds2D (BufferedImage src)
{
return getBounds2D (src.getRaster());
}
@@ -308,7 +308,7 @@
* @param src raster to be transformed
* @return bounds of the transformed raster.
*/
- public Rectangle2D getBounds2D (Raster src)
+ public final Rectangle2D getBounds2D (Raster src)
{
// determine new size for the transformed raster.
// Need to calculate transformed coordinates of the lower right
@@ -327,7 +327,7 @@
*
* @return interpolation type
*/
- public int getInterpolationType ()
+ public final int getInterpolationType ()
{
if(hints.containsValue (RenderingHints.VALUE_INTERPOLATION_BILINEAR))
return TYPE_BILINEAR;
@@ -352,7 +352,7 @@
*
* @return rendering hints
*/
- public RenderingHints getRenderingHints ()
+ public final RenderingHints getRenderingHints ()
{
return hints;
}
@@ -362,7 +362,7 @@
*
* @return transform
*/
- public AffineTransform getTransform ()
+ public final AffineTransform getTransform ()
{
return transform;
}
Index: java/awt/image/ColorConvertOp.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/Attic/ColorConvertOp.java,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 ColorConvertOp.java
--- java/awt/image/ColorConvertOp.java 2 Nov 2004 02:36:56 -0000 1.1.2.2
+++ java/awt/image/ColorConvertOp.java 17 Nov 2004 08:04:40 -0000
@@ -1,5 +1,5 @@
/* ColorModel.java --
-Copyright (C) 2004 Free Software Foundation
+ Copyright (C) 2004 Free Software Foundation
This file is part of GNU Classpath.
@@ -35,6 +35,7 @@
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
+
package java.awt.image;
import java.awt.Graphics2D;
@@ -156,7 +157,7 @@
* @see java.awt.image.BufferedImageOp#filter(java.awt.image.BufferedImage,
java.awt.image.BufferedImage)
*/
- public BufferedImage filter(BufferedImage src, BufferedImage dst)
+ public final BufferedImage filter(BufferedImage src, BufferedImage dst)
{
// TODO: The plan is to create a scanline buffer for intermediate buffers.
// For now we just suck it up and create intermediate buffers.
@@ -204,13 +205,13 @@
null);
}
- public ICC_Profile[] getICC_Profiles()
+ public final ICC_Profile[] getICC_Profiles()
{
return profiles;
}
/** Return the rendering hints for this op. */
- public RenderingHints getRenderingHints()
+ public final RenderingHints getRenderingHints()
{
return hints;
}
@@ -218,7 +219,7 @@
/* (non-Javadoc)
* @see java.awt.image.RasterOp#filter(java.awt.image.Raster, java.awt.image.WritableRaster)
*/
- public WritableRaster filter(Raster src, WritableRaster dest)
+ public final WritableRaster filter(Raster src, WritableRaster dest)
{
if (!rasterValid)
throw new IllegalArgumentException();
@@ -258,7 +259,7 @@
* @param dst The destination point.
* @see java.awt.image.RasterOp#getPoint2D(java.awt.geom.Point2D, java.awt.geom.Point2D)
*/
- public Point2D getPoint2D(Point2D src, Point2D dst)
+ public final Point2D getPoint2D(Point2D src, Point2D dst)
{
if (dst == null) return (Point2D)src.clone();
dst.setLocation(src);
@@ -268,7 +269,7 @@
/* (non-Javadoc)
* @see java.awt.image.BufferedImageOp#getBounds2D(java.awt.image.BufferedImage)
*/
- public Rectangle2D getBounds2D(BufferedImage src)
+ public final Rectangle2D getBounds2D(BufferedImage src)
{
return src.getRaster().getBounds();
}
@@ -276,7 +277,7 @@
/* (non-Javadoc)
* @see java.awt.image.RasterOp#getBounds2D(java.awt.image.Raster)
*/
- public Rectangle2D getBounds2D(Raster src)
+ public final Rectangle2D getBounds2D(Raster src)
{
return src.getBounds();
}
Index: java/awt/image/LookupOp.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/Attic/LookupOp.java,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 LookupOp.java
--- java/awt/image/LookupOp.java 7 Nov 2004 23:05:10 -0000 1.1.2.3
+++ java/awt/image/LookupOp.java 17 Nov 2004 08:04:40 -0000
@@ -1,5 +1,5 @@
/* LookupOp.java -- Filter that converts each pixel using a lookup table.
-Copyright (C) 2004 Free Software Foundation
+ Copyright (C) 2004 Free Software Foundation
This file is part of GNU Classpath.
@@ -35,6 +35,7 @@
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
+
package java.awt.image;
import java.awt.Graphics2D;
Index: java/awt/image/RescaleOp.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/Attic/RescaleOp.java,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 RescaleOp.java
--- java/awt/image/RescaleOp.java 2 Nov 2004 02:36:56 -0000 1.1.2.3
+++ java/awt/image/RescaleOp.java 17 Nov 2004 08:04:40 -0000
@@ -34,6 +34,7 @@
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
+
package java.awt.image;
import java.awt.RenderingHints;
@@ -42,8 +43,7 @@
import java.util.Arrays;
/**
- * @author Jerry Quinn <jlquinn@optonline.net>
- *
+ * @author Jerry Quinn (jlquinn@optonline.net)
*/
public class RescaleOp implements BufferedImageOp, RasterOp
{
@@ -101,7 +101,7 @@
/* (non-Javadoc)
* @see java.awt.image.BufferedImageOp#filter(java.awt.image.BufferedImage, java.awt.image.BufferedImage)
*/
- public BufferedImage filter(BufferedImage src, BufferedImage dst)
+ public final BufferedImage filter(BufferedImage src, BufferedImage dst)
{
// TODO Make sure premultiplied alpha is handled correctly.
// TODO See that color conversion is handled.
@@ -134,7 +134,7 @@
/* (non-Javadoc)
* @see java.awt.image.RasterOp#filter(java.awt.image.Raster, java.awt.image.WritableRaster)
*/
- public WritableRaster filter(Raster src, WritableRaster dest)
+ public final WritableRaster filter(Raster src, WritableRaster dest)
{
if (dest == null) dest = src.createCompatibleWritableRaster();
@@ -193,7 +193,7 @@
/* (non-Javadoc)
* @see java.awt.image.BufferedImageOp#getBounds2D(java.awt.image.BufferedImage)
*/
- public Rectangle2D getBounds2D(BufferedImage src)
+ public final Rectangle2D getBounds2D(BufferedImage src)
{
return src.getRaster().getBounds();
}
@@ -201,7 +201,7 @@
/* (non-Javadoc)
* @see java.awt.image.RasterOp#getBounds2D(java.awt.image.Raster)
*/
- public Rectangle2D getBounds2D(Raster src)
+ public final Rectangle2D getBounds2D(Raster src)
{
return src.getBounds();
}
@@ -209,7 +209,7 @@
/* (non-Javadoc)
* @see java.awt.image.BufferedImageOp#getPoint2D(java.awt.geom.Point2D, java.awt.geom.Point2D)
*/
- public Point2D getPoint2D(Point2D src, Point2D dst) {
+ public final Point2D getPoint2D(Point2D src, Point2D dst) {
if (dst == null) dst = (Point2D) src.clone();
else dst.setLocation(src);
return dst;
More information about the Java-patches
mailing list