harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r470895 [2/3] - in /incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt: geom/ im/ image/ image/renderable/ print/
Date Fri, 03 Nov 2006 16:45:03 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ComponentColorModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ComponentColorModel.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ComponentColorModel.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ComponentColorModel.java Fri Nov  3 08:45:01 2006
@@ -23,6 +23,7 @@
 import java.awt.color.ColorSpace;
 
 import org.apache.harmony.awt.gl.color.LUTColorConverter;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 
 public class ComponentColorModel extends ColorModel {
@@ -136,10 +137,11 @@
             donotSupportUnnormalized = true;
             break;
         default:
-            throw new IllegalArgumentException("transferType is not " +
-                    "one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, " +
-                    "DataBuffer.TYPE_INT, DataBuffer.TYPE_SHORT, " +
-                    "DataBuffer.TYPE_FLOAT, or DataBuffer.TYPE_DOUBLE");
+            // awt.215=transferType is not one of DataBuffer.TYPE_BYTE,
+            //          DataBuffer.TYPE_USHORT, DataBuffer.TYPE_INT,
+            //          DataBuffer.TYPE_SHORT, DataBuffer.TYPE_FLOAT, or
+            //          DataBuffer.TYPE_DOUBLE
+            throw new IllegalArgumentException(Messages.getString("awt.215")); //$NON-NLS-1$
         }
 
         needAlphaDivide = hasAlpha && isAlphaPremultiplied;
@@ -206,13 +208,13 @@
     @Override
     public Object getDataElements(int components[], int offset, Object obj) {
         if (donotSupportUnnormalized) {
-            throw new IllegalArgumentException("This ComponentColorModel " +
-                    "does not support the unnormalized form");
+            // awt.213=This ComponentColorModel does not support the unnormalized form
+            throw new IllegalArgumentException(Messages.getString("awt.213")); //$NON-NLS-1$
         }
 
         if (offset + numComponents > components.length) {
-            throw new IllegalArgumentException("The components array is not " +
-                    "large enough to hold all the color and alpha components ");
+            // awt.216=The components array is not large enough to hold all the color and alpha components
+            throw new IllegalArgumentException(Messages.getString("awt.216")); //$NON-NLS-1$
         }
 
         switch (transferType) {
@@ -250,11 +252,11 @@
             }
             return ia;
         default:
-            throw new UnsupportedOperationException(
-                    "The transfer type of this ComponentColorModel" +
-                    " is not one of the following transfer types: " +
-                    "DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, " +
-                    "or DataBuffer.TYPE_INT");
+            // awt.217=The transfer type of this ComponentColorModel is not one
+            //          of the following transfer types: DataBuffer.TYPE_BYTE,
+            //          DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT
+            throw new UnsupportedOperationException(Messages
+                    .getString("awt.217")); //$NON-NLS-1$
         }
     }
 
@@ -415,9 +417,8 @@
             return da;
 
         default:
-            throw new IllegalArgumentException("This ComponentColorModel " +
-                    "does not support the unnormalized form");
-
+            // awt.213=This ComponentColorModel does not support the unnormalized form
+            throw new IllegalArgumentException(Messages.getString("awt.213")); //$NON-NLS-1$
         }
     }
 
@@ -606,8 +607,8 @@
                 break;
 
             default:
-                throw new UnsupportedOperationException("This transferType " +
-                        "is not supported by this color model");
+                // awt.219=This transferType is not supported by this color model
+                throw new UnsupportedOperationException(Messages.getString("awt.219")); //$NON-NLS-1$
             }
         } else {
             switch (transferType) {
@@ -707,8 +708,8 @@
                 }
                 break;
             default:
-                throw new UnsupportedOperationException("This transferType " +
-                        "is not supported by this color model");
+                // awt.219=This transferType is not supported by this color model
+                throw new UnsupportedOperationException(Messages.getString("awt.219")); //$NON-NLS-1$
             }
         }
 
@@ -724,15 +725,15 @@
     @Override
     public int[] getComponents(Object pixel, int[] components, int offset) {
         if (donotSupportUnnormalized) {
-            throw new IllegalArgumentException("This ComponentColorModel " +
-                    "does not support the unnormalized form");
+            // awt.213=This ComponentColorModel does not support the unnormalized form
+            throw new IllegalArgumentException(Messages.getString("awt.213")); //$NON-NLS-1$
         }
 
         if (components == null) {
             components = new int[offset + numComponents];
         } else if (offset + numComponents > components.length) {
-            throw new IllegalArgumentException("The components array is not " +
-                    "large enough to hold all the color and alpha components ");
+            // awt.218=The components array is not large enough to hold all the color and alpha components
+            throw new IllegalArgumentException(Messages.getString("awt.218")); //$NON-NLS-1$
         }
 
         switch (transferType) {
@@ -759,10 +760,11 @@
             return components;
 
         default:
-            throw new UnsupportedOperationException("The transfer type " +
-                    "of this ComponentColorModel is not one of the " +
-                    "following transfer types: DataBuffer.TYPE_BYTE, " +
-                    "DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT");
+            // awt.217=The transfer type of this ComponentColorModel is not one
+            //          of the following transfer types: DataBuffer.TYPE_BYTE,
+            //          DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT
+            throw new UnsupportedOperationException(Messages
+                    .getString("awt.217")); //$NON-NLS-1$
         }
 
     }
@@ -820,8 +822,8 @@
             break;
 
         default:
-            throw new IllegalArgumentException("This ComponentColorModel " +
-                    "does not support this transferType");
+            // awt.21A=This ComponentColorModel does not support this transferType
+            throw new IllegalArgumentException(Messages.getString("awt.21A")); //$NON-NLS-1$
         }
 
         if (needAlphaDivide) {
@@ -925,8 +927,8 @@
             return (int) (da[numColorComponents] * 255.0 + 0.5);
         }
         default: {
-            throw new UnsupportedOperationException("This Color Model " +
-                    "doesn't support this transferType");
+            // awt.214=This Color Model doesn't support this transferType
+            throw new UnsupportedOperationException(Messages.getString("awt.214")); //$NON-NLS-1$
         }
         }
     }
@@ -998,8 +1000,8 @@
     public float[] getNormalizedComponents(int components[], int offset,
             float normComponents[], int normOffset) {
         if (donotSupportUnnormalized) {
-            throw new IllegalArgumentException("This ComponentColorModel " +
-                    "does not support the unnormalized form");
+            // awt.213=This ComponentColorModel does not support the unnormalized form
+            throw new IllegalArgumentException(Messages.getString("awt.213")); //$NON-NLS-1$
         }
 
         return super.getNormalizedComponents(components, offset,
@@ -1009,12 +1011,12 @@
     @Override
     public int getDataElement(int[] components, int offset) {
         if (numComponents > 1) {
-            throw new IllegalArgumentException("There is more than one " +
-                    "component in this ColorModel");
+            // awt.212=There is more than one component in this ColorModel
+            throw new IllegalArgumentException(Messages.getString("awt.212")); //$NON-NLS-1$
         }
         if (donotSupportUnnormalized) {
-            throw new IllegalArgumentException("This ComponentColorModel " +
-                    "does not support the unnormalized form");
+            // awt.213=This ComponentColorModel does not support the unnormalized form
+            throw new IllegalArgumentException(Messages.getString("awt.213")); //$NON-NLS-1$
         }
         return components[offset];
     }
@@ -1024,14 +1026,13 @@
             int normOffset, int[] components, int offset) {
 
         if (donotSupportUnnormalized) {
-            throw new IllegalArgumentException("This ComponentColorModel " +
-                    "does not support the unnormalized form ");
+            // awt.213=This ComponentColorModel does not support the unnormalized form
+            throw new IllegalArgumentException(Messages.getString("awt.213")); //$NON-NLS-1$
         }
 
         if (normComponents.length - normOffset < numComponents) {
-            throw new IllegalArgumentException("The length of " +
-                    "normComponents minus normOffset is less than" + 
-                    " numComponents");
+            // awt.21B=The length of normComponents minus normOffset is less than numComponents
+            throw new IllegalArgumentException(Messages.getString("awt.21B")); //$NON-NLS-1$
         }
 
         return super.getUnnormalizedComponents(normComponents, normOffset,
@@ -1041,12 +1042,12 @@
     @Override
     public int getDataElement(float normComponents[], int normOffset) {
         if (numComponents > 1) {
-            throw new IllegalArgumentException("There is more than one " +
-                    "component in this ColorModel");
+            // awt.212=There is more than one component in this ColorModel
+            throw new IllegalArgumentException(Messages.getString("awt.212")); //$NON-NLS-1$
         }
         if (signed) {
-            throw new IllegalArgumentException("The component value for " +
-                    "this ColorModel is signed");
+            // awt.210=The component value for this ColorModel is signed
+            throw new IllegalArgumentException(Messages.getString("awt.210")); //$NON-NLS-1$
         }
 
         Object pixel = getDataElements(normComponents, normOffset, null);
@@ -1062,21 +1063,21 @@
             int ia[] = (int[]) pixel;
             return ia[0];
         default:
-            throw new IllegalArgumentException("Pixel values for " +
-                    "this ColorModel are not conveniently representable " +
-                    "as a single int ");
+            // awt.211=Pixel values for this ColorModel are not conveniently
+            //          representable as a single int
+            throw new IllegalArgumentException(Messages.getString("awt.211")); //$NON-NLS-1$
         }
     }
 
     @Override
     public int[] getComponents(int pixel, int components[], int offset) {
         if (numComponents > 1) {
-            throw new IllegalArgumentException("There is more than one " +
-                    "component in this ColorModel");
+            // awt.212=There is more than one component in this ColorModel
+            throw new IllegalArgumentException(Messages.getString("awt.212")); //$NON-NLS-1$
         }
         if (donotSupportUnnormalized) {
-            throw new IllegalArgumentException("This ComponentColorModel " +
-                    "does not support the unnormalized form");
+            // awt.213=This ComponentColorModel does not support the unnormalized form
+            throw new IllegalArgumentException(Messages.getString("awt.213")); //$NON-NLS-1$
         }
 
         if (components == null) {
@@ -1117,13 +1118,13 @@
         // This method throw IllegalArgumentException according to 
         // Java API Spacification
         if (signed) {
-            throw new IllegalArgumentException("The component value " +
-                    "for this ColorModel is signed");
+            // awt.210=The component value for this ColorModel is signed
+            throw new IllegalArgumentException(Messages.getString("awt.210")); //$NON-NLS-1$
         }
 
         if (numComponents > 1) {
-            throw new IllegalArgumentException("There is more than one " +
-                    "component in this ColorModel");
+            // awt.212=There is more than one component in this ColorModel
+            throw new IllegalArgumentException(Messages.getString("awt.212")); //$NON-NLS-1$
         }
 
         return 255;
@@ -1221,13 +1222,13 @@
         // This method throw IllegalArgumentException according to 
         // Java API Spacification
         if (signed) {
-            throw new IllegalArgumentException("The component value " +
-                    "for this ColorModel is signed");
+            // awt.210=The component value for this ColorModel is signed
+            throw new IllegalArgumentException(Messages.getString("awt.210")); //$NON-NLS-1$
         }
 
         if (numComponents > 1) {
-            throw new IllegalArgumentException("There is more than " +
-                    "one component in this ColorModel");
+            // awt.212=There is more than one component in this ColorModel
+            throw new IllegalArgumentException(Messages.getString("awt.212")); //$NON-NLS-1$
         }
 
         Object obj = null;
@@ -1382,8 +1383,8 @@
             return comp;
 
         default:
-            throw new UnsupportedOperationException("This Color Model " +
-                    "doesn't support this transferType");
+            // awt.214=This Color Model doesn't support this transferType
+            throw new UnsupportedOperationException(Messages.getString("awt.214")); //$NON-NLS-1$
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ComponentSampleModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ComponentSampleModel.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ComponentSampleModel.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ComponentSampleModel.java Fri Nov  3 08:45:01 2006
@@ -22,6 +22,8 @@
 
 import java.util.Arrays;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class ComponentSampleModel extends SampleModel {
 
     protected int bandOffsets[];
@@ -42,16 +44,18 @@
         super(dataType, w, h, bandOffsets.length);
 
         if (pixelStride < 0) {
-            throw new IllegalArgumentException("Pixel stride must be >= 0");
+            // awt.24B=Pixel stride must be >= 0
+            throw new IllegalArgumentException(Messages.getString("awt.24B")); //$NON-NLS-1$
         }
 
         if (scanlineStride < 0) {
-            throw new IllegalArgumentException("Scanline stride must be >= 0");
+            // awt.24C=Scanline stride must be >= 0
+            throw new IllegalArgumentException(Messages.getString("awt.24C")); //$NON-NLS-1$
         }
 
         if (bankIndices.length != bandOffsets.length) {
-            throw new IllegalArgumentException("Bank Indices length must be " +
-                    "equal Bank Offsets length");
+            // awt.24D=Bank Indices length must be equal Bank Offsets length
+            throw new IllegalArgumentException(Messages.getString("awt.24D")); //$NON-NLS-1$
         }
 
         this.pixelStride = pixelStride;
@@ -63,8 +67,8 @@
         int maxBank = 0;
         for (int i = 0; i < bankIndices.length; i++) {
             if (bankIndices[i] < 0) {
-                throw new IllegalArgumentException("Index of " + i
-                        + "bank must be >= 0");
+                // awt.24E=Index of {0} bank must be >= 0
+                throw new IllegalArgumentException(Messages.getString("awt.24E", i)); //$NON-NLS-1$
             }
             if (bankIndices[i] > maxBank) {
                 maxBank = bankIndices[i];
@@ -79,11 +83,13 @@
 
         super(dataType, w, h, bandOffsets.length);
         if (pixelStride < 0) {
-            throw new IllegalArgumentException("Pixel stride must be >= 0");
+            // awt.24B=Pixel stride must be >= 0
+            throw new IllegalArgumentException(Messages.getString("awt.24B")); //$NON-NLS-1$
         }
 
         if (scanlineStride < 0) {
-            throw new IllegalArgumentException("Scanline stride must be >= 0");
+            // awt.24C=Scanline stride must be >= 0
+            throw new IllegalArgumentException(Messages.getString("awt.24C")); //$NON-NLS-1$
         }
 
         this.pixelStride = pixelStride;
@@ -242,9 +248,8 @@
     @Override
     public SampleModel createSubsetSampleModel(int bands[]) {
         if (bands.length > this.numBands) {
-            throw new RasterFormatException("The number of the bands " +
-                    "in the subset is greater than the number of bands " +
-                    "in the sample model");
+            // awt.64=The number of the bands in the subset is greater than the number of bands in the sample model
+            throw new RasterFormatException(Messages.getString("awt.64")); //$NON-NLS-1$
         }
 
         int indices[] = new int[bands.length];
@@ -293,8 +298,8 @@
     @Override
     public int getSample(int x, int y, int b, DataBuffer data) {
         if (x < 0 || y < 0 || x >= this.width || y >= this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
 
         return data.getElem(bankIndices[b], y * scanlineStride +
@@ -304,8 +309,8 @@
     @Override
     public float getSampleFloat(int x, int y, int b, DataBuffer data) {
         if (x < 0 || y < 0 || x >= this.width || y >= this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
 
         return data.getElemFloat(bankIndices[b], y * scanlineStride +
@@ -315,8 +320,8 @@
     @Override
     public double getSampleDouble(int x, int y, int b, DataBuffer data) {
         if (x < 0 || y < 0 || x >= this.width || y >= this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
 
         return data.getElemDouble(bankIndices[b], y * scanlineStride +
@@ -327,8 +332,8 @@
     public int[] getPixels(int x, int y, int w, int h, int iArray[],
             DataBuffer data) {
         if (x < 0 || y < 0 || x + w > this.width || y + h > this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
         int pixels[] = null;
         int idx = 0;
@@ -354,8 +359,8 @@
     public void setPixels(int x, int y, int w, int h, int iArray[],
             DataBuffer data) {
         if (x < 0 || y < 0 || x + w > this.width || y + h > this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
         int idx = 0;
         for (int i = y; i < y + h; i++) {
@@ -370,8 +375,8 @@
     @Override
     public void setSample(int x, int y, int b, int s, DataBuffer data) {
         if (x < 0 || y < 0 || x >= this.width || y >= this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
 
         data.setElem(bankIndices[b], y * scanlineStride + x * pixelStride
@@ -382,8 +387,8 @@
     public int[] getSamples(int x, int y, int w, int h, int b, int iArray[],
             DataBuffer data) {
         if (x < 0 || y < 0 || x + w > this.width || y + h > this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
         int samples[];
         int idx = 0;
@@ -407,8 +412,8 @@
     public void setSamples(int x, int y, int w, int h, int b, int iArray[],
             DataBuffer data) {
         if (x < 0 || y < 0 || x + w > this.width || y + h > this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
         int idx = 0;
         for (int i = y; i < y + h; i++) {
@@ -421,8 +426,8 @@
     @Override
     public void setSample(int x, int y, int b, float s, DataBuffer data) {
         if (x < 0 || y < 0 || x >= this.width || y >= this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
 
         data.setElemFloat(bankIndices[b], y * scanlineStride +
@@ -432,8 +437,8 @@
     @Override
     public void setSample(int x, int y, int b, double s, DataBuffer data) {
         if (x < 0 || y < 0 || x >= this.width || y >= this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
 
         data.setElemDouble(bankIndices[b], y * scanlineStride +

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ConvolveOp.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ConvolveOp.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ConvolveOp.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ConvolveOp.java Fri Nov  3 08:45:01 2006
@@ -29,6 +29,7 @@
 import java.util.Arrays;
 
 import org.apache.harmony.awt.gl.AwtImageBackdoorAccessor;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 public class ConvolveOp implements BufferedImageOp, RasterOp {
 
@@ -113,26 +114,28 @@
 
     public final WritableRaster filter(Raster src, WritableRaster dst) {
         if (src == null) { // Should throw according to spec
-            throw new NullPointerException("Source raster is null");
+            // awt.256=Source raster is null
+            throw new NullPointerException(Messages.getString("awt.256")); //$NON-NLS-1$
         }
 
         if (src == dst){
-            throw new IllegalArgumentException("Source raster is equal to destination");
+            // awt.257=Source raster is equal to destination
+            throw new IllegalArgumentException(Messages.getString("awt.257")); //$NON-NLS-1$
         }
 
         if (dst == null) {
             dst = createCompatibleDestRaster(src);
         } else if (src.getNumBands() != dst.getNumBands()) {
+            // awt.258=Number of source bands ({0}) is not equal to number of destination bands ({1})
             throw new IllegalArgumentException(
-                "Number of source bands (" + src.getNumBands() +
-                 ") is not equal to number of destination bands (" + dst.getNumBands() + ")"
-            );
+                Messages.getString("awt.258", src.getNumBands(), dst.getNumBands())); //$NON-NLS-1$
         }
 
         // TODO
         //if (ippFilter(src, dst, BufferedImage.TYPE_CUSTOM) != 0)
             if (slowFilter(src, dst) != 0) {
-                throw new ImagingOpException ("Unable to transform source");
+                // awt.21F=Unable to transform source
+                throw new ImagingOpException (Messages.getString("awt.21F")); //$NON-NLS-1$
             }
 
         return dst;
@@ -240,11 +243,13 @@
 
     public final BufferedImage filter(BufferedImage src, BufferedImage dst) {
         if (src == null) {
-            throw new NullPointerException("Source image is null");
+            // awt.259=Source image is null
+            throw new NullPointerException(Messages.getString("awt.259")); //$NON-NLS-1$
         }
 
         if (src == dst){
-            throw new IllegalArgumentException("Source equals to destination");
+            // awt.25A=Source equals to destination
+            throw new IllegalArgumentException(Messages.getString("awt.25A")); //$NON-NLS-1$
         }
 
         ColorModel srcCM = src.getColorModel();
@@ -276,7 +281,8 @@
         // TODO
         //if (ippFilter(src.getRaster(), dst.getRaster(), src.getType()) != 0)
             if (slowFilter(src.getRaster(), dst.getRaster()) != 0) {
-                throw new ImagingOpException ("Unable to transform source");
+                // awt.21F=Unable to transform source
+                throw new ImagingOpException (Messages.getString("awt.21F")); //$NON-NLS-1$
             }
 
         if (finalDst != null) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/CropImageFilter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/CropImageFilter.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/CropImageFilter.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/CropImageFilter.java Fri Nov  3 08:45:01 2006
@@ -42,15 +42,15 @@
         } else {
             fprops = (Hashtable<Object, Object>) props.clone();
         }
-        String propName = "Crop Filters";
-        String prop = "x=" + X + "; y=" + Y + "; width=" +
-        WIDTH + "; height=" + HEIGHT;
+        String propName = "Crop Filters"; //$NON-NLS-1$
+        String prop = "x=" + X + "; y=" + Y + "; width=" + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        WIDTH + "; height=" + HEIGHT; //$NON-NLS-1$
         Object o = fprops.get(propName);
         if(o != null){
             if(o instanceof String){
-                prop = (String)o + "; " + prop;
+                prop = (String)o + "; " + prop; //$NON-NLS-1$
             }else{
-                prop =  o.toString() + "; " + prop;
+                prop =  o.toString() + "; " + prop; //$NON-NLS-1$
             }
         }
         fprops.put(propName, prop);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/DataBuffer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/DataBuffer.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/DataBuffer.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/DataBuffer.java Fri Nov  3 08:45:01 2006
@@ -21,6 +21,7 @@
 package java.awt.image;
 
 import org.apache.harmony.awt.gl.image.DataBufferListener;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 public abstract class DataBuffer {
 
@@ -174,7 +175,8 @@
             return 64;
 
         default:
-            throw new IllegalArgumentException("Unknown data type " + type);
+            // awt.22C=Unknown data type {0}
+            throw new IllegalArgumentException(Messages.getString("awt.22C", type)); //$NON-NLS-1$
         }
     }
     

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/DirectColorModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/DirectColorModel.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/DirectColorModel.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/DirectColorModel.java Fri Nov  3 08:45:01 2006
@@ -25,6 +25,7 @@
 import java.util.Arrays;
 
 import org.apache.harmony.awt.gl.color.LUTColorConverter;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 
 public class DirectColorModel extends PackedColorModel {
@@ -121,8 +122,8 @@
             break;
 
         default:
-            throw new UnsupportedOperationException("This transferType is " +
-                    "not supported by this color model");
+            // awt.214=This Color Model doesn't support this transferType
+            throw new UnsupportedOperationException(Messages.getString("awt.214")); //$NON-NLS-1$
         }
 
         return obj;
@@ -247,8 +248,8 @@
             return ia;
 
         default:
-            throw new UnsupportedOperationException("This transferType " +
-                    "is not supported by this color model");
+            // awt.214=This Color Model doesn't support this transferType
+            throw new UnsupportedOperationException(Messages.getString("awt.214")); //$NON-NLS-1$
         }
     }
 
@@ -296,8 +297,8 @@
                 break;
 
             default:
-                throw new UnsupportedOperationException("This transferType " +
-                        "is not supported by this color model");
+                // awt.214=This Color Model doesn't support this transferType
+                throw new UnsupportedOperationException(Messages.getString("awt.214")); //$NON-NLS-1$
             }
         } else {
             switch (transferType) {
@@ -322,8 +323,8 @@
                 break;
 
             default:
-                throw new UnsupportedOperationException("This transferType " +
-                        "is not supported by this color model");
+                // awt.214=This Color Model doesn't support this transferType
+                throw new UnsupportedOperationException(Messages.getString("awt.214")); //$NON-NLS-1$
             }
 
         }
@@ -340,11 +341,11 @@
         // BufferedImage bi = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
         // ColorModel cm = bi.getColorModel();
         // System.out.println(cm.toString());
-        String str = "DirectColorModel:" + " rmask = " +
-               Integer.toHexString(componentMasks[0]) + " gmask = " +
-               Integer.toHexString(componentMasks[1]) + " bmask = " +
-               Integer.toHexString(componentMasks[2]) + " amask = " +
-               (!hasAlpha ? "0" : Integer.toHexString(componentMasks[3]));
+        String str = "DirectColorModel:" + " rmask = " + //$NON-NLS-1$ //$NON-NLS-2$
+               Integer.toHexString(componentMasks[0]) + " gmask = " + //$NON-NLS-1$
+               Integer.toHexString(componentMasks[1]) + " bmask = " + //$NON-NLS-1$
+               Integer.toHexString(componentMasks[2]) + " amask = " + //$NON-NLS-1$
+               (!hasAlpha ? "0" : Integer.toHexString(componentMasks[3])); //$NON-NLS-1$
 
         return str;
     }
@@ -376,8 +377,9 @@
             break;
 
         default:
-            throw new UnsupportedOperationException("This transferType ( " +
-                   transferType + " ) is not supported by this color model");
+            // awt.22D=This transferType ( {0} ) is not supported by this color model
+            throw new UnsupportedOperationException(Messages.getString("awt.22D", //$NON-NLS-1$
+                   transferType));
         }
 
         return getComponents(intPixel, components, offset);
@@ -403,8 +405,8 @@
             break;
 
         default:
-            throw new UnsupportedOperationException("This tranferType is " +
-                    "not supported by this ColorModel");
+            // awt.214=This Color Model doesn't support this transferType
+            throw new UnsupportedOperationException(Messages.getString("awt.214")); //$NON-NLS-1$
         }
         return getRed(pixel);
     }
@@ -429,8 +431,8 @@
             break;
 
         default:
-            throw new UnsupportedOperationException("This tranferType is " +
-                    "not supported by this ColorModel");
+            // awt.214=This Color Model doesn't support this transferType
+            throw new UnsupportedOperationException(Messages.getString("awt.214")); //$NON-NLS-1$
         }
         return getRGB(pixel);
     }
@@ -455,8 +457,8 @@
             break;
 
         default:
-            throw new UnsupportedOperationException("This tranferType is " +
-                    "not supported by this ColorModel");
+            // awt.214=This Color Model doesn't support this transferType
+            throw new UnsupportedOperationException(Messages.getString("awt.214")); //$NON-NLS-1$
         }
         return getGreen(pixel);
     }
@@ -481,8 +483,8 @@
             break;
 
         default:
-            throw new UnsupportedOperationException("This tranferType is " +
-                    "not supported by this ColorModel");
+            // awt.214=This Color Model doesn't support this transferType
+            throw new UnsupportedOperationException(Messages.getString("awt.214")); //$NON-NLS-1$
         }
         return getBlue(pixel);
     }
@@ -507,8 +509,8 @@
             break;
 
         default:
-            throw new UnsupportedOperationException("This tranferType is " +
-                    "not supported by this ColorModel");
+            // awt.214=This Color Model doesn't support this transferType
+            throw new UnsupportedOperationException(Messages.getString("awt.214")); //$NON-NLS-1$
         }
         return getAlpha(pixel);
     }
@@ -516,8 +518,8 @@
     @Override
     public final WritableRaster createCompatibleWritableRaster(int w, int h) {
         if (w <= 0 || h <= 0) {
-            throw new IllegalArgumentException("w or h is less than or " +
-                    "equal to zero");
+            // awt.22E=w or h is less than or equal to zero
+            throw new IllegalArgumentException(Messages.getString("awt.22E")); //$NON-NLS-1$
         }
 
         int bandMasks[] = componentMasks.clone();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ImageFilter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ImageFilter.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ImageFilter.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ImageFilter.java Fri Nov  3 08:45:01 2006
@@ -44,14 +44,14 @@
         } else {
             fprops = (Hashtable<Object, Object>) props.clone();
         }
-        String propName = "Filters";
-        String prop = "Null filter";
+        String propName = "Filters"; //$NON-NLS-1$
+        String prop = "Null filter"; //$NON-NLS-1$
         Object o = fprops.get(propName);
         if (o != null) {
             if (o instanceof String) {
-                prop = (String) o + "; " + prop;
+                prop = (String) o + "; " + prop; //$NON-NLS-1$
             } else {
-                prop = o.toString() + "; " + prop;
+                prop = o.toString() + "; " + prop; //$NON-NLS-1$
             }
         }
         fprops.put(propName, prop);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/IndexColorModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/IndexColorModel.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/IndexColorModel.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/IndexColorModel.java Fri Nov  3 08:45:01 2006
@@ -24,6 +24,8 @@
 import java.awt.color.ColorSpace;
 import java.math.BigInteger;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class IndexColorModel extends ColorModel {
 
     private int colorMap[];        // Color Map  
@@ -57,8 +59,8 @@
                 Transparency.OPAQUE, validateTransferType(transferType));
 
         if (size < 1) {
-            throw new IllegalArgumentException("Size of the color map is " +
-                    "less than 1");
+            // awt.264=Size of the color map is less than 1
+            throw new IllegalArgumentException(Messages.getString("awt.264")); //$NON-NLS-1$
         }
 
         mapSize = size;
@@ -111,8 +113,8 @@
                 validateTransferType(transferType));
 
         if (size < 1) {
-            throw new IllegalArgumentException("Size of the color map " +
-                    "is less than 1");
+            // awt.264=Size of the color map is less than 1
+            throw new IllegalArgumentException(Messages.getString("awt.264")); //$NON-NLS-1$
         }
 
         mapSize = size;
@@ -202,8 +204,8 @@
                 validateTransferType(ColorModel.getTransferType(bits)));
 
         if (size < 1) {
-            throw new IllegalArgumentException("Size of the color map " +
-                    "is less than 1");
+            // awt.264=Size of the color map is less than 1
+            throw new IllegalArgumentException(Messages.getString("awt.264")); //$NON-NLS-1$
         }
 
         mapSize = size;
@@ -354,8 +356,8 @@
             boolean forceARGB) {
 
         if (!isCompatibleRaster(raster)) {
-            throw new IllegalArgumentException("The raster argument is " +
-                    "not compatible with this IndexColorModel");
+            // awt.265=The raster argument is not compatible with this IndexColorModel
+            throw new IllegalArgumentException(Messages.getString("awt.265")); //$NON-NLS-1$
         }
 
         ColorModel model;
@@ -425,20 +427,20 @@
         // BufferedImage bi = new BufferedImage(1, 1, BufferedImage.TYPE_BYTE_INDEXED);
         // ColorModel cm = bi.getColorModel();
         // System.out.println(cm.toString());
-        String str = "IndexColorModel: #pixel_bits = " + pixel_bits +
-               " numComponents = " + numComponents + " color space = " + cs +
-               " transparency = ";
+        String str = "IndexColorModel: #pixel_bits = " + pixel_bits + //$NON-NLS-1$
+               " numComponents = " + numComponents + " color space = " + cs + //$NON-NLS-1$ //$NON-NLS-2$
+               " transparency = "; //$NON-NLS-1$
 
         if (transparency == Transparency.OPAQUE) {
-            str = str + "Transparency.OPAQUE";
+            str = str + "Transparency.OPAQUE"; //$NON-NLS-1$
         } else if (transparency == Transparency.BITMASK) {
-            str = str + "Transparency.BITMASK";
+            str = str + "Transparency.BITMASK"; //$NON-NLS-1$
         } else {
-            str = str + "Transparency.TRANSLUCENT";
+            str = str + "Transparency.TRANSLUCENT"; //$NON-NLS-1$
         }
 
-        str = str + " transIndex = " + transparentIndex + " has alpha = " +
-               hasAlpha + " isAlphaPre = " + isAlphaPremultiplied;
+        str = str + " transIndex = " + transparentIndex + " has alpha = " + //$NON-NLS-1$ //$NON-NLS-2$
+               hasAlpha + " isAlphaPre = " + isAlphaPremultiplied; //$NON-NLS-1$
 
         return str;
     }
@@ -456,8 +458,8 @@
             int ia[] = (int[]) pixel;
             pixIdx = ia[0];
         } else {
-            throw new UnsupportedOperationException("The transferType is " +
-                    "not one of the supported transer types");
+            // awt.219=This transferType is not supported by this color model
+            throw new UnsupportedOperationException(Messages.getString("awt.219")); //$NON-NLS-1$
         }
 
         return getComponents(pixIdx, components, offset);
@@ -476,8 +478,8 @@
             raster = Raster.createInterleavedRaster(DataBuffer.TYPE_USHORT, w,
                     h, 1, null);
         } else {
-            throw new UnsupportedOperationException("The number of bits " +
-                    "in a pixel is greater than 16");
+            // awt.266=The number of bits in a pixel is greater than 16
+            throw new UnsupportedOperationException(Messages.getString("awt.266")); //$NON-NLS-1$
         }
 
         return raster;
@@ -546,8 +548,8 @@
             pixel = sa[0] & 0xffff;
             break;
         default:
-            throw new UnsupportedOperationException("The transferType " +
-                    "is invalid");
+            // awt.267=The transferType is invalid
+            throw new UnsupportedOperationException(Messages.getString("awt.267")); //$NON-NLS-1$
         }
 
         return pixel;
@@ -660,8 +662,8 @@
     private void createColorMap(int size, byte r[], byte g[], byte b[],
             byte a[], int trans) {
         if (size < 1) {
-            throw new IllegalArgumentException("Size of the color map is " +
-                    "less than 1");
+            // awt.264=Size of the color map is less than 1
+            throw new IllegalArgumentException(Messages.getString("awt.264")); //$NON-NLS-1$
         }
 
         mapSize = size;
@@ -748,8 +750,8 @@
                 pixel = sa;
                 break;
             default:
-                throw new UnsupportedOperationException("The transferType " +
-                        "is invalid");
+                // awt.267=The transferType is invalid
+                throw new UnsupportedOperationException(Messages.getString("awt.267")); //$NON-NLS-1$
             }
         } else if (pixel instanceof byte[]
                 && transferType == DataBuffer.TYPE_BYTE) {
@@ -766,8 +768,8 @@
             ia[0] = colorMapIdx;
             pixel = ia;
         } else {
-            throw new ClassCastException("The pixel is not a primitive " +
-                    "array of type transferType");
+            // awt.268=The pixel is not a primitive array of type transferType
+            throw new ClassCastException(Messages.getString("awt.268")); //$NON-NLS-1$
         }
         return pixel;
     }
@@ -793,8 +795,8 @@
     private static int validateTransferType(int transferType) {
         if (transferType != DataBuffer.TYPE_BYTE &&
                transferType != DataBuffer.TYPE_USHORT) {
-            throw new IllegalArgumentException("The transferType is not " +
-                    "one of DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT");
+            // awt.269=The transferType is not one of DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT
+            throw new IllegalArgumentException(Messages.getString("awt.269")); //$NON-NLS-1$
         }
         return transferType;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/Kernel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/Kernel.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/Kernel.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/Kernel.java Fri Nov  3 08:45:01 2006
@@ -23,6 +23,8 @@
 
 package java.awt.image;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class Kernel implements Cloneable {
     private final int xOrigin;
     private final int yOrigin;
@@ -33,8 +35,8 @@
     public Kernel(int width, int height, float[] data) {
         int dataLength = width*height;
         if (data.length < dataLength) {
-            throw new IllegalArgumentException(
-                    "Length of data should not be less than width*height");
+            // awt.22B=Length of data should not be less than width*height
+            throw new IllegalArgumentException(Messages.getString("awt.22B")); //$NON-NLS-1$
         }
 
         this.width = width;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupOp.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupOp.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupOp.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupOp.java Fri Nov  3 08:45:01 2006
@@ -29,6 +29,7 @@
 import java.util.Arrays;
 
 import org.apache.harmony.awt.gl.AwtImageBackdoorAccessor;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 public class LookupOp implements BufferedImageOp, RasterOp {
     private final LookupTable lut;
@@ -131,23 +132,20 @@
         if (dst == null) {
             dst = createCompatibleDestRaster(src);
         } else if (src.getNumBands() != dst.getNumBands()) {
-            throw new IllegalArgumentException(
-                    "Source and destinations rasters do not have " +
-                    "the same number of bands"
-            );
+            // awt.237=Source and destinations rasters do not have the same number of bands
+            throw new IllegalArgumentException(Messages.getString("awt.237")); //$NON-NLS-1$
         }
 
         if (lut.getNumComponents() != 1 && lut.getNumComponents() != src.getNumBands()) {
-            throw new IllegalArgumentException(
-                    "The number of arrays in the LookupTable does not " +
-                    "meet the restrictions"
-            );
+            // awt.238=The number of arrays in the LookupTable does not meet the restrictions
+            throw new IllegalArgumentException(Messages.getString("awt.238")); //$NON-NLS-1$
         }
 
         // TODO
         // if (!canUseIpp || ippFilter(src, dst, BufferedImage.TYPE_CUSTOM, false) != 0)
             if (slowFilter(src, dst, false) != 0) {
-                throw new ImagingOpException ("Unable to transform source");
+                // awt.21F=Unable to transform source
+                throw new ImagingOpException (Messages.getString("awt.21F")); //$NON-NLS-1$
             }
 
         return dst;
@@ -157,9 +155,8 @@
         ColorModel srcCM = src.getColorModel();
 
         if (srcCM instanceof IndexColorModel) {
-            throw new IllegalArgumentException(
-                    "Source should not have IndexColorModel"
-            );
+            // awt.220=Source should not have IndexColorModel
+            throw new IllegalArgumentException(Messages.getString("awt.220")); //$NON-NLS-1$
         }
 
         // Check if the number of scaling factors matches the number of bands
@@ -172,18 +169,14 @@
             } else if (nLUTComponents == nComponents) {
                 skipAlpha = false;
             } else {
-                throw new IllegalArgumentException(
-                        "Number of components in the LUT does not " +
-                        "match the number of bands"
-                );
+                // awt.229=Number of components in the LUT does not match the number of bands
+                throw new IllegalArgumentException(Messages.getString("awt.229")); //$NON-NLS-1$
             }
         } else if (nLUTComponents == 1 || nLUTComponents == nComponents) {
             skipAlpha = false;
         } else {
-            throw new IllegalArgumentException(
-                    "Number of components in the LUT does not " +
-                    "match the number of bands"
-            );
+            // awt.229=Number of components in the LUT does not match the number of bands
+            throw new IllegalArgumentException(Messages.getString("awt.229")); //$NON-NLS-1$
         }
 
         BufferedImage finalDst = null;
@@ -206,7 +199,8 @@
         // TODO
         //if (!canUseIpp || ippFilter(src.getRaster(), dst.getRaster(), src.getType(), skipAlpha) != 0)
             if (slowFilter(src.getRaster(), dst.getRaster(), skipAlpha) != 0) {
-                throw new ImagingOpException ("Unable to transform source");
+                // awt.21F=Unable to transform source
+                throw new ImagingOpException (Messages.getString("awt.21F")); //$NON-NLS-1$
             }
 
         if (finalDst != null) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupTable.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupTable.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupTable.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupTable.java Fri Nov  3 08:45:01 2006
@@ -23,20 +23,20 @@
 
 package java.awt.image;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public abstract class LookupTable {
     private int offset;
     private int numComponents;
 
     protected LookupTable(int offset, int numComponents) {
         if (offset < 0) {
-            throw new IllegalArgumentException(
-                    "Offset should be not less than zero"
-            );
+            // awt.232=Offset should be not less than zero
+            throw new IllegalArgumentException(Messages.getString("awt.232")); //$NON-NLS-1$
         }
         if (numComponents < 1) {
-            throw new IllegalArgumentException(
-                    "Number of components should be positive"
-            );
+            // awt.233=Number of components should be positive
+            throw new IllegalArgumentException(Messages.getString("awt.233")); //$NON-NLS-1$
         }
 
         this.offset = offset;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/MemoryImageSource.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/MemoryImageSource.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/MemoryImageSource.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/MemoryImageSource.java Fri Nov  3 08:45:01 2006
@@ -23,6 +23,8 @@
 import java.util.Hashtable;
 import java.util.Vector;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class MemoryImageSource implements ImageProducer {
 
     int width;
@@ -276,7 +278,8 @@
             con.setPixels(x, y, w, h, cm, iData, pixelOff, scanline);
             break;
         default:
-            throw new IllegalArgumentException("Wrong type of pixels array");
+            // awt.22A=Wrong type of pixels array
+            throw new IllegalArgumentException(Messages.getString("awt.22A")); //$NON-NLS-1$
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/MultiPixelPackedSampleModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/MultiPixelPackedSampleModel.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/MultiPixelPackedSampleModel.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/MultiPixelPackedSampleModel.java Fri Nov  3 08:45:01 2006
@@ -20,6 +20,8 @@
  */
 package java.awt.image;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class MultiPixelPackedSampleModel extends SampleModel {
 
     private int pixelBitStride;
@@ -41,24 +43,26 @@
         if (dataType != DataBuffer.TYPE_BYTE &&
                dataType != DataBuffer.TYPE_USHORT &&
                dataType != DataBuffer.TYPE_INT) {
-            throw new IllegalArgumentException("Unsupported data type:"
-                    + dataType);
+            // awt.61=Unsupported data type: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.61", //$NON-NLS-1$
+                    dataType));
         }
 
         this.scanlineStride = scanlineStride;
         if(numberOfBits == 0) {
-            throw new RasterFormatException("Number of Bits equals to zero");
+            // awt.20C=Number of Bits equals to zero
+            throw new RasterFormatException(Messages.getString("awt.20C")); //$NON-NLS-1$
         }
         this.pixelBitStride = numberOfBits;
         this.dataElementSize = DataBuffer.getDataTypeSize(dataType);
         if(dataElementSize % pixelBitStride != 0) {
-            throw new RasterFormatException("The number of bits per pixel " +
-                    "is not a power of 2 or pixels span data element boundaries");
+            // awt.20D=The number of bits per pixel is not a power of 2 or pixels span data element boundaries
+            throw new RasterFormatException(Messages.getString("awt.20D")); //$NON-NLS-1$
         }
 
         if(dataBitOffset % numberOfBits != 0) {
-            throw new RasterFormatException("Data Bit offset is not a multiple " +
-                    "of pixel bit stride");
+            // awt.20E=Data Bit offset is not a multiple of pixel bit stride
+            throw new RasterFormatException(Messages.getString("awt.20E")); //$NON-NLS-1$
         }
         this.dataBitOffset = dataBitOffset;
 
@@ -77,8 +81,8 @@
     @Override
     public Object getDataElements(int x, int y, Object obj, DataBuffer data) {
         if (x < 0 || y < 0 || x >= this.width || y >= this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
         switch (getTransferType()) {
         case DataBuffer.TYPE_BYTE:
@@ -119,8 +123,8 @@
     @Override
     public void setDataElements(int x, int y, Object obj, DataBuffer data) {
         if (x < 0 || y < 0 || x >= this.width || y >= this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
         switch (getTransferType()) {
         case DataBuffer.TYPE_BYTE:
@@ -157,7 +161,8 @@
     @Override
     public SampleModel createSubsetSampleModel(int bands[]) {
         if (bands != null && bands.length != 1) {
-            throw new RasterFormatException("Number of bands must be only 1");
+            // awt.20F=Number of bands must be only 1
+            throw new RasterFormatException(Messages.getString("awt.20F")); //$NON-NLS-1$
         }
         return createCompatibleSampleModel(width, height);
     }
@@ -170,8 +175,8 @@
     @Override
     public int[] getPixel(int x, int y, int iArray[], DataBuffer data) {
         if (x < 0 || y < 0 || x >= this.width || y >= this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
         int pixel[];
         if (iArray == null) {
@@ -187,8 +192,8 @@
     @Override
     public void setPixel(int x, int y, int iArray[], DataBuffer data) {
         if (x < 0 || y < 0 || x >= this.width || y >= this.height) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are " +
-                    "not in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
         setSample(x, y, 0, iArray[0], data);
     }
@@ -196,8 +201,8 @@
     @Override
     public int getSample(int x, int y, int b, DataBuffer data) {
         if (x < 0 || y < 0 || x >= this.width || y >= this.height || b != 0) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are not " +
-                    "in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
 
         int bitnum = dataBitOffset + x * pixelBitStride;
@@ -211,8 +216,8 @@
     @Override
     public void setSample(int x, int y, int b, int s, DataBuffer data) {
         if (x < 0 || y < 0 || x >= this.width || y >= this.height || b != 0) {
-            throw new ArrayIndexOutOfBoundsException("Coordinates are not " +
-                    "in bounds");
+            // awt.63=Coordinates are not in bounds
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$
         }
 
         int bitnum = dataBitOffset + x * pixelBitStride;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/PackedColorModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/PackedColorModel.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/PackedColorModel.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/PackedColorModel.java Fri Nov  3 08:45:01 2006
@@ -24,6 +24,8 @@
 import java.awt.color.ColorSpace;
 import java.util.Arrays;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public abstract class PackedColorModel extends ColorModel {
 
     int componentMasks[];
@@ -41,8 +43,8 @@
                 validateTransferType(transferType));
 
         if (pixel_bits < 1 || pixel_bits > 32) {
-            throw new IllegalArgumentException("The bits is less than 1 or " +
-                    "greater than 32");
+            // awt.236=The bits is less than 1 or greater than 32
+            throw new IllegalArgumentException(Messages.getString("awt.236")); //$NON-NLS-1$
         }
 
         componentMasks = new int[numComponents];
@@ -69,19 +71,19 @@
                 validateTransferType(transferType));
 
         if (pixel_bits < 1 || pixel_bits > 32) {
-            throw new IllegalArgumentException("The bits is less than 1 or " +
-                    "greater than 32");
+            // awt.236=The bits is less than 1 or greater than 32
+            throw new IllegalArgumentException(Messages.getString("awt.236")); //$NON-NLS-1$
         }
 
         if (cs.getType() != ColorSpace.TYPE_RGB) {
-            throw new IllegalArgumentException("The space is not a TYPE_RGB " +
-                    "space");
+            // awt.239=The space is not a TYPE_RGB space
+            throw new IllegalArgumentException(Messages.getString("awt.239")); //$NON-NLS-1$
         }
 
         for (int i = 0; i < numColorComponents; i++) {
             if (cs.getMinValue(i) != 0.0f || cs.getMaxValue(i) != 1.0f) {
-                throw new IllegalArgumentException("The min/max normalized " +
-                        "component values are not 0.0/1.0");
+                // awt.23A=The min/max normalized component values are not 0.0/1.0
+                throw new IllegalArgumentException(Messages.getString("awt.23A")); //$NON-NLS-1$
             }
         }
         componentMasks = new int[numComponents];
@@ -179,8 +181,8 @@
         for (; i < colorMaskArray.length; i++) {
             bits[i] = countCompBits(colorMaskArray[i]);
             if (bits[i] < 0) {
-                throw new IllegalArgumentException("The mask of the " + i
-                        + " component is not contiguous");
+                // awt.23B=The mask of the {0} component is not contiguous
+                throw new IllegalArgumentException(Messages.getString("awt.23B", i)); //$NON-NLS-1$
             }
         }
 
@@ -188,8 +190,8 @@
             bits[i] = countCompBits(alphaMask);
 
             if (bits[i] < 0) {
-                throw new IllegalArgumentException("The mask of the alpha " +
-                        "component is not contiguous");
+                // awt.23C=The mask of the alpha component is not contiguous
+                throw new IllegalArgumentException(Messages.getString("awt.23C")); //$NON-NLS-1$
             }
         }
 
@@ -209,27 +211,27 @@
 
         bits[0] = countCompBits(rmask);
         if (bits[0] < 0) {
-            throw new IllegalArgumentException("The mask of the red " +
-                    "component is not contiguous");
+            // awt.23D=The mask of the red component is not contiguous
+            throw new IllegalArgumentException(Messages.getString("awt.23D")); //$NON-NLS-1$
         }
 
         bits[1] = countCompBits(gmask);
         if (bits[1] < 0) {
-            throw new IllegalArgumentException("The mask of the green " +
-                    "component is not contiguous");
+            // awt.23E=The mask of the green component is not contiguous
+            throw new IllegalArgumentException(Messages.getString("awt.23E")); //$NON-NLS-1$
         }
 
         bits[2] = countCompBits(bmask);
         if (bits[2] < 0) {
-            throw new IllegalArgumentException("The mask of the blue " +
-                    "component is not contiguous");
+            // awt.23F=The mask of the blue component is not contiguous
+            throw new IllegalArgumentException(Messages.getString("awt.23F")); //$NON-NLS-1$
         }
 
         if (amask != 0) {
             bits[3] = countCompBits(amask);
             if (bits[3] < 0) {
-                throw new IllegalArgumentException("The mask of the alpha " +
-                        "component is not contiguous");
+                // awt.23C=The mask of the alpha component is not contiguous
+                throw new IllegalArgumentException(Messages.getString("awt.23C")); //$NON-NLS-1$
             }
         }
 
@@ -261,9 +263,9 @@
         if (transferType != DataBuffer.TYPE_BYTE &&
                 transferType != DataBuffer.TYPE_USHORT &&
                 transferType != DataBuffer.TYPE_INT) {
-            throw new IllegalArgumentException("The transferType is not " +
-                    "one of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT " +
-                    "or DataBuffer.TYPE_INT");
+            // awt.240=The transferType not is one of DataBuffer.TYPE_BYTE,
+            //          DataBuffer.TYPE_USHORT or DataBuffer.TYPE_INT
+            throw new IllegalArgumentException(Messages.getString("awt.240")); //$NON-NLS-1$
         }
         return transferType;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/PixelGrabber.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/PixelGrabber.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/PixelGrabber.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/PixelGrabber.java Fri Nov  3 08:45:01 2006
@@ -23,6 +23,8 @@
 import java.awt.Image;
 import java.util.Hashtable;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class PixelGrabber implements ImageConsumer {
 
     int width;
@@ -306,8 +308,8 @@
             grabberStatus |= ImageObserver.ALLBITS;
             break;
         default:
-            throw new IllegalArgumentException("Incorrect ImageConsumer "
-                    + "completion status");
+            // awt.26A=Incorrect ImageConsumer completion status
+            throw new IllegalArgumentException(Messages.getString("awt.26A")); //$NON-NLS-1$
         }
         isGrabbing = false;
         producer.removeConsumer(this);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/PixelInterleavedSampleModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/PixelInterleavedSampleModel.java?view=diff&rev=470895&r1=470894&r2=470895
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/PixelInterleavedSampleModel.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/PixelInterleavedSampleModel.java Fri Nov  3 08:45:01 2006
@@ -20,6 +20,8 @@
  */
 package java.awt.image;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class PixelInterleavedSampleModel extends ComponentSampleModel {
 
     public PixelInterleavedSampleModel(int dataType, int w, int h,
@@ -41,18 +43,18 @@
         maxOffset -= minOffset;
 
         if (maxOffset > scanlineStride) {
-            throw new IllegalArgumentException("Any offset between bands " +
-                    "is greater than the Scanline stride");
+            // awt.241=Any offset between bands is greater than the Scanline stride
+            throw new IllegalArgumentException(Messages.getString("awt.241")); //$NON-NLS-1$
         }
 
         if (maxOffset > pixelStride) {
-            throw new IllegalArgumentException("Pixel stride is less than " +
-                    "any offset between bands");
+            // awt.242=Pixel stride is less than any offset between bands
+            throw new IllegalArgumentException(Messages.getString("awt.242")); //$NON-NLS-1$
         }
 
         if (pixelStride * w > scanlineStride) {
-            throw new IllegalArgumentException("Product of Pixel stride and " +
-                    "w is greater than Scanline stride ");
+            // awt.243=Product of Pixel stride and w is greater than Scanline stride
+            throw new IllegalArgumentException(Messages.getString("awt.243")); //$NON-NLS-1$
         }
 
     }



Mime
View raw message