You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2006/11/02 17:15:36 UTC

svn commit: r470404 [1/2] - in /incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common: java/awt/color/ java/awt/datatransfer/ java/awt/dnd/ java/awt/event/ java/awt/font/ org/apache/harmony/awt/internal/nls/

Author: hindessm
Date: Thu Nov  2 08:15:32 2006
New Revision: 470404

URL: http://svn.apache.org/viewvc?view=rev&rev=470404
Log:
Applied patch 4.1 from "[#HARMONY-1313] [classlib][internationalization]
Internationalization of the awt module".

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ColorSpace.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ColorSpace.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_Profile.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ProfileRGB.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ProfileStub.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/DataFlavor.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/MimeTypeProcessor.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/SystemFlavorMap.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/UnsupportedFlavorException.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragGestureEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragGestureRecognizer.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSource.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSourceContext.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSourceEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTarget.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTargetContext.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTargetEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AWTEventListenerProxy.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ActionEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AdjustmentEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ComponentEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ContainerEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/FocusEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/HierarchyEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputMethodEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InvocationEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ItemEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/KeyEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/MouseEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/MouseWheelEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/PaintEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/TextEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/WindowEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/font/GlyphJustificationInfo.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/font/GraphicAttribute.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/font/LineBreakMeasurer.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/font/NumericShaper.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/font/TextAttribute.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/font/TextHitInfo.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/font/TextLayout.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/font/TransformAttribute.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/internal/nls/messages.properties

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ColorSpace.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ColorSpace.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ColorSpace.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ColorSpace.java Thu Nov  2 08:15:32 2006
@@ -23,6 +23,7 @@
 import java.io.Serializable;
 
 import org.apache.harmony.awt.gl.color.LUTColorConverter;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 
 public abstract class ColorSpace implements Serializable {
@@ -105,11 +106,11 @@
 
     public String getName(int idx) {
         if (idx < 0 || idx > numComponents - 1) {
-            throw new IllegalArgumentException(
-                        "Invalid component index: " + idx);
+            // awt.16A=Invalid component index: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.16A", idx)); //$NON-NLS-1$
         }
 
-      return "Unnamed color component #" + idx;
+      return "Unnamed color component #" + idx; //$NON-NLS-1$
     }
 
     public abstract float[] toRGB(float[] colorvalue);
@@ -122,16 +123,16 @@
 
     public float getMinValue(int component) {
         if (component < 0 || component > numComponents - 1) {
-            throw new IllegalArgumentException(
-                    "Invalid component index: " + component);
+            // awt.16A=Invalid component index: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.16A", component)); //$NON-NLS-1$
         }
         return 0;
     }
 
     public float getMaxValue(int component) {
         if (component < 0 || component > numComponents - 1) {
-            throw new IllegalArgumentException(
-                    "Invalid component index: " + component);
+            // awt.16A=Invalid component index: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.16A", component)); //$NON-NLS-1$
         }
         return 1;
     }
@@ -194,6 +195,7 @@
         }
 
         // Unknown argument passed
-        throw new IllegalArgumentException("Not a predefined colorspace");
+        // awt.16B=Not a predefined colorspace
+        throw new IllegalArgumentException(Messages.getString("awt.16B")); //$NON-NLS-1$
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ColorSpace.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ColorSpace.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ColorSpace.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ColorSpace.java Thu Nov  2 08:15:32 2006
@@ -24,6 +24,7 @@
 import org.apache.harmony.awt.gl.color.ColorConverter;
 import org.apache.harmony.awt.gl.color.ColorScaler;
 import org.apache.harmony.awt.gl.color.ICC_Transform;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 import java.io.*;
 
@@ -33,12 +34,12 @@
     // Need to keep compatibility with serialized form
     private static final ObjectStreamField[]
       serialPersistentFields = {
-        new ObjectStreamField("thisProfile", ICC_Profile.class),
-        new ObjectStreamField("minVal", float[].class),
-        new ObjectStreamField("maxVal", float[].class),
-        new ObjectStreamField("diffMinMax", float[].class),
-        new ObjectStreamField("invDiffMinMax", float[].class),
-        new ObjectStreamField("needScaleInit", Boolean.TYPE)
+        new ObjectStreamField("thisProfile", ICC_Profile.class), //$NON-NLS-1$
+        new ObjectStreamField("minVal", float[].class), //$NON-NLS-1$
+        new ObjectStreamField("maxVal", float[].class), //$NON-NLS-1$
+        new ObjectStreamField("diffMinMax", float[].class), //$NON-NLS-1$
+        new ObjectStreamField("invDiffMinMax", float[].class), //$NON-NLS-1$
+        new ObjectStreamField("needScaleInit", Boolean.TYPE) //$NON-NLS-1$
     };
 
 
@@ -82,7 +83,8 @@
             case ICC_Profile.CLASS_INPUT:
                 break; // OK, it is color conversion profile
             default:
-                throw new IllegalArgumentException("Invalid profile class.");
+                // awt.168=Invalid profile class.
+                throw new IllegalArgumentException(Messages.getString("awt.168")); //$NON-NLS-1$
         }
 
         profile = pf;
@@ -234,7 +236,8 @@
     @Override
     public float getMinValue(int component) {
         if ((component < 0) || (component > this.getNumComponents() - 1)) {
-            throw new IllegalArgumentException("Component index out of range");
+            // awt.169=Component index out of range
+            throw new IllegalArgumentException(Messages.getString("awt.169")); //$NON-NLS-1$
         }
 
         return minValues[component];
@@ -243,7 +246,8 @@
     @Override
     public float getMaxValue(int component) {
         if ((component < 0) || (component > this.getNumComponents() - 1)) {
-            throw new IllegalArgumentException("Component index out of range");
+            // awt.169=Component index out of range
+            throw new IllegalArgumentException(Messages.getString("awt.169")); //$NON-NLS-1$
         }
 
         return maxValues[component];
@@ -281,12 +285,12 @@
     private void writeObject(ObjectOutputStream out) throws IOException {
         ObjectOutputStream.PutField fields = out.putFields();
 
-        fields.put("thisProfile", profile);
-        fields.put("minVal", null);
-        fields.put("maxVal", null);
-        fields.put("diffMinMax", null);
-        fields.put("invDiffMinMax", null);
-        fields.put("needScaleInit", true);
+        fields.put("thisProfile", profile); //$NON-NLS-1$
+        fields.put("minVal", null); //$NON-NLS-1$
+        fields.put("maxVal", null); //$NON-NLS-1$
+        fields.put("diffMinMax", null); //$NON-NLS-1$
+        fields.put("invDiffMinMax", null); //$NON-NLS-1$
+        fields.put("needScaleInit", true); //$NON-NLS-1$
 
         out.writeFields();
     }
@@ -294,7 +298,7 @@
     private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
         ObjectInputStream.GetField fields = in.readFields();
         resolvedDeserializedInst =
-                new ICC_ColorSpace((ICC_Profile) fields.get("thisProfile", null));
+                new ICC_ColorSpace((ICC_Profile) fields.get("thisProfile", null)); //$NON-NLS-1$
     }
 
     Object readResolve() throws ObjectStreamException {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_Profile.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_Profile.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_Profile.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_Profile.java Thu Nov  2 08:15:32 2006
@@ -37,6 +37,7 @@
 
 import org.apache.harmony.awt.gl.color.ICC_ProfileHelper;
 import org.apache.harmony.awt.gl.color.NativeCMM;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 
 public class ICC_Profile implements Serializable {
@@ -372,15 +373,15 @@
         byte[] data = (byte[])s.readObject();
 
         if (colorSpaceStr != null) {
-            if (colorSpaceStr.equals("CS_sRGB")) {
+            if (colorSpaceStr.equals("CS_sRGB")) { //$NON-NLS-1$
                 openedProfileObject = getInstance(ColorSpace.CS_sRGB);
-            } else if (colorSpaceStr.equals("CS_GRAY")) {
+            } else if (colorSpaceStr.equals("CS_GRAY")) { //$NON-NLS-1$
                 openedProfileObject = getInstance(ColorSpace.CS_GRAY);
-            } else if (colorSpaceStr.equals("CS_LINEAR_RGB")) {
+            } else if (colorSpaceStr.equals("CS_LINEAR_RGB")) { //$NON-NLS-1$
                 openedProfileObject = getInstance(ColorSpace.CS_LINEAR_RGB);
-            } else if (colorSpaceStr.equals("CS_CIEXYZ")) {
+            } else if (colorSpaceStr.equals("CS_CIEXYZ")) { //$NON-NLS-1$
                 openedProfileObject = getInstance(ColorSpace.CS_CIEXYZ);
-            } else if (colorSpaceStr.equals("CS_PYCC")) {
+            } else if (colorSpaceStr.equals("CS_PYCC")) { //$NON-NLS-1$
                 openedProfileObject = getInstance(ColorSpace.CS_PYCC);
             } else {
                 openedProfileObject = ICC_Profile.getInstance(data);
@@ -464,9 +465,9 @@
         }
 
         // Not an ICC profile class
-        throw new IllegalArgumentException(
-                "Profile class does not comply with ICC specification"
-        );
+        // awt.15F=Profile class does not comply with ICC specification
+        throw new IllegalArgumentException(Messages.getString("awt.15F")); //$NON-NLS-1$
+        
     }
 
     public int getPCSType() {
@@ -522,8 +523,8 @@
             default:
         }
 
-        throw new ProfileDataException(
-                "Color space doesn't comply with ICC specification"
+        // awt.160=Color space doesn't comply with ICC specification
+        throw new ProfileDataException(Messages.getString("awt.160") //$NON-NLS-1$
         );
     }
 
@@ -585,23 +586,23 @@
                         } catch (FileNotFoundException e) {}
 
                         // Check java.iccprofile.path entries
-                        fiStream = tryPath(System.getProperty("java.iccprofile.path"), fName);
+                        fiStream = tryPath(System.getProperty("java.iccprofile.path"), fName); //$NON-NLS-1$
                         if (fiStream != null) {
                             return fiStream;
                         }
 
                         // Check java.class.path entries
-                        fiStream = tryPath(System.getProperty("java.class.path"), fName);
+                        fiStream = tryPath(System.getProperty("java.class.path"), fName); //$NON-NLS-1$
                         if (fiStream != null) {
                             return fiStream;
                         }
 
                         // Check directory with java sample profiles
-                        String home = System.getProperty("java.home");
+                        String home = System.getProperty("java.home"); //$NON-NLS-1$
                         if (home != null) {
                             fiStream = tryPath(
                                     home + File.separatorChar +
-                                    "lib" + File.separatorChar + "cmm", fName
+                                    "lib" + File.separatorChar + "cmm", fName //$NON-NLS-1$ //$NON-NLS-2$
                             );
                         }
 
@@ -610,7 +611,8 @@
                 });
 
         if (fiStream == null) {
-            throw new IOException("Unable to open file " + fileName);
+            // awt.161=Unable to open file {0}
+            throw new IOException(Messages.getString("awt.161", fileName)); //$NON-NLS-1$
         }
 
         ICC_Profile pf = getInstance(fiStream);
@@ -620,7 +622,8 @@
 
     public static ICC_Profile getInstance(InputStream s) throws IOException {
         byte[] header = new byte[headerSize];
-        String invalidDataMessage = "Invalid ICC Profile Data";
+        // awt.162=Invalid ICC Profile Data
+        String invalidDataMessage = Messages.getString("awt.162"); //$NON-NLS-1$
 
         // Get header from the input stream
         if (s.read(header) != headerSize) {
@@ -659,10 +662,11 @@
         try {
             res = new ICC_Profile(data);
         } catch (CMMException e) {
-            throw new IllegalArgumentException("Invalid ICC Profile data");
+            // awt.162=Invalid ICC Profile Data
+            throw new IllegalArgumentException(Messages.getString("awt.162")); //$NON-NLS-1$
         }
 
-      if (System.getProperty("os.name").toLowerCase().indexOf("windows") >= 0) {
+      if (System.getProperty("os.name").toLowerCase().indexOf("windows") >= 0) { //$NON-NLS-1$ //$NON-NLS-2$
         try {
             if ( res.getColorSpaceType () == ColorSpace.TYPE_RGB &&
                  res.getDataSize(icSigMediaWhitePointTag) > 0 &&
@@ -693,40 +697,42 @@
 
       case ColorSpace.CS_sRGB:
         if (sRGBProfile == null) {
-            sRGBProfile = getInstance("sRGB.pf");
+            sRGBProfile = getInstance("sRGB.pf"); //$NON-NLS-1$
         }
         return sRGBProfile;
 
       case ColorSpace.CS_CIEXYZ:
         if (xyzProfile == null) {
-            xyzProfile = getInstance("CIEXYZ.pf");
+            xyzProfile = getInstance("CIEXYZ.pf"); //$NON-NLS-1$
         }
         return xyzProfile;
 
       case ColorSpace.CS_GRAY:
         if (grayProfile == null) {
-            grayProfile = getInstance("GRAY.pf");
+            grayProfile = getInstance("GRAY.pf"); //$NON-NLS-1$
         }
         return grayProfile;
 
       case ColorSpace.CS_PYCC:
         if (pyccProfile == null) {
-            pyccProfile = getInstance("PYCC.pf");
+            pyccProfile = getInstance("PYCC.pf"); //$NON-NLS-1$
         }
         return pyccProfile;
 
       case ColorSpace.CS_LINEAR_RGB:
         if (linearRGBProfile == null) {
-            linearRGBProfile = getInstance("LINEAR_RGB.pf");
+            linearRGBProfile = getInstance("LINEAR_RGB.pf"); //$NON-NLS-1$
         }
         return linearRGBProfile;
       }
 
     } catch (IOException e) {
-      throw new IllegalArgumentException("Can't open color profile");
+        // awt.163=Can't open color profile 
+        throw new IllegalArgumentException(Messages.getString("awt.163")); //$NON-NLS-1$
     }
 
-    throw new IllegalArgumentException("Not a predefined color space");
+    // awt.164=Not a predefined color space
+    throw new IllegalArgumentException(Messages.getString("awt.164")); //$NON-NLS-1$
   }
 
     /**
@@ -819,9 +825,8 @@
             default:
         }
 
-        throw new IllegalArgumentException (
-                "Color space doesn't comply with ICC specification"
-        );
+        // awt.165=Color space doesn't comply with ICC specification
+        throw new IllegalArgumentException (Messages.getString("awt.165")); //$NON-NLS-1$
     }
 
     private long getProfileHandle() {
@@ -899,7 +904,8 @@
         if (dataTRC == null) {
             return gamma;
         }
-        throw new ProfileDataException("TRC is not a simple gamma value.");
+        // awt.166=TRC is not a simple gamma value.
+        throw new ProfileDataException(Messages.getString("awt.166")); //$NON-NLS-1$
     }
 
     short[] getTRC(int tagSignature) {
@@ -907,7 +913,8 @@
         getGammaOrTRC(tagSignature, dataTRC);
 
         if (dataTRC == null) {
-            throw new ProfileDataException("TRC is a gamma value, not a table.");
+            // awt.167=TRC is a gamma value, not a table.
+            throw new ProfileDataException(Messages.getString("awt.167")); //$NON-NLS-1$
         }
         return dataTRC;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ProfileRGB.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ProfileRGB.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ProfileRGB.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ProfileRGB.java Thu Nov  2 08:15:32 2006
@@ -20,6 +20,8 @@
  */
 package java.awt.color;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class ICC_ProfileRGB extends ICC_Profile {
     private static final long serialVersionUID = 8505067385152579334L;
 
@@ -33,9 +35,9 @@
 
     public static final int BLUECOMPONENT = 2;
 
-    private static final String UNKNOWN_COMPONENT_MSG =
-        "Unknown component. Must be REDCOMPONENT, " +
-        "GREENCOMPONENT or BLUECOMPONENT.";
+    // awt.15E=Unknown component. Must be REDCOMPONENT, GREENCOMPONENT or BLUECOMPONENT.
+    private static final String UNKNOWN_COMPONENT_MSG = Messages
+            .getString("awt.15E"); //$NON-NLS-1$
 
     @Override
     public short[] getTRC(int component) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ProfileStub.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ProfileStub.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ProfileStub.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ProfileStub.java Thu Nov  2 08:15:32 2006
@@ -26,6 +26,8 @@
 import java.io.ObjectStreamException;
 import java.io.OutputStream;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 final class ICC_ProfileStub extends ICC_Profile {
     private static final long serialVersionUID = 501389760875253507L;
 
@@ -40,14 +42,15 @@
             case ColorSpace.CS_GRAY:
                 break;
             default:
-                throw new IllegalArgumentException("Invalid colorspace");
+                // awt.15D=Invalid colorspace
+                throw new IllegalArgumentException(Messages.getString("awt.15D")); //$NON-NLS-1$
         }
         colorspace = csSpecifier;
     }
 
     @Override
     public void write(String fileName) throws IOException {
-        throw new UnsupportedOperationException("Stub cannot perform this operation");
+        throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
     }
 
     /**
@@ -61,22 +64,22 @@
 
     @Override
     public void write(OutputStream s) throws IOException {
-        throw new UnsupportedOperationException("Stub cannot perform this operation");
+        throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
     }
 
     @Override
     public void setData(int tagSignature, byte[] tagData) {
-        throw new UnsupportedOperationException("Stub cannot perform this operation");
+        throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
     }
 
     @Override
     public byte[] getData(int tagSignature) {
-        throw new UnsupportedOperationException("Stub cannot perform this operation");
+        throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
     }
 
     @Override
     public byte[] getData() {
-        throw new UnsupportedOperationException("Stub cannot perform this operation");
+        throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
     }
 
     @Override
@@ -90,7 +93,7 @@
 
     @Override
     public int getPCSType() {
-        throw new UnsupportedOperationException("Stub cannot perform this operation");
+        throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
     }
 
     @Override
@@ -104,18 +107,18 @@
             case ColorSpace.CS_GRAY:
                 return 1;
             default:
-                throw new UnsupportedOperationException("Stub cannot perform this operation");
+                throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
         }
     }
 
     @Override
     public int getMinorVersion() {
-        throw new UnsupportedOperationException("Stub cannot perform this operation");
+        throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
     }
 
     @Override
     public int getMajorVersion() {
-        throw new UnsupportedOperationException("Stub cannot perform this operation");
+        throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
     }
 
     @Override
@@ -131,24 +134,24 @@
             case ColorSpace.CS_GRAY:
                 return ColorSpace.TYPE_GRAY;
             default:
-                throw new UnsupportedOperationException("Stub cannot perform this operation");
+                throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
         }
     }
 
     public static ICC_Profile getInstance(String fileName) throws IOException {
-        throw new UnsupportedOperationException("Stub cannot perform this operation");
+        throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
     }
 
     public static ICC_Profile getInstance(InputStream s) throws IOException {
-        throw new UnsupportedOperationException("Stub cannot perform this operation");
+        throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
     }
 
     public static ICC_Profile getInstance(byte[] data) {
-        throw new UnsupportedOperationException("Stub cannot perform this operation");
+        throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
     }
 
     public static ICC_Profile getInstance(int cspace) {
-        throw new UnsupportedOperationException("Stub cannot perform this operation");
+        throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
     }
 
     public ICC_Profile loadProfile() {
@@ -164,7 +167,7 @@
             case ColorSpace.CS_PYCC:
                 return ICC_Profile.getInstance(ColorSpace.CS_PYCC);
             default:
-                throw new UnsupportedOperationException("Stub cannot perform this operation");
+                throw new UnsupportedOperationException("Stub cannot perform this operation"); //$NON-NLS-1$
         }
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/DataFlavor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/DataFlavor.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/DataFlavor.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/DataFlavor.java Thu Nov  2 08:15:32 2006
@@ -26,6 +26,7 @@
 import java.util.*;
 
 import org.apache.harmony.awt.datatransfer.*;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 
 public class DataFlavor implements Externalizable, Cloneable {
@@ -37,47 +38,47 @@
      */
     @Deprecated
     public static final DataFlavor plainTextFlavor =
-            new DataFlavor("text/plain; charset=unicode; class=java.io.InputStream",
-                    "Plain Text");
+            new DataFlavor("text/plain; charset=unicode; class=java.io.InputStream", //$NON-NLS-1$
+                    "Plain Text"); //$NON-NLS-1$
 
     public static final DataFlavor stringFlavor =
-            new DataFlavor("application/x-java-serialized-object; class=java.lang.String",
-                    "Unicode String");
+            new DataFlavor("application/x-java-serialized-object; class=java.lang.String", //$NON-NLS-1$
+                    "Unicode String"); //$NON-NLS-1$
 
     public static final DataFlavor imageFlavor =
-            new DataFlavor("image/x-java-image; class=java.awt.Image",
-                    "Image");
+            new DataFlavor("image/x-java-image; class=java.awt.Image", //$NON-NLS-1$
+                    "Image"); //$NON-NLS-1$
 
     public static final DataFlavor javaFileListFlavor =
-            new DataFlavor("application/x-java-file-list; class=java.util.List",
-                    "application/x-java-file-list");
+            new DataFlavor("application/x-java-file-list; class=java.util.List", //$NON-NLS-1$
+                    "application/x-java-file-list"); //$NON-NLS-1$
 
     public static final String javaJVMLocalObjectMimeType =
-            "application/x-java-jvm-local-objectref";
+            "application/x-java-jvm-local-objectref"; //$NON-NLS-1$
 
     public static final String javaRemoteObjectMimeType =
-            "application/x-java-remote-object";
+            "application/x-java-remote-object"; //$NON-NLS-1$
 
     public static final String javaSerializedObjectMimeType =
-            "application/x-java-serialized-object";
+            "application/x-java-serialized-object"; //$NON-NLS-1$
 
     private static final String sortedTextFlavors[] = {
-            "text/sgml",
-            "text/xml",
-            "text/html",
-            "text/rtf",
-            "text/enriched",
-            "text/richtext",
-            "text/uri-list",
-            "text/tab-separated-values",
-            "text/t140" ,
-            "text/rfc822-headers",
-            "text/parityfec",
-            "text/directory",
-            "text/css",
-            "text/calendar",
-            "application/x-java-serialized-object",
-            "text/plain"
+            "text/sgml", //$NON-NLS-1$
+            "text/xml", //$NON-NLS-1$
+            "text/html", //$NON-NLS-1$
+            "text/rtf", //$NON-NLS-1$
+            "text/enriched", //$NON-NLS-1$
+            "text/richtext", //$NON-NLS-1$
+            "text/uri-list", //$NON-NLS-1$
+            "text/tab-separated-values", //$NON-NLS-1$
+            "text/t140" , //$NON-NLS-1$
+            "text/rfc822-headers", //$NON-NLS-1$
+            "text/parityfec", //$NON-NLS-1$
+            "text/directory", //$NON-NLS-1$
+            "text/css", //$NON-NLS-1$
+            "text/calendar", //$NON-NLS-1$
+            "application/x-java-serialized-object", //$NON-NLS-1$
+            "text/plain" //$NON-NLS-1$
     };
 
     private static DataFlavor plainUnicodeFlavor = null;
@@ -88,10 +89,10 @@
 
     public static final DataFlavor getTextPlainUnicodeFlavor() {
         if (plainUnicodeFlavor == null) {
-            plainUnicodeFlavor = new DataFlavor("text/plain"
-                    + "; charset=" + DTK.getDTK().getDefaultCharset()
-                    + "; class=java.io.InputStream",
-                    "Plain Text");
+            plainUnicodeFlavor = new DataFlavor("text/plain" //$NON-NLS-1$
+                    + "; charset=" + DTK.getDTK().getDefaultCharset() //$NON-NLS-1$
+                    + "; class=java.io.InputStream", //$NON-NLS-1$
+                    "Plain Text"); //$NON-NLS-1$
         }
 
         return plainUnicodeFlavor;
@@ -135,15 +136,15 @@
     }
 
     public DataFlavor(Class<?> representationClass, String humanPresentableName) {
-        mimeInfo = new MimeTypeProcessor.MimeType("application", "x-java-serialized-object");
+        mimeInfo = new MimeTypeProcessor.MimeType("application", "x-java-serialized-object"); //$NON-NLS-1$ //$NON-NLS-2$
 
         if (humanPresentableName != null) {
             this.humanPresentableName = humanPresentableName;
         } else {
-            this.humanPresentableName = "application/x-java-serialized-object";
+            this.humanPresentableName = "application/x-java-serialized-object"; //$NON-NLS-1$
         }
 
-        mimeInfo.addParameter("class", representationClass.getName());
+        mimeInfo.addParameter("class", representationClass.getName()); //$NON-NLS-1$
         this.representationClass = representationClass;
     }
 
@@ -151,7 +152,8 @@
         try {
             init(mimeType, humanPresentableName, null);
         } catch (ClassNotFoundException e) {
-            throw new IllegalArgumentException("Can't load class: " + mimeInfo.getParameter("class"));
+            // awt.16C=Can't load class: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.16C", mimeInfo.getParameter("class")));  //$NON-NLS-1$//$NON-NLS-2$
         }
     }
 
@@ -173,7 +175,8 @@
         try {
             mimeInfo = MimeTypeProcessor.parse(mimeType);
         } catch (IllegalArgumentException e) {
-            throw new IllegalArgumentException("Can't parse MIME type: " + mimeType);
+            // awt.16D=Can't parse MIME type: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.16D", mimeType)); //$NON-NLS-1$
         }
 
         if (humanPresentableName != null) {
@@ -182,10 +185,10 @@
             this.humanPresentableName = mimeInfo.getPrimaryType() + '/' + mimeInfo.getSubType();
         }
 
-        className = mimeInfo.getParameter("class");
+        className = mimeInfo.getParameter("class"); //$NON-NLS-1$
         if (className == null) {
-            className = "java.io.InputStream";
-            mimeInfo.addParameter("class", className);
+            className = "java.io.InputStream"; //$NON-NLS-1$
+            mimeInfo.addParameter("class", className); //$NON-NLS-1$
         }
         representationClass = (classLoader == null) ?
                 Class.forName(className) :
@@ -194,15 +197,15 @@
 
     private String getCharset() {
         if (isCharsetRedundant()) {
-            return "";
+            return ""; //$NON-NLS-1$
         }
-        String charset = mimeInfo.getParameter("charset");
+        String charset = mimeInfo.getParameter("charset"); //$NON-NLS-1$
 
         if (isCharsetRequired() && ((charset == null) || (charset.length() == 0))) {
             return DTK.getDTK().getDefaultCharset();
         }
         if (charset == null) {
-            return "";
+            return ""; //$NON-NLS-1$
         }
 
         return charset;
@@ -211,27 +214,27 @@
     private boolean isCharsetRequired() {
         String type = mimeInfo.getFullType();
 
-        return (type.equals("text/sgml") ||
-                type.equals("text/xml") ||
-                type.equals("text/html") ||
-                type.equals("text/enriched") ||
-                type.equals("text/richtext") ||
-                type.equals("text/uri-list") ||
-                type.equals("text/directory") ||
-                type.equals("text/css") ||
-                type.equals("text/calendar") ||
-                type.equals("application/x-java-serialized-object") ||
-                type.equals("text/plain"));
+        return (type.equals("text/sgml") || //$NON-NLS-1$
+                type.equals("text/xml") || //$NON-NLS-1$
+                type.equals("text/html") || //$NON-NLS-1$
+                type.equals("text/enriched") || //$NON-NLS-1$
+                type.equals("text/richtext") || //$NON-NLS-1$
+                type.equals("text/uri-list") || //$NON-NLS-1$
+                type.equals("text/directory") || //$NON-NLS-1$
+                type.equals("text/css") || //$NON-NLS-1$
+                type.equals("text/calendar") || //$NON-NLS-1$
+                type.equals("application/x-java-serialized-object") || //$NON-NLS-1$
+                type.equals("text/plain")); //$NON-NLS-1$
     }
 
     private boolean isCharsetRedundant() {
         String type = mimeInfo.getFullType();
 
-        return (type.equals("text/rtf") ||
-                type.equals("text/tab-separated-values") ||
-                type.equals("text/t140") ||
-                type.equals("text/rfc822-headers") ||
-                type.equals("text/parityfec"));
+        return (type.equals("text/rtf") || //$NON-NLS-1$
+                type.equals("text/tab-separated-values") || //$NON-NLS-1$
+                type.equals("text/t140") || //$NON-NLS-1$
+                type.equals("text/rfc822-headers") || //$NON-NLS-1$
+                type.equals("text/parityfec")); //$NON-NLS-1$
     }
 
     MimeTypeProcessor.MimeType getMimeInfo() {
@@ -253,7 +256,7 @@
     public String getParameter(String paramName) {
         String lowerName = paramName.toLowerCase();
 
-        if (lowerName.equals("humanpresentablename")) {
+        if (lowerName.equals("humanpresentablename")) { //$NON-NLS-1$
             return humanPresentableName;
         }
         return mimeInfo.getParameter(lowerName);
@@ -345,7 +348,7 @@
         mimeInfo = (MimeTypeProcessor.MimeType) is.readObject();
 
         representationClass = (mimeInfo != null) ?
-                Class.forName(mimeInfo.getParameter("class")) : null;
+                Class.forName(mimeInfo.getParameter("class")) : null; //$NON-NLS-1$
     }
 
     @Override
@@ -368,8 +371,8 @@
          */
 
         return (getClass().getName()
-                + "[MimeType=(" + getMimeType()
-                + ");humanPresentableName=" + humanPresentableName + "]");
+                + "[MimeType=(" + getMimeType() //$NON-NLS-1$
+                + ");humanPresentableName=" + humanPresentableName + "]"); //$NON-NLS-1$ //$NON-NLS-2$
     }
 
     public boolean isMimeTypeSerializedObject() {
@@ -399,7 +402,7 @@
         {
             return false;
         }
-        if (!mimeInfo.getPrimaryType().equals("text") || isUnicodeFlavor()) {
+        if (!mimeInfo.getPrimaryType().equals("text") || isUnicodeFlavor()) { //$NON-NLS-1$
             return true;
         }
 
@@ -432,13 +435,13 @@
     }
 
     private String getKeyInfo() {
-        String key = mimeInfo.getFullType() + ";class=" + representationClass.getName();
+        String key = mimeInfo.getFullType() + ";class=" + representationClass.getName(); //$NON-NLS-1$
 
-        if (!mimeInfo.getPrimaryType().equals("text") || isUnicodeFlavor()) {
+        if (!mimeInfo.getPrimaryType().equals("text") || isUnicodeFlavor()) { //$NON-NLS-1$
             return key;
         }
 
-        return key + ";charset=" + getCharset().toLowerCase();
+        return key + ";charset=" + getCharset().toLowerCase(); //$NON-NLS-1$
     }
 
     public boolean isFlavorSerializedObjectType() {
@@ -460,7 +463,7 @@
         if (equals(stringFlavor) || equals(plainTextFlavor)) {
             return true;
         }
-        if (!mimeInfo.getPrimaryType().equals("text")) {
+        if (!mimeInfo.getPrimaryType().equals("text")) { //$NON-NLS-1$
             return false;
         }
 
@@ -483,7 +486,8 @@
         Object data = transferable.getTransferData(this);
 
         if (data == null) {
-            throw new IllegalArgumentException("Transferable has null data");
+            // awt.16E=Transferable has null data
+            throw new IllegalArgumentException(Messages.getString("awt.16E")); //$NON-NLS-1$
         }
 
         if (data instanceof Reader) {
@@ -508,8 +512,8 @@
             } else if (data instanceof byte[]) {
                 stream = new ByteArrayInputStream((byte[]) data);
             } else {
-                throw new IllegalArgumentException(
-                        "Can't create reader for this representation class");
+                // awt.16F=Can't create reader for this representation class
+                throw new IllegalArgumentException(Messages.getString("awt.16F")); //$NON-NLS-1$
             }
 
             if (charset.length() == 0) {
@@ -568,11 +572,11 @@
     private static DataFlavor selectBestByCharset(List<DataFlavor> list) {
         List<DataFlavor> best;
 
-        best = getFlavors(list, new String[] {"UTF-16", "UTF-8", "UTF-16BE", "UTF-16LE"});
+        best = getFlavors(list, new String[] {"UTF-16", "UTF-8", "UTF-16BE", "UTF-16LE"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
         if (best == null) {
             best = getFlavors(list, new String[] {DTK.getDTK().getDefaultCharset()});
             if (best == null) {
-                best = getFlavors(list, new String[] {"US-ASCII"});
+                best = getFlavors(list, new String[] {"US-ASCII"}); //$NON-NLS-1$
                 if (best == null) {
                     best = selectBestByAlphabet(list);
                 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/MimeTypeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/MimeTypeProcessor.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/MimeTypeProcessor.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/MimeTypeProcessor.java Thu Nov  2 08:15:32 2006
@@ -55,9 +55,9 @@
             String name = keys.nextElement();
             String value = type.parameters.get(name);
 
-            buf.append("; ");
+            buf.append("; "); //$NON-NLS-1$
             buf.append(name);
-            buf.append("=\"");
+            buf.append("=\""); //$NON-NLS-1$
             buf.append(value);
             buf.append('"');
         }
@@ -216,7 +216,7 @@
         }
 
         String getFullType() {
-            return (primaryType + "/" + subType);
+            return (primaryType + "/" + subType); //$NON-NLS-1$
         }
 
         String getParameter(String name) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/SystemFlavorMap.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/SystemFlavorMap.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/SystemFlavorMap.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/SystemFlavorMap.java Thu Nov  2 08:15:32 2006
@@ -34,7 +34,7 @@
 public final class SystemFlavorMap implements FlavorMap, FlavorTable {
 
     private static final String SERIALIZED_PREFIX = 
-        "org.apache.harmony.awt.datatransfer:";
+        "org.apache.harmony.awt.datatransfer:"; //$NON-NLS-1$
 
     private final HashMap<DataFlavor, List<String>> flavor2Native = new HashMap<DataFlavor, List<String>>();
     private final HashMap<String, List<DataFlavor>> native2Flavor = new HashMap<String, List<DataFlavor>>();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/UnsupportedFlavorException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/UnsupportedFlavorException.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/UnsupportedFlavorException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/UnsupportedFlavorException.java Thu Nov  2 08:15:32 2006
@@ -21,6 +21,6 @@
     private static final long serialVersionUID = 5383814944251665601L;
 
     public UnsupportedFlavorException(DataFlavor flavor) {
-        super("flavor = " + flavor.toString());
+        super("flavor = " + flavor.toString()); //$NON-NLS-1$
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragGestureEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragGestureEvent.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragGestureEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragGestureEvent.java Thu Nov  2 08:15:32 2006
@@ -27,6 +27,8 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class DragGestureEvent extends EventObject {
 
     private static final long serialVersionUID = 9080172649166731306L;
@@ -45,22 +47,28 @@
         super(dgr);
 
         if (dgr.getComponent() == null) {
-            throw new IllegalArgumentException("Component is null.");
+            // awt.185=Component is null.
+            throw new IllegalArgumentException(Messages.getString("awt.185")); //$NON-NLS-1$
         }
         if (dgr.getDragSource() == null) {
-            throw new IllegalArgumentException("DragSource is null.");
+            // awt.186=DragSource is null.
+            throw new IllegalArgumentException(Messages.getString("awt.186")); //$NON-NLS-1$
         }
         if (!DnDConstants.isValidAction(act)) {
-            throw new IllegalArgumentException("Invalid action.");
+            // awt.184=Invalid action.
+            throw new IllegalArgumentException(Messages.getString("awt.184")); //$NON-NLS-1$
         }
         if (ori == null) {
-            throw new IllegalArgumentException("Origin is null.");
+            // awt.187=Origin is null.
+            throw new IllegalArgumentException(Messages.getString("awt.187")); //$NON-NLS-1$
         }
         if (evs == null) {
-            throw new IllegalArgumentException("Event list is null.");
+            // awt.188=Event list is null.
+            throw new IllegalArgumentException(Messages.getString("awt.188")); //$NON-NLS-1$
         }
         if (evs.isEmpty()) {
-            throw new IllegalArgumentException("Event list is empty.");
+            // awt.189=Event list is empty.
+            throw new IllegalArgumentException(Messages.getString("awt.189")); //$NON-NLS-1$
         }
 
         recognizer = dgr;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragGestureRecognizer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragGestureRecognizer.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragGestureRecognizer.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragGestureRecognizer.java Thu Nov  2 08:15:32 2006
@@ -24,6 +24,8 @@
 import java.util.ArrayList;
 import java.util.TooManyListenersException;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public abstract class DragGestureRecognizer implements Serializable {
 
     private static final long serialVersionUID = 8996673345831063337L;
@@ -40,7 +42,8 @@
 
     protected DragGestureRecognizer(DragSource ds, Component c, int sa, DragGestureListener dgl) {
         if (ds == null) {
-            throw new IllegalArgumentException("Drag source is null.");
+            // awt.172=Drag source is null.
+            throw new IllegalArgumentException(Messages.getString("awt.172")); //$NON-NLS-1$
         }
 
         dragSource = ds;
@@ -121,7 +124,8 @@
             return;
         }
         if (dragGestureListener != null) {
-            throw new TooManyListenersException("One listener is already exist.");
+            // awt.173=One listener is already exist.
+            throw new TooManyListenersException(Messages.getString("awt.173")); //$NON-NLS-1$
         }
 
         dragGestureListener = dgl;
@@ -130,7 +134,8 @@
 
     public synchronized void removeDragGestureListener(DragGestureListener dgl) {
         if (dragGestureListener != dgl) {
-            throw new IllegalArgumentException("dgl is not current listener.");
+            // awt.174=dgl is not current listener.
+            throw new IllegalArgumentException(Messages.getString("awt.174")); //$NON-NLS-1$
         }
         if (dragGestureListener == null) {
             return;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSource.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSource.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSource.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSource.java Thu Nov  2 08:15:32 2006
@@ -32,6 +32,7 @@
 import java.util.EventListener;
 
 import org.apache.harmony.awt.ListenerList;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 
 // TODO: think of synchronization
@@ -66,12 +67,12 @@
         } else {
             Toolkit toolkit = Toolkit.getDefaultToolkit();
 
-            DefaultMoveDrop = getDefaultCursor(toolkit, "dnd.MoveCursor");
-            DefaultMoveNoDrop = getDefaultCursor(toolkit, "dnd.NoMoveCursor");
-            DefaultCopyDrop = getDefaultCursor(toolkit, "dnd.CopyCursor");
-            DefaultCopyNoDrop = getDefaultCursor(toolkit, "dnd.NoCopyCursor");
-            DefaultLinkDrop = getDefaultCursor(toolkit, "dnd.LinkCursor");
-            DefaultLinkNoDrop = getDefaultCursor(toolkit, "dnd.NoLinkCursor");
+            DefaultMoveDrop = getDefaultCursor(toolkit, "dnd.MoveCursor"); //$NON-NLS-1$
+            DefaultMoveNoDrop = getDefaultCursor(toolkit, "dnd.NoMoveCursor"); //$NON-NLS-1$
+            DefaultCopyDrop = getDefaultCursor(toolkit, "dnd.CopyCursor"); //$NON-NLS-1$
+            DefaultCopyNoDrop = getDefaultCursor(toolkit, "dnd.NoCopyCursor"); //$NON-NLS-1$
+            DefaultLinkDrop = getDefaultCursor(toolkit, "dnd.LinkCursor"); //$NON-NLS-1$
+            DefaultLinkNoDrop = getDefaultCursor(toolkit, "dnd.NoLinkCursor"); //$NON-NLS-1$
         }
     }
 
@@ -80,7 +81,7 @@
             return (Cursor) toolkit.getDesktopProperty(name);
         } catch (Exception e) {
             e.printStackTrace();
-            throw new RuntimeException("Can't create default D&D cursor: " + e);
+            throw new RuntimeException(Messages.getString("awt.170", e)); //$NON-NLS-1$
         }
     }
 
@@ -102,11 +103,11 @@
     }
 
     public static int getDragThreshold() {
-        int threshold = Integer.getInteger("awt.dnd.drag.threshold", -1).intValue();
+        int threshold = Integer.getInteger("awt.dnd.drag.threshold", -1).intValue(); //$NON-NLS-1$
 
         if (threshold <= 0) {
             Object val = Toolkit.getDefaultToolkit().getDesktopProperty(
-                    "DnD.gestureMotionThreshold"
+                    "DnD.gestureMotionThreshold" //$NON-NLS-1$
             );
 
             if (val != null && val instanceof Integer) {
@@ -187,9 +188,8 @@
             throws InvalidDnDOperationException {
 
         if (curContext != null) {
-            throw new InvalidDnDOperationException(
-                    "Attempt to start a drag while an existing " + 
-                    "drag operation is still executing.");
+            // awt.171=Attempt to start a drag while an existing drag operation is still executing.
+            throw new InvalidDnDOperationException(Messages.getString("awt.171"));  //$NON-NLS-1$
         }
 
         DragSourceContextPeer peer =

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSourceContext.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSourceContext.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSourceContext.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSourceContext.java Thu Nov  2 08:15:32 2006
@@ -26,6 +26,8 @@
 import java.io.Serializable;
 import java.util.TooManyListenersException;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class DragSourceContext implements DragSourceListener,
         DragSourceMotionListener, Serializable
 {
@@ -60,31 +62,38 @@
             Transferable t, DragSourceListener dsl)
     {
         if (dscp == null) {
-            throw new NullPointerException("Context peer is null.");
+            // awt.179=Context peer is null.
+            throw new NullPointerException(Messages.getString("awt.179")); //$NON-NLS-1$
         }
         if (trigger == null) {
-            throw new NullPointerException("Trigger event is null.");
+            // awt.17A=Trigger event is null.
+            throw new NullPointerException(Messages.getString("awt.17A")); //$NON-NLS-1$
         }
         if (trigger.getDragAction() == DnDConstants.ACTION_NONE) {
-            throw new RuntimeException("Can't init ACTION_NONE drag.");
+            // awt.17B=Can't init ACTION_NONE drag.
+            throw new RuntimeException(Messages.getString("awt.17B")); //$NON-NLS-1$
         }
         if ((dragImage != null) && (offset == null)) {
-            throw new NullPointerException("Image offset is null.");
+            // awt.17C=Image offset is null.
+            throw new NullPointerException(Messages.getString("awt.17C")); //$NON-NLS-1$
         }
         if (t == null) {
-            throw new NullPointerException("Transferable is null.");
+            // awt.17D=Transferable is null.
+            throw new NullPointerException(Messages.getString("awt.17D")); //$NON-NLS-1$
         }
         if (trigger.getComponent() == null) {
-            throw new IllegalArgumentException(
-                    "Component associated with the trigger event is null.");
+            // awt.17E=Component associated with the trigger event is null.
+            throw new IllegalArgumentException(Messages.getString("awt.17E")); //$NON-NLS-1$
         }
         if (trigger.getDragSource() == null) {
-            throw new IllegalArgumentException("DragSource for the trigger event is null.");
+            // awt.17F=DragSource for the trigger event is null.
+            throw new IllegalArgumentException(Messages.getString("awt.17F")); //$NON-NLS-1$
         }
         if (trigger.getSourceAsDragGestureRecognizer().getSourceActions()
                 == DnDConstants.ACTION_NONE)
         {
-            throw new IllegalArgumentException("Source actions for the DragGestureRecognizer associated with the trigger event are equal to DnDConstants.ACTION_NONE.");
+            // awt.180=Source actions for the DragGestureRecognizer associated with the trigger event are equal to DnDConstants.ACTION_NONE.
+            throw new IllegalArgumentException(Messages.getString("awt.180")); //$NON-NLS-1$
         }
 
         this.trigger = trigger;
@@ -143,10 +152,12 @@
             return;
         }
         if (dsl == this) {
-            throw new IllegalArgumentException("Attempt to register context as its listener.");
+            // awt.181=Attempt to register context as its listener.
+            throw new IllegalArgumentException(Messages.getString("awt.181")); //$NON-NLS-1$
         }
         if (listener != null) {
-            throw new TooManyListenersException("One listener is already exist.");
+            // awt.173=One listener is already exist.
+            throw new TooManyListenersException(Messages.getString("awt.173")); //$NON-NLS-1$
         }
 
         listener = dsl;
@@ -154,7 +165,8 @@
 
     public synchronized void removeDragSourceListener(DragSourceListener dsl) {
         if (listener != dsl) {
-            throw new IllegalArgumentException("dsl is not current listener.");
+            // awt.182=dsl is not current listener.
+            throw new IllegalArgumentException(Messages.getString("awt.182")); //$NON-NLS-1$
         }
 
         listener = null;
@@ -165,7 +177,8 @@
             return;
         }
         if ((status < DEFAULT) || (status > CHANGED)) {
-            throw new RuntimeException("Invalid status.");
+            // awt.183=Invalid status.
+            throw new RuntimeException(Messages.getString("awt.183")); //$NON-NLS-1$
         }
 
         int possibleOps = dropOp & ((status == DEFAULT) ? DnDConstants.ACTION_NONE : targetAct);
@@ -211,7 +224,8 @@
         case DnDConstants.ACTION_LINK:
             return (enabled ? DragSource.DefaultLinkDrop : DragSource.DefaultLinkNoDrop);
         default:
-            throw new RuntimeException("Invalid action.");
+            // awt.184=Invalid action.
+            throw new RuntimeException(Messages.getString("awt.184")); //$NON-NLS-1$
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSourceEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSourceEvent.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSourceEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSourceEvent.java Thu Nov  2 08:15:32 2006
@@ -23,6 +23,8 @@
 import java.awt.Point;
 import java.util.EventObject;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class DragSourceEvent extends EventObject {
 
     private static final long serialVersionUID = -763287114604032641L;
@@ -40,7 +42,8 @@
         super(dsc);
 
         if (dsc == null) {
-            throw new IllegalArgumentException("Context is null.");
+            // awt.18A=Context is null.
+            throw new IllegalArgumentException(Messages.getString("awt.18A")); //$NON-NLS-1$
         }
 
         context = dsc;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTarget.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTarget.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTarget.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTarget.java Thu Nov  2 08:15:32 2006
@@ -34,6 +34,7 @@
 import java.util.TooManyListenersException;
 
 import org.apache.harmony.awt.datatransfer.DTK;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 public class DropTarget implements DropTargetListener, Serializable {
 
@@ -128,7 +129,8 @@
             return;
         }
         if (dtl != dropTargetListener) {
-            throw new IllegalArgumentException("Listener mismatch");
+            // awt.175=Listener mismatch
+            throw new IllegalArgumentException(Messages.getString("awt.175")); //$NON-NLS-1$
         }
         dropTargetListener = null;
     }
@@ -139,8 +141,8 @@
             return;
         }
         if (dtl == this) {
-            throw new IllegalArgumentException(
-                    "DropTarget cannot be added as listener to itself");
+            // awt.176=DropTarget cannot be added as listener to itself
+            throw new IllegalArgumentException(Messages.getString("awt.176")); //$NON-NLS-1$
         }
         if (dropTargetListener != null) {
             throw new TooManyListenersException();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTargetContext.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTargetContext.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTargetContext.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTargetContext.java Thu Nov  2 08:15:32 2006
@@ -32,6 +32,8 @@
 import java.util.Arrays;
 import java.util.List;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class DropTargetContext implements Serializable {
 
     private static final long serialVersionUID = -634158968993743371L;
@@ -111,7 +113,8 @@
 
     protected Transferable getTransferable() throws InvalidDnDOperationException {
         if (peer == null) {
-            throw new InvalidDnDOperationException("Transfer data is not available");
+            // awt.07=Transfer data is not available
+            throw new InvalidDnDOperationException(Messages.getString("awt.07")); //$NON-NLS-1$
         }
         return new TransferableProxy(peer.isTransferableJVMLocal(), peer.getTransferable());
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTargetEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTargetEvent.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTargetEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DropTargetEvent.java Thu Nov  2 08:15:32 2006
@@ -23,6 +23,8 @@
 import java.awt.Point;
 import java.util.EventObject;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class DropTargetEvent extends EventObject {
 
     private static final long serialVersionUID = 2821229066521922993L;
@@ -49,10 +51,12 @@
         this(dtc);
 
         if (!DnDConstants.isValidAction(userAction)) {
-            throw new IllegalArgumentException("Invalid user action.");
+            // awt.177=Invalid user action.
+            throw new IllegalArgumentException(Messages.getString("awt.177")); //$NON-NLS-1$
         }
         if (!DnDConstants.isValidAction(sourceAction)) {
-            throw new IllegalArgumentException("Invalid source action.");
+            // awt.178=Invalid source action.
+            throw new IllegalArgumentException(Messages.getString("awt.178")); //$NON-NLS-1$
         }
 
         this.location = (Point) location.clone();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AWTEventListenerProxy.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AWTEventListenerProxy.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AWTEventListenerProxy.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AWTEventListenerProxy.java Thu Nov  2 08:15:32 2006
@@ -24,6 +24,8 @@
 
 import java.util.EventListenerProxy;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class AWTEventListenerProxy extends EventListenerProxy implements AWTEventListener {
 
     private AWTEventListener listener;
@@ -32,7 +34,8 @@
     public AWTEventListenerProxy(long eventMask, AWTEventListener listener) {
         super(listener);
 
-        assert listener != null : "Listener can't be zero";
+        // awt.193=Listener can't be zero
+        assert listener != null : Messages.getString("awt.193"); //$NON-NLS-1$
 
         this.listener = listener;
         this.eventMask = eventMask;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ActionEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ActionEvent.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ActionEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ActionEvent.java Thu Nov  2 08:15:32 2006
@@ -85,24 +85,24 @@
          */
 
         String idString = (id == ACTION_PERFORMED) ? 
-                          "ACTION_PERFORMED" : "unknown type";
-        String modifiersString = "";
+                          "ACTION_PERFORMED" : "unknown type"; //$NON-NLS-1$ //$NON-NLS-2$
+        String modifiersString = ""; //$NON-NLS-1$
 
         if ((modifiers & SHIFT_MASK) > 0) {
-            modifiersString += "Shift";
+            modifiersString += "Shift"; //$NON-NLS-1$
         }
         if ((modifiers & CTRL_MASK) > 0) {
-            modifiersString += modifiersString.length() == 0 ? "Ctrl" : "+Ctrl";
+            modifiersString += modifiersString.length() == 0 ? "Ctrl" : "+Ctrl"; //$NON-NLS-1$ //$NON-NLS-2$
         }
         if ((modifiers & META_MASK) > 0) {
-            modifiersString += modifiersString.length() == 0 ? "Meta" : "+Meta";
+            modifiersString += modifiersString.length() == 0 ? "Meta" : "+Meta"; //$NON-NLS-1$ //$NON-NLS-2$
         }
         if ((modifiers & ALT_MASK) > 0) {
-            modifiersString += modifiersString.length() == 0 ? "Alt" : "+Alt";
+            modifiersString += modifiersString.length() == 0 ? "Alt" : "+Alt"; //$NON-NLS-1$ //$NON-NLS-2$
         }
 
-        return (idString + ",cmd=" + command + ",when=" + when + 
-                ",modifiers=" + modifiersString);
+        return (idString + ",cmd=" + command + ",when=" + when +  //$NON-NLS-1$ //$NON-NLS-2$
+                ",modifiers=" + modifiersString); //$NON-NLS-1$
     }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AdjustmentEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AdjustmentEvent.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AdjustmentEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AdjustmentEvent.java Thu Nov  2 08:15:32 2006
@@ -87,31 +87,31 @@
          */
 
         String idString = (id == ADJUSTMENT_VALUE_CHANGED ?
-                "ADJUSTMENT_VALUE_CHANGED" : "unknown type");
+                "ADJUSTMENT_VALUE_CHANGED" : "unknown type"); //$NON-NLS-1$ //$NON-NLS-2$
         String adjType = null;
 
         switch (type) {
         case UNIT_INCREMENT:
-            adjType = "UNIT_INCREMENT";
+            adjType = "UNIT_INCREMENT"; //$NON-NLS-1$
             break;
         case UNIT_DECREMENT:
-            adjType = "UNIT_DECREMENT";
+            adjType = "UNIT_DECREMENT"; //$NON-NLS-1$
             break;
         case BLOCK_INCREMENT:
-            adjType = "BLOCK_INCREMENT";
+            adjType = "BLOCK_INCREMENT"; //$NON-NLS-1$
             break;
         case BLOCK_DECREMENT:
-            adjType = "BLOCK_DECREMENT";
+            adjType = "BLOCK_DECREMENT"; //$NON-NLS-1$
             break;
         case TRACK:
-            adjType = "TRACK";
+            adjType = "TRACK"; //$NON-NLS-1$
             break;
         default:
-            adjType = "unknown type";
+            adjType = "unknown type"; //$NON-NLS-1$
         }
 
-        return (idString + ",adjType=" + adjType + ",value=" + value +
-                ",isAdjusting=" + isAdjusting);
+        return (idString + ",adjType=" + adjType + ",value=" + value + //$NON-NLS-1$ //$NON-NLS-2$
+                ",isAdjusting=" + isAdjusting); //$NON-NLS-1$
     }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ComponentEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ComponentEvent.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ComponentEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ComponentEvent.java Thu Nov  2 08:15:32 2006
@@ -62,21 +62,21 @@
 
         switch (id) {
         case COMPONENT_MOVED:
-            idString = "COMPONENT_MOVED";
+            idString = "COMPONENT_MOVED"; //$NON-NLS-1$
             break;
         case COMPONENT_RESIZED:
-            idString = "COMPONENT_RESIZED";
+            idString = "COMPONENT_RESIZED"; //$NON-NLS-1$
             break;
         case COMPONENT_SHOWN:
-            return "COMPONENT_SHOWN";
+            return "COMPONENT_SHOWN"; //$NON-NLS-1$
         case COMPONENT_HIDDEN:
-            return "COMPONENT_HIDDEN";
+            return "COMPONENT_HIDDEN"; //$NON-NLS-1$
         default:
-            return "unknown type";
+            return "unknown type"; //$NON-NLS-1$
         }
 
-        return (idString + " (" + c.getX() + "," + c.getY() + 
-                " " + c.getWidth()+ "x" + c.getHeight() + ")");
+        return (idString + " (" + c.getX() + "," + c.getY() +  //$NON-NLS-1$ //$NON-NLS-2$
+                " " + c.getWidth()+ "x" + c.getHeight() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
     }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ContainerEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ContainerEvent.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ContainerEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ContainerEvent.java Thu Nov  2 08:15:32 2006
@@ -65,16 +65,16 @@
 
         switch (id) {
         case COMPONENT_ADDED:
-            idString = "COMPONENT_ADDED";
+            idString = "COMPONENT_ADDED"; //$NON-NLS-1$
             break;
         case COMPONENT_REMOVED:
-            idString = "COMPONENT_REMOVED";
+            idString = "COMPONENT_REMOVED"; //$NON-NLS-1$
             break;
         default:
-            idString = "unknown type";
+            idString = "unknown type"; //$NON-NLS-1$
         }
 
-        return (idString + ",child=" + child.getName());
+        return (idString + ",child=" + child.getName()); //$NON-NLS-1$
     }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/FocusEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/FocusEvent.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/FocusEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/FocusEvent.java Thu Nov  2 08:15:32 2006
@@ -73,18 +73,18 @@
 
         switch (id) {
         case FOCUS_GAINED:
-            idString = "FOCUS_GAINED";
+            idString = "FOCUS_GAINED"; //$NON-NLS-1$
             break;
         case FOCUS_LOST:
-            idString = "FOCUS_LOST";
+            idString = "FOCUS_LOST"; //$NON-NLS-1$
             break;
         default:
-            idString = "unknown type";
+            idString = "unknown type"; //$NON-NLS-1$
         }
 
         return (idString +
-                (temporary ? ",temporary" : ",permanent") +
-                ",opposite=" + opposite);
+                (temporary ? ",temporary" : ",permanent") + //$NON-NLS-1$ //$NON-NLS-2$
+                ",opposite=" + opposite); //$NON-NLS-1$
     }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/HierarchyEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/HierarchyEvent.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/HierarchyEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/HierarchyEvent.java Thu Nov  2 08:15:32 2006
@@ -92,34 +92,34 @@
 
         switch (id) {
         case HIERARCHY_CHANGED:
-            paramString = "HIERARCHY_CHANGED";
+            paramString = "HIERARCHY_CHANGED"; //$NON-NLS-1$
             break;
         case ANCESTOR_MOVED:
-            paramString = "ANCESTOR_MOVED";
+            paramString = "ANCESTOR_MOVED"; //$NON-NLS-1$
             break;
         case ANCESTOR_RESIZED:
-            paramString = "ANCESTOR_RESIZED";
+            paramString = "ANCESTOR_RESIZED"; //$NON-NLS-1$
             break;
         default:
-            paramString = "unknown type";
+            paramString = "unknown type"; //$NON-NLS-1$
         }
 
-        paramString += " (";
+        paramString += " ("; //$NON-NLS-1$
 
         if (id == HIERARCHY_CHANGED) {
             if ((changeFlag & PARENT_CHANGED) > 0) {
-                paramString += "PARENT_CHANGED,";
+                paramString += "PARENT_CHANGED,"; //$NON-NLS-1$
             }
             if ((changeFlag & DISPLAYABILITY_CHANGED) > 0) {
-                paramString += "DISPLAYABILITY_CHANGED,";
+                paramString += "DISPLAYABILITY_CHANGED,"; //$NON-NLS-1$
             }
             if ((changeFlag & SHOWING_CHANGED) > 0) {
-                paramString += "SHOWING_CHANGED,";
+                paramString += "SHOWING_CHANGED,"; //$NON-NLS-1$
             }
         }
 
-        return paramString + "changed=" + changed + 
-                ",changedParent=" + changedParent + ")";
+        return paramString + "changed=" + changed +  //$NON-NLS-1$
+                ",changedParent=" + changedParent + ")"; //$NON-NLS-1$ //$NON-NLS-2$
     }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputMethodEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputMethodEvent.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputMethodEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputMethodEvent.java Thu Nov  2 08:15:32 2006
@@ -25,6 +25,8 @@
 import java.awt.font.TextHitInfo;
 import java.text.AttributedCharacterIterator;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class InputMethodEvent extends AWTEvent {
 
     private static final long serialVersionUID = 4727190874778922661L;
@@ -65,17 +67,19 @@
         super(src, id);
 
         if ((id < INPUT_METHOD_FIRST) || (id > INPUT_METHOD_LAST)) {
-            throw new IllegalArgumentException("Wrong event id");
+            // awt.18E=Wrong event id
+            throw new IllegalArgumentException(Messages.getString("awt.18E")); //$NON-NLS-1$
         }
         if ((id == CARET_POSITION_CHANGED) && (text != null)) {
-            throw new IllegalArgumentException(
-                    "Text must be null for CARET_POSITION_CHANGED");
+            // awt.18F=Text must be null for CARET_POSITION_CHANGED
+            throw new IllegalArgumentException(Messages.getString("awt.18F")); //$NON-NLS-1$
         }
         if ((text != null) &&
                 ((committedCharacterCount < 0) ||
                  (committedCharacterCount > 
                         (text.getEndIndex() - text.getBeginIndex())))) {
-            throw new IllegalArgumentException("Wrong committedCharacterCount");
+            // awt.190=Wrong committedCharacterCount
+            throw new IllegalArgumentException(Messages.getString("awt.190")); //$NON-NLS-1$
         }
 
         this.when = when;
@@ -129,18 +133,18 @@
 
         switch (id) {
         case INPUT_METHOD_TEXT_CHANGED:
-            typeString = "INPUT_METHOD_TEXT_CHANGED";
+            typeString = "INPUT_METHOD_TEXT_CHANGED"; //$NON-NLS-1$
             break;
         case CARET_POSITION_CHANGED:
-            typeString = "CARET_POSITION_CHANGED";
+            typeString = "CARET_POSITION_CHANGED"; //$NON-NLS-1$
             break;
         default:
-            typeString = "unknown type";
+            typeString = "unknown type"; //$NON-NLS-1$
         }
 
-        return typeString + ",text=" + text + 
-                ",commitedCharCount=" + committedCharacterCount +
-                ",caret=" + caret + ",visiblePosition=" + visiblePosition;
+        return typeString + ",text=" + text +  //$NON-NLS-1$
+                ",commitedCharCount=" + committedCharacterCount + //$NON-NLS-1$
+                ",caret=" + caret + ",visiblePosition=" + visiblePosition; //$NON-NLS-1$ //$NON-NLS-2$
     }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InvocationEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InvocationEvent.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InvocationEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InvocationEvent.java Thu Nov  2 08:15:32 2006
@@ -23,6 +23,8 @@
 import java.awt.AWTEvent;
 import java.awt.ActiveEvent;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class InvocationEvent extends AWTEvent implements ActiveEvent {
 
     private static final long serialVersionUID = 436056344909459450L;
@@ -56,10 +58,12 @@
     {
         super(source, id);
 
-        assert runnable != null : "Cannot invoke null runnable";
+        // awt.18C=Cannot invoke null runnable
+        assert runnable != null : Messages.getString("awt.18C"); //$NON-NLS-1$
 
         if (source == null) {
-            throw new IllegalArgumentException("Source is null");
+            // awt.18D=Source is null
+            throw new IllegalArgumentException(Messages.getString("awt.18D")); //$NON-NLS-1$
         }
         this.runnable = runnable;
         this.notifier = notifier;
@@ -118,11 +122,11 @@
          * System.out.println(e);
          */
 
-        return ((id == INVOCATION_DEFAULT ? "INVOCATION_DEFAULT" : "unknown type") +
-                ",runnable=" + runnable +
-                ",notifier=" + notifier +
-                ",catchExceptions=" + catchExceptions +
-                ",when=" + when);
+        return ((id == INVOCATION_DEFAULT ? "INVOCATION_DEFAULT" : "unknown type") + //$NON-NLS-1$ //$NON-NLS-2$
+                ",runnable=" + runnable + //$NON-NLS-1$
+                ",notifier=" + notifier + //$NON-NLS-1$
+                ",catchExceptions=" + catchExceptions + //$NON-NLS-1$
+                ",when=" + when); //$NON-NLS-1$
     }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ItemEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ItemEvent.java?view=diff&rev=470404&r1=470403&r2=470404
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ItemEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ItemEvent.java Thu Nov  2 08:15:32 2006
@@ -74,17 +74,17 @@
 
         switch (stateChange) {
         case SELECTED:
-            stateString = "SELECTED";
+            stateString = "SELECTED"; //$NON-NLS-1$
             break;
         case DESELECTED:
-            stateString = "DESELECTED";
+            stateString = "DESELECTED"; //$NON-NLS-1$
             break;
         default:
-            stateString = "unknown type";
+            stateString = "unknown type"; //$NON-NLS-1$
         }
 
-        return ((id == ITEM_STATE_CHANGED ? "ITEM_STATE_CHANGED" : "unknown type") +
-                ",item=" + item + ",stateChange=" + stateString);
+        return ((id == ITEM_STATE_CHANGED ? "ITEM_STATE_CHANGED" : "unknown type") + //$NON-NLS-1$ //$NON-NLS-2$
+                ",item=" + item + ",stateChange=" + stateString); //$NON-NLS-1$ //$NON-NLS-2$
     }
 
 }