harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r470296 [2/3] - in /incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common: java/awt/ org/apache/harmony/awt/internal/nls/
Date Thu, 02 Nov 2006 09:45:24 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FileDialog.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FileDialog.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FileDialog.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FileDialog.java Thu Nov  2 01:45:21 2006
@@ -22,6 +22,8 @@
 
 import java.io.FilenameFilter;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class FileDialog extends Dialog {
     private static final long serialVersionUID = 5035145889651310422L;
 
@@ -35,7 +37,7 @@
     private FilenameFilter filenameFilter;
 
     public FileDialog(Frame owner) {
-        this(owner, "");
+        this(owner, ""); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
         } finally {
@@ -64,7 +66,7 @@
     }
     
     public FileDialog(Dialog owner) {
-        this(owner, "");
+        this(owner, ""); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
         } finally {
@@ -110,9 +112,9 @@
 
         toolkit.lockAWT();
         try {
-            return (super.paramString() + ",dir=" + directory +
-                    ",file=" + file + "," +
-                    (mode == LOAD ? "load" : "save"));
+            return (super.paramString() + ",dir=" + directory + //$NON-NLS-1$
+                    ",file=" + file + "," + //$NON-NLS-1$ //$NON-NLS-2$
+                    (mode == LOAD ? "load" : "save")); //$NON-NLS-1$ //$NON-NLS-2$
         } finally {
             toolkit.unlockAWT();
         }
@@ -159,7 +161,7 @@
     public void setDirectory(String dir) {
         toolkit.lockAWT();
         try {
-            directory = (dir == "" ? null : dir);
+            directory = (dir == "" ? null : dir); //$NON-NLS-1$
         } finally {
             toolkit.unlockAWT();
         }
@@ -168,7 +170,7 @@
     public void setFile(String file) {
         toolkit.lockAWT();
         try {
-            this.file = (file == "" ? null : file);
+            this.file = (file == "" ? null : file); //$NON-NLS-1$
         } finally {
             toolkit.unlockAWT();
         }
@@ -187,7 +189,8 @@
         toolkit.lockAWT();
         try {
             if (!((mode == LOAD) || (mode == SAVE))) {
-                throw new IllegalArgumentException("illegal file dialog mode");
+                // awt.145=illegal file dialog mode
+                throw new IllegalArgumentException(Messages.getString("awt.145")); //$NON-NLS-1$
             }
             this.mode = mode;
         } finally {
@@ -223,7 +226,7 @@
     
     @Override
     String autoName() {
-        return "filedlg" + toolkit.autoNumber.nextFileDialog++;
+        return "filedlg" + toolkit.autoNumber.nextFileDialog++; //$NON-NLS-1$
     }
 }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FlowLayout.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FlowLayout.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FlowLayout.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FlowLayout.java Thu Nov  2 01:45:21 2006
@@ -88,23 +88,23 @@
             String alignStr;
             switch (alignment) {
             case LEFT:
-                alignStr = "left";
+                alignStr = "left"; //$NON-NLS-1$
                 break;
             case RIGHT:
-                alignStr = "right";
+                alignStr = "right"; //$NON-NLS-1$
                 break;
             case CENTER:
-                alignStr = "center";
+                alignStr = "center"; //$NON-NLS-1$
                 break;
             case TRAILING:
-                alignStr = "trailing";
+                alignStr = "trailing"; //$NON-NLS-1$
                 break;
             case LEADING:
             default:
-                alignStr = "leading";
+                alignStr = "leading"; //$NON-NLS-1$
             }
-            return (getClass().getName() + "[hgap=" + hGap + ",vgap=" +vGap + 
-                    ",align=" + alignStr + "]");
+            return (getClass().getName() + "[hgap=" + hGap + ",vgap=" +vGap +  //$NON-NLS-1$ //$NON-NLS-2$
+                    ",align=" + alignStr + "]"); //$NON-NLS-1$ //$NON-NLS-2$
         } finally {
             toolkit.unlockAWT();
         }
@@ -334,6 +334,6 @@
         stream.defaultReadObject();
 
         FieldsAccessor accessor = new FieldsAccessor(FlowLayout.class, this);
-        accessor.set("toolkit", Toolkit.getDefaultToolkit());
+        accessor.set("toolkit", Toolkit.getDefaultToolkit()); //$NON-NLS-1$
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Font.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Font.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Font.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Font.java Thu Nov  2 01:45:21 2006
@@ -312,7 +312,7 @@
             int[] glyphCodes) {
         // TODO : to find out, how to operate with glyphcodes
         if (true) {
-            throw new RuntimeException("Method is not implemented");
+            throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
         }
         return null;
     }
@@ -402,7 +402,8 @@
     public Font deriveFont(AffineTransform trans) {
 
         if (trans == null) {
-            throw new IllegalArgumentException("transform must not be null");
+            // awt.94=transform can not be null
+            throw new IllegalArgumentException(Messages.getString("awt.94")); //$NON-NLS-1$
         }
 
         Hashtable<Attribute, Object> derivefRequestedAttributes = (Hashtable<Attribute, Object>)fRequestedAttributes.clone();
@@ -446,7 +447,8 @@
     public Font deriveFont(int style, AffineTransform trans) {
 
         if (trans == null) {
-            throw new IllegalArgumentException("transform must not be null");
+            // awt.94=transform can not be null
+            throw new IllegalArgumentException(Messages.getString("awt.94")); //$NON-NLS-1$
         }
         Hashtable<Attribute, Object> derivefRequestedAttributes = (Hashtable<Attribute, Object>)fRequestedAttributes.clone();
 
@@ -562,8 +564,9 @@
 
     public String getFamily(Locale l) {
         if (l == null) {
+            // awt.01='{0}' parameter is null
             throw new NullPointerException(Messages.getString(
-                    "awt.01", "Locale")); //$NON-NLS-1$ 
+                    "awt.01", "Locale")); //$NON-NLS-1$ //$NON-NLS-2$ 
         }
 
         FontPeerImpl peer = (FontPeerImpl) this.getPeer();
@@ -605,6 +608,7 @@
     public LineMetrics getLineMetrics(char[] chars, int start, int end,
             FontRenderContext frc) {
         if (frc == null) {
+            // awt.00=FontRenderContext is null
             throw new NullPointerException(Messages.getString("awt.00")); //$NON-NLS-1$
         }
 
@@ -618,6 +622,7 @@
             int end, FontRenderContext frc) {
 
         if (frc == null){
+            // awt.00=FontRenderContext is null
             throw new NullPointerException(Messages.getString("awt.00")); //$NON-NLS-1$
         }
 
@@ -644,6 +649,7 @@
     public LineMetrics getLineMetrics(String str, FontRenderContext frc) {
         
         if (frc == null){
+            // awt.00=FontRenderContext is null
             throw new NullPointerException(Messages.getString("awt.00")); //$NON-NLS-1$
         }
         
@@ -663,14 +669,17 @@
         char[] chars;
 
         if (start < first) {
-            throw new IndexOutOfBoundsException("Wrong start index: " + start);
+            // awt.95=Wrong start index: {0}
+            throw new IndexOutOfBoundsException(Messages.getString("awt.95", start)); //$NON-NLS-1$
         }
         if ( end > finish) {
-            throw new IndexOutOfBoundsException("Wrong finish index: " + end);
+            // awt.96=Wrong finish index: {0}
+            throw new IndexOutOfBoundsException(Messages.getString("awt.96", end)); //$NON-NLS-1$
         }
         if (start > end) {
-            throw new IndexOutOfBoundsException("Wrong range length: " +
-                    (end - start));
+            // awt.97=Wrong range length: {0}
+            throw new IndexOutOfBoundsException(Messages.getString("awt.97", //$NON-NLS-1$
+                    (end - start)));
         }
 
         chars = new char[end - start];
@@ -694,14 +703,17 @@
     public Rectangle2D getStringBounds(String str, int start, int end,
             FontRenderContext frc) {
         if (start < 0) {
-            throw new IndexOutOfBoundsException("Wrong start index: " + start);
+            // awt.95=Wrong start index: {0}
+            throw new IndexOutOfBoundsException(Messages.getString("awt.95", start)); //$NON-NLS-1$
         }
         if ( end > str.length()) {
-            throw new IndexOutOfBoundsException("Wrong finish index: " + end);
+            // awt.96=Wrong finish index: {0}
+            throw new IndexOutOfBoundsException(Messages.getString("awt.96", end)); //$NON-NLS-1$
         }
         if (start > end) {
-            throw new IndexOutOfBoundsException("Wrong range length: " +
-                    (end-start));
+            // awt.97=Wrong range length: {0}
+            throw new IndexOutOfBoundsException(Messages.getString("awt.97", //$NON-NLS-1$
+                    (end-start)));
         }
 
         return this.getStringBounds((str.substring(start, end)), frc);
@@ -712,14 +724,17 @@
         int finish = chars.length;
 
         if (start < 0) {
-            throw new IndexOutOfBoundsException("Wrong start index: " + start);
+            // awt.95=Wrong start index: {0}
+            throw new IndexOutOfBoundsException(Messages.getString("awt.95", start)); //$NON-NLS-1$
         }
         if ( end > finish) {
-            throw new IndexOutOfBoundsException("Wrong finish index: " + end);
+            // awt.96=Wrong finish index: {0}
+            throw new IndexOutOfBoundsException(Messages.getString("awt.96", end)); //$NON-NLS-1$
         }
         if (start > end) {
-            throw new IndexOutOfBoundsException("Wrong range length: "
-                    + (end - start));
+            // awt.97=Wrong range length: {0}
+            throw new IndexOutOfBoundsException(Messages.getString("awt.97", //$NON-NLS-1$
+                    (end - start)));
         }
 
         FontPeerImpl peer = (FontPeerImpl) this.getPeer();
@@ -753,6 +768,7 @@
 
     public Rectangle2D getMaxCharBounds(FontRenderContext frc) {
         if (frc == null){
+            // awt.00=FontRenderContext is null
             throw new NullPointerException(Messages.getString("awt.00")); //$NON-NLS-1$ 
         }
 
@@ -775,18 +791,21 @@
         // TODO: implement method for bidirectional text.
         // At the moment only LTR and RTL texts supported.
         if (start < 0) {
-            throw new ArrayIndexOutOfBoundsException("Wrong start index: " +
-                    start);
+            // awt.95=Wrong start index: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.95", //$NON-NLS-1$
+                    start));
         }
 
         if (count < 0) {
-            throw new ArrayIndexOutOfBoundsException("Wrong count value," +
-                    "can not be negative: " + count);
+            // awt.98=Wrong count value, can not be negative: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.98", //$NON-NLS-1$
+                    count));
         }
 
         if ( start + count > chars.length) {
-            throw new ArrayIndexOutOfBoundsException("Wrong [start + count]" +
-                    "is out of range: " + (start + count));
+            // awt.99=Wrong [start + count] is out of range: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.99", //$NON-NLS-1$
+                    (start + count)));
         }
 
         char[] out = new char[count];
@@ -940,7 +959,8 @@
         byte buf[] = new byte[size];
 
         if (fontFormat != TRUETYPE_FONT) {
-            throw new IllegalArgumentException ( "Unsupported font format" );
+            // awt.9A=Unsupported font format
+            throw new IllegalArgumentException ( Messages.getString("awt.9A") ); //$NON-NLS-1$
         }
 
         /* Get font file in system-specific directory */
@@ -964,7 +984,8 @@
 
         font = Toolkit.getDefaultToolkit().getGraphicsFactory().embedFont(fontFile.getAbsolutePath());
         if ( font == null ) {
-            throw new FontFormatException ( "Can't create font - bad font data" );
+            // awt.9B=Can't create font - bad font data
+            throw new FontFormatException ( Messages.getString("awt.9B") ); //$NON-NLS-1$
         }
         return font;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FontMetrics.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FontMetrics.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FontMetrics.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FontMetrics.java Thu Nov  2 01:45:21 2006
@@ -26,6 +26,8 @@
 import java.io.Serializable;
 import java.text.CharacterIterator;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public abstract class FontMetrics implements Serializable {
     private static final long serialVersionUID = 1681126225205050147L;
 
@@ -38,10 +40,10 @@
     @Override
     public String toString() {
         return this.getClass().getName() +
-                "[font=" + this.getFont() +
-                "ascent=" + this.getAscent() +
-                ", descent=" + this.getDescent() +
-                ", height=" + this.getHeight() + "]";
+                "[font=" + this.getFont() + //$NON-NLS-1$
+                "ascent=" + this.getAscent() + //$NON-NLS-1$
+                ", descent=" + this.getDescent() + //$NON-NLS-1$
+                ", height=" + this.getHeight() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
     }
 
     public Font getFont() {
@@ -120,12 +122,13 @@
     public int bytesWidth(byte[] data, int off, int len) {
         int width = 0;
         if ((off >= data.length) || (off < 0)){
-            throw new IllegalArgumentException("offset off is out of range");
+            // awt.13B=offset off is out of range
+            throw new IllegalArgumentException(Messages.getString("awt.13B")); //$NON-NLS-1$
         }
 
         if ((off+len > data.length)){
-            throw new IllegalArgumentException("number of elemets len is " +
-                    "out of range");
+            // awt.13C=number of elemets len is out of range
+            throw new IllegalArgumentException(Messages.getString("awt.13C")); //$NON-NLS-1$
         }
 
         for (int i = off; i < off+len; i++){
@@ -138,12 +141,13 @@
     public int charsWidth(char[] data, int off , int len){
         int width = 0;
         if ((off >= data.length) || (off < 0)){
-            throw new IllegalArgumentException("offset off is out of range");
+            // awt.13B=offset off is out of range
+            throw new IllegalArgumentException(Messages.getString("awt.13B")); //$NON-NLS-1$
         }
 
         if ((off+len > data.length)){
-            throw new IllegalArgumentException("number of elemets len is " +
-                    "out of range");
+            // awt.13C=number of elemets len is out of range
+            throw new IllegalArgumentException(Messages.getString("awt.13C")); //$NON-NLS-1$
         }
 
         for (int i = off; i < off+len; i++){

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Frame.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Frame.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Frame.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Frame.java Thu Nov  2 01:45:21 2006
@@ -137,7 +137,7 @@
     }
 
     public Frame() throws HeadlessException {
-        this("");
+        this(""); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
         } finally {
@@ -146,7 +146,7 @@
     }
 
     public Frame(GraphicsConfiguration gc) {
-        this("", gc);
+        this("", gc); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
         } finally {
@@ -207,30 +207,30 @@
     protected String paramString() {
         toolkit.lockAWT();
         try {
-            return (super.paramString() + ",title=" + getTitle() +
-                    (isResizable() ? ",resizable" : "") +
-                    "," + getStateString());
+            return (super.paramString() + ",title=" + getTitle() + //$NON-NLS-1$
+                    (isResizable() ? ",resizable" : "") + //$NON-NLS-1$ //$NON-NLS-2$
+                    "," + getStateString()); //$NON-NLS-1$
         } finally {
             toolkit.unlockAWT();
         }
     }
 
     private String getStateString() {
-        String str = "";
+        String str = ""; //$NON-NLS-1$
         if ( (state & NORMAL) != 0) {
-            str = "normal";
+            str = "normal"; //$NON-NLS-1$
         }
         if ( (state & ICONIFIED) != 0) {
-            str = "iconified";
+            str = "iconified"; //$NON-NLS-1$
         }
         if ( (state & MAXIMIZED_VERT) != 0) {
-            str = "maximized_vert";
+            str = "maximized_vert"; //$NON-NLS-1$
         }
         if ( (state & MAXIMIZED_HORIZ) != 0) {
-            str = "maximized_horiz";
+            str = "maximized_horiz"; //$NON-NLS-1$
         }
         if ( (state & MAXIMIZED_BOTH) != 0) {
-            str = "maximized";
+            str = "maximized"; //$NON-NLS-1$
         }
 
         return str;
@@ -548,7 +548,7 @@
     @Override
     String autoName() {
         int number = toolkit.autoNumber.nextFrame++;
-        return ("frame" + Integer.toString(number));
+        return ("frame" + Integer.toString(number)); //$NON-NLS-1$
     }
 
     @Override

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GradientPaint.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GradientPaint.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GradientPaint.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GradientPaint.java Thu Nov  2 01:45:21 2006
@@ -22,6 +22,8 @@
 import java.awt.geom.Rectangle2D;
 import java.awt.image.ColorModel;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class GradientPaint implements Paint {
     /**
      * The start point color
@@ -52,10 +54,12 @@
     public GradientPaint(Point2D point1, Color color1, Point2D point2,
             Color color2, boolean cyclic) {
         if (point1 == null || point2 == null) {
-            throw new NullPointerException("Point is null");
+            // awt.6D=Point is null
+            throw new NullPointerException(Messages.getString("awt.6D")); //$NON-NLS-1$
         }
         if (color1 == null || color2 == null) {
-            throw new NullPointerException("Color is null");
+            // awt.6E=Color is null
+            throw new NullPointerException(Messages.getString("awt.6E")); //$NON-NLS-1$
         }
 
         this.point1 = point1;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Graphics.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Graphics.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Graphics.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Graphics.java Thu Nov  2 01:45:21 2006
@@ -159,7 +159,7 @@
     @Override
     public String toString() {
         // TODO: Think about string representation of Graphics.
-        return "Graphics";
+        return "Graphics"; //$NON-NLS-1$
     }
 
     // Abstract methods
@@ -235,4 +235,4 @@
     public abstract void setXORMode(Color color);
 
     public abstract void translate(int x, int y);
-}
\ No newline at end of file
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsConfiguration.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsConfiguration.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsConfiguration.java Thu Nov  2 01:45:21 2006
@@ -25,6 +25,8 @@
 import java.awt.image.ColorModel;
 import java.awt.image.VolatileImage;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public abstract class GraphicsConfiguration {
    /***************************************************************************
     *
@@ -75,7 +77,8 @@
             ImageCapabilities caps) throws AWTException {
         VolatileImage res = createCompatibleVolatileImage(width, height);
         if (!res.getCapabilities().equals(caps)) {
-            throw new AWTException("Can not create VolatileImage with specified capabilities");
+            // awt.14A=Can not create VolatileImage with specified capabilities
+            throw new AWTException(Messages.getString("awt.14A")); //$NON-NLS-1$
         }
         return res;
     }
@@ -84,7 +87,8 @@
             ImageCapabilities caps, int transparency) throws AWTException {
         VolatileImage res = createCompatibleVolatileImage(width, height, transparency);
         if (!res.getCapabilities().equals(caps)) {
-            throw new AWTException("Can not create VolatileImage with specified capabilities");
+            // awt.14A=Can not create VolatileImage with specified capabilities
+            throw new AWTException(Messages.getString("awt.14A")); //$NON-NLS-1$
         }
         return res;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsDevice.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsDevice.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsDevice.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsDevice.java Thu Nov  2 01:45:21 2006
@@ -20,6 +20,8 @@
  */
 package java.awt;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public abstract class GraphicsDevice {
     private DisplayMode displayMode;
 
@@ -101,7 +103,8 @@
 
     public void setDisplayMode(DisplayMode dm) {
         if (!isDisplayChangeSupported()) {
-            throw new UnsupportedOperationException("Does not support display mode changes");
+            // awt.122=Does not support display mode changes
+            throw new UnsupportedOperationException(Messages.getString("awt.122")); //$NON-NLS-1$
         }
 
         DisplayMode []dms = getDisplayModes();
@@ -111,7 +114,8 @@
                 return;
             }
         }
-        throw new IllegalArgumentException("Unsupported display mode: "+dm);
+        // awt.123=Unsupported display mode: {0}
+        throw new IllegalArgumentException(Messages.getString("awt.123", dm)); //$NON-NLS-1$
     }
 
     public void setFullScreenWindow(Window w) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridBagConstraints.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridBagConstraints.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridBagConstraints.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridBagConstraints.java Thu Nov  2 01:45:21 2006
@@ -22,6 +22,8 @@
 
 import java.io.Serializable;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class GridBagConstraints implements Cloneable, Serializable {
     private static final long serialVersionUID = -1000070633030801713L;
 
@@ -108,51 +110,51 @@
         int maxN = GridBagLayout.MAXGRIDSIZE - 1;
 
         if (((gridx != RELATIVE) && (gridx < 0)) || (gridx >= maxN)) {
-            throw new IllegalArgumentException(
-                    "wrong value of GridBagConstraints' gridx");
+            // awt.9C=wrong value of GridBagConstraints: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.9C", "gridx")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         if (((gridy != RELATIVE) && (gridy < 0)) || (gridy >= maxN)) {
-            throw new IllegalArgumentException(
-                    "wrong value of GridBagConstraints' gridy");
+            // awt.9C=wrong value of GridBagConstraints: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.9C", "gridy")); //$NON-NLS-1$  //$NON-NLS-2$
         }
         if (((gridwidth != RELATIVE) && (gridwidth != REMAINDER) && (gridwidth < 0))
                 || (gridwidth > maxN))
         {
-            throw new IllegalArgumentException(
-                    "wrong value of GridBagConstraints' gridwidth");
+            // awt.9C=wrong value of GridBagConstraints: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.9C", "gridwidth")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         if (((gridheight != RELATIVE) && (gridheight != REMAINDER) && (gridheight < 0))
                 || (gridheight > maxN))
         {
-            throw new IllegalArgumentException(
-                    "wrong value of GridBagConstraints' gridheight");
+            // awt.9C=wrong value of GridBagConstraints: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.9C", "gridheight")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         if (((gridx >= 0) || (gridy >= 0))
                 && ((gridwidth <= 0) || (gridheight <= 0)))
         {
-            throw new IllegalArgumentException(
-                    "relative grid size parameter goes after absolute grid coordinate");
+            // awt.9D=relative grid size parameter goes after absolute grid coordinate
+            throw new IllegalArgumentException(Messages.getString("awt.9D")); //$NON-NLS-1$
         }
         if ((gridx != RELATIVE) && ((gridwidth + gridx) > maxN)) {
-            throw new IllegalArgumentException(
-                    "wrong values sum of GridBagConstraints' gridwidth and gridx");
+            // awt.9E=wrong values sum of GridBagConstraints' gridwidth and gridx
+            throw new IllegalArgumentException(Messages.getString("awt.9E")); //$NON-NLS-1$
         }
         if ((gridy != RELATIVE) && ((gridheight + gridy) > maxN)) {
-            throw new IllegalArgumentException(
-                    "wrong values sum of GridBagConstraints' gridheight and gridy");
+            // awt.9F=wrong values sum of GridBagConstraints' gridheight and gridy
+            throw new IllegalArgumentException(Messages.getString("awt.9F")); //$NON-NLS-1$
         }
         if ((gridwidth == RELATIVE) && (gridheight == RELATIVE)) {
-            throw new IllegalArgumentException(
-                    "component has RELATIVE width and height");
+            // awt.100=component has RELATIVE width and height
+            throw new IllegalArgumentException(Messages.getString("awt.100")); //$NON-NLS-1$
         }
 
         if (weightx < 0.) {
-            throw new IllegalArgumentException(
-                    "wrong value of GridBagConstraints' weightx");
+            // awt.9C=wrong value of GridBagConstraints: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.9C", "weightx")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         if (weighty < 0.) {
-            throw new IllegalArgumentException(
-                    "wrong value of GridBagConstraints' weighty");
+            // awt.9C=wrong value of GridBagConstraints: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.9C", "weighty")); //$NON-NLS-1$ //$NON-NLS-2$
         }
 
         if ((anchor != CENTER) && (anchor != NORTH) && (anchor != NORTHEAST)
@@ -163,27 +165,27 @@
                 && (anchor != LINE_START) && (anchor != LINE_END)
                 && (anchor != FIRST_LINE_START) && (anchor != FIRST_LINE_END)
                 && (anchor != LAST_LINE_START) && (anchor != LAST_LINE_END)) {
-            throw new IllegalArgumentException(
-                    "wrong value of GridBagConstraints' anchor");
+            // awt.9C=wrong value of GridBagConstraints: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.9C", "anchor")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         if ((fill != NONE) && (fill != HORIZONTAL) && (fill != VERTICAL)
                 && (fill != BOTH)) {
-            throw new IllegalArgumentException(
-                    "wrong value of GridBagConstraints' fill");
+            // awt.9C=wrong value of GridBagConstraints: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.9C", "fill")); //$NON-NLS-1$ //$NON-NLS-2$
         }
 
         if (ipadx < 0) {
-            throw new IllegalArgumentException(
-                    "wrong value of GridBagConstraints' ipadx");
+            // awt.9C=wrong value of GridBagConstraints: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.9C", "ipadx")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         if (ipady < 0) {
-            throw new IllegalArgumentException(
-                    "wrong value of GridBagConstraints' ipady");
+            // awt.9C=wrong value of GridBagConstraints: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.9C", "ipady")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         if ((insets == null) || (insets.left < 0) || (insets.left < 0)
                 || (insets.left < 0) || (insets.left < 0)) {
-            throw new IllegalArgumentException(
-                    "wrong value of GridBagConstraints' insets");
+            // awt.9C=wrong value of GridBagConstraints: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.9C", "insets")); //$NON-NLS-1$ //$NON-NLS-2$
         }
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridBagLayout.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridBagLayout.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridBagLayout.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridBagLayout.java Thu Nov  2 01:45:21 2006
@@ -24,6 +24,8 @@
 import java.util.HashMap;
 import java.util.Hashtable;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class GridBagLayout implements LayoutManager2, Serializable {
     private static final long serialVersionUID = 8838754796412211005L;
 
@@ -88,12 +90,14 @@
     public void addLayoutComponent(Component comp, Object constraints) {
         toolkit.lockAWT();
         try {
-            assert comp != null : "AddLayoutComponent: attempt to add null component";
+            // awt.7F=AddLayoutComponent: attempt to add null component
+            assert comp != null : Messages.getString("awt.7F"); //$NON-NLS-1$
             GridBagConstraints cons;
             if (constraints != null) {
                 if (!GridBagConstraints.class.isInstance(constraints)) {
+                    // awt.80=AddLayoutComponent: constraint object must be GridBagConstraints
                     throw new IllegalArgumentException(
-                            "AddLayoutComponent: constraint object must be GridBagConstraints");
+                            Messages.getString("awt.80")); //$NON-NLS-1$
                 }
                 cons = (GridBagConstraints) constraints;
             } else {
@@ -106,7 +110,8 @@
             try {
                 //cons.verify();
             } catch (IllegalArgumentException e) {
-                throw new IllegalArgumentException("AddLayoutComponent: " + e.getMessage());
+                // awt.81=AddLayoutComponent: {0}
+                throw new IllegalArgumentException(Messages.getString("awt.81", e.getMessage())); //$NON-NLS-1$
             }
             GridBagConstraints consClone = (GridBagConstraints) cons.clone();
             comptable.put(comp, consClone);
@@ -120,7 +125,8 @@
     public void removeLayoutComponent(Component comp) {
         toolkit.lockAWT();
         try {
-            assert comp != null : "RemoveLayoutComponent: attempt to remove null component";
+            // awt.82=RemoveLayoutComponent: attempt to remove null component
+            assert comp != null : Messages.getString("awt.82"); //$NON-NLS-1$
             Container parent = comp.getParent();
             if (parent != null) {
                 getParentInfo(parent).consTable.remove(comptable.get(comp));
@@ -148,13 +154,16 @@
     public void setConstraints(Component comp, GridBagConstraints constraints) {
         toolkit.lockAWT();
         try {
-            assert comp != null : "SetConstraints: attempt to get constraints of null component";
-            assert constraints != null : "SetConstraints: attempt to set null constraints";
+            // awt.83=SetConstraints: attempt to get constraints of null component
+            assert comp != null : Messages.getString("awt.83"); //$NON-NLS-1$
+            // awt.84=SetConstraints: attempt to set null constraints
+            assert constraints != null : Messages.getString("awt.84"); //$NON-NLS-1$
             GridBagConstraints consClone = (GridBagConstraints) constraints.clone();
             try {
                 //                consClone.verify();
             } catch (IllegalArgumentException e) {
-                throw new IllegalArgumentException("SetConstraints: " + e.getMessage());
+                // awt.85=SetConstraints: {0}
+                throw new IllegalArgumentException(Messages.getString("awt.85", e.getMessage())); //$NON-NLS-1$
             }
             ParentInfo info = getParentInfo(comp.getParent());
             if (info != null) {
@@ -214,7 +223,8 @@
             try {
                 validate(parent, info);
             } catch (RuntimeException e) {
-                throw new IllegalArgumentException("MinimumLayoutSize: " + e.getMessage());
+                // awt.86=MinimumLayoutSize: {0}
+                throw new IllegalArgumentException(Messages.getString("awt.86", e.getMessage())); //$NON-NLS-1$
             }
             return parent.addInsets(info.grid.minimumSize());
             //return addInsets(grid.minimumSize(), parent);
@@ -233,7 +243,8 @@
             try {
                 validate(parent, info);
             } catch (RuntimeException e) {
-                throw new IllegalArgumentException("PreferredLayoutSize: " + e.getMessage());
+                // awt.87=PreferredLayoutSize: {0}
+                throw new IllegalArgumentException(Messages.getString("awt.87", e.getMessage())); //$NON-NLS-1$
             }
             return parent.addInsets(info.grid.preferredSize());
             //return addInsets(grid.preferredSize(), parent);
@@ -261,7 +272,8 @@
             try {
                 arrangeGridImpl(parent, info);
             } catch (RuntimeException e) {
-                throw new IllegalArgumentException("LayoutContainer: " + e.getMessage());
+                // awt.88=LayoutContainer: {0}
+                throw new IllegalArgumentException(Messages.getString("awt.88", e.getMessage())); //$NON-NLS-1$
             }
             setComponentsBounds(info);
         } finally {
@@ -360,7 +372,8 @@
             try {
                 arrangeGridImpl(parent, info);
             } catch (RuntimeException e) {
-                throw new IllegalArgumentException("MinimumLayoutSize: " + e.getMessage());
+                // awt.86=MinimumLayoutSize: {0}
+                throw new IllegalArgumentException(Messages.getString("awt.86", e.getMessage())); //$NON-NLS-1$
             }
         } finally {
             toolkit.unlockAWT();
@@ -370,7 +383,8 @@
     protected GridBagConstraints lookupConstraints(Component comp) {
         toolkit.lockAWT();
         try {
-            assert comp != null : "LookupConstraints: attempt to get constraints of null component";
+            // awt.89=LookupConstraints: attempt to get constraints of null component
+            assert comp != null : Messages.getString("awt.89"); //$NON-NLS-1$
             GridBagConstraints cons = comptable.get(comp);
             if (cons == null) {
                 // if comp is not in the layout, return a copy of default constraints
@@ -421,12 +435,15 @@
     protected void AdjustForGravity(GridBagConstraints constraints, Rectangle r) {
         toolkit.lockAWT();
         try {
-            assert constraints != null : "AdjustForGravity: attempt to use null constraints";
-            assert r != null : "AdjustForGravity: attempt to use null rectangle";
+            // awt.8A=AdjustForGravity: attempt to use null constraints
+            assert constraints != null : Messages.getString("awt.8A"); //$NON-NLS-1$
+            // awt.8B=AdjustForGravity: attempt to use null rectangle
+            assert r != null : Messages.getString("awt.8B"); //$NON-NLS-1$
             try {
                 //                ((GridBagConstraints) constraints).verify();
             } catch (IllegalArgumentException e) {
-                throw new IllegalArgumentException("AdjustForGravity: " + e.getMessage());
+                // awt.8C=AdjustForGravity: {0}
+                throw new IllegalArgumentException(Messages.getString("awt.8C", e.getMessage())); //$NON-NLS-1$
             }
             //Don't get parent as param, so have to use older info if exists
             if (layoutInfo == null) {
@@ -738,13 +755,16 @@
         private void spreadComponents(ArrayList<MixedConstraints> allConstraints) {
             for (int i = 0; i < allConstraints.size(); i++) {
                 MixedConstraints mixCons = allConstraints.get(i);
-                assert !((relWComp && (mixCons.initial.width != GridBagConstraints.REMAINDER)) || (relHComp && (mixCons.initial.height != GridBagConstraints.REMAINDER))) : "REMINDER component expected after RELATIVE one";
+                // awt.8D=REMINDER component expected after RELATIVE one
+                assert !((relWComp && (mixCons.initial.width != GridBagConstraints.REMAINDER)) || (relHComp && (mixCons.initial.height != GridBagConstraints.REMAINDER))) : Messages.getString("awt.8D"); //$NON-NLS-1$
                 if (curY == MAXGRIDSIZE) {
-                    throw new RuntimeException("component is out of grid's range");
+                    // awt.8E=component is out of grid's range
+                    throw new RuntimeException(Messages.getString("awt.8E")); //$NON-NLS-1$
                 }
                 translateHor(mixCons, translateVert(mixCons, i, allConstraints));
             }
-            assert !(relWComp || relHComp) : "REMINDER component expected after RELATIVE one";
+            // awt.8D=REMINDER component expected after RELATIVE one
+            assert !(relWComp || relHComp) : Messages.getString("awt.8D"); //$NON-NLS-1$
         }
 
         private void applyOrientation(ParentInfo info) {
@@ -784,7 +804,8 @@
                 endY = mixCons.mapped.y + mixCons.mapped.height;
             }
             if (endY > MAXGRIDSIZE) {
-                throw new RuntimeException("component is out of grid's range");
+                // awt.8E=component is out of grid's range
+                throw new RuntimeException(Messages.getString("awt.8E")); //$NON-NLS-1$
             }
             maxH = Math.max(maxH, mixCons.mapped.y + mixCons.mapped.height);
             return endY;
@@ -795,7 +816,8 @@
             if (mixCons.initial.x != GridBagConstraints.RELATIVE) {
                 for (;; trueCurY++) {
                     if (trueCurY == MAXGRIDSIZE) {
-                        throw new RuntimeException("component is out of grid's range");
+                        // awt.8E=component is out of grid's range
+                        throw new RuntimeException(Messages.getString("awt.8E")); //$NON-NLS-1$
                     }
                     if (curX[trueCurY] <= mixCons.initial.x) {
                         break;
@@ -829,7 +851,8 @@
                 }
             }
             if ((mixCons.mapped.x + mixCons.mapped.width) > MAXGRIDSIZE) {
-                throw new RuntimeException("component is out of grid's range");
+                // awt.8E=component is out of grid's range
+                throw new RuntimeException(Messages.getString("awt.8E")); //$NON-NLS-1$
             }
             maxW = Math.max(maxW, mixCons.mapped.x + mixCons.mapped.width);
             //            if (curYBackup >= 0) { //FIX
@@ -1108,7 +1131,8 @@
             private void applyOverrides(int lengthsOverride[], double weightsOverride[]) {
                 if (weightsOverride != null) {
                     if (weightsOverride.length > MAXGRIDSIZE) {
-                        throw new RuntimeException("Weights' overrides array is too long");
+                        // awt.8F=Weights' overrides array is too long
+                        throw new RuntimeException(Messages.getString("awt.8F")); //$NON-NLS-1$
                     }
                     for (int i = 0; i < weightsOverride.length; i++) {
                         weights[i] = Math.max(weights[i], weightsOverride[i]);
@@ -1116,7 +1140,8 @@
                 }
                 if (lengthsOverride != null) {
                     if (lengthsOverride.length > MAXGRIDSIZE) {
-                        throw new RuntimeException("Lengths' overrides array is too long");
+                        // awt.90=Lengths' overrides array is too long
+                        throw new RuntimeException(Messages.getString("awt.90")); //$NON-NLS-1$
                     }
                     for (int i = 0; i < lengthsOverride.length; i++) {
                         minLengths[i] = lengthsOverride[i];

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridLayout.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridLayout.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridLayout.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridLayout.java Thu Nov  2 01:45:21 2006
@@ -22,6 +22,8 @@
 
 import java.io.Serializable;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class GridLayout implements LayoutManager, Serializable {
     private static final long serialVersionUID = -7411804673224730901L;   
 
@@ -60,9 +62,11 @@
         toolkit.lockAWT();
         try {
             if ((rows == 0) && (cols == 0)) {
-                throw new IllegalArgumentException("rows and cols cannot both be zero");
+                // awt.75=rows and cols cannot both be zero
+                throw new IllegalArgumentException(Messages.getString("awt.75")); //$NON-NLS-1$
             }
-            assert (cols >= 0) && (rows >= 0) : "rows and cols cannot be negative";
+            // awt.76=rows and cols cannot be negative
+            assert (cols >= 0) && (rows >= 0) : Messages.getString("awt.76"); //$NON-NLS-1$
 
             this.rows = rows;
             columns = cols;
@@ -83,8 +87,8 @@
 
         toolkit.lockAWT();
         try {
-            return (getClass().getName() + "[hgap=" + hGap + ",vgap=" + vGap
-                    + ",rows=" + rows + ",cols=" + columns + "]");
+            return (getClass().getName() + "[hgap=" + hGap + ",vgap=" + vGap //$NON-NLS-1$ //$NON-NLS-2$
+                    + ",rows=" + rows + ",cols=" + columns + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         } finally {
             toolkit.unlockAWT();
         }
@@ -148,7 +152,8 @@
         toolkit.lockAWT();
         try {
             if ((rows == 0) && (cols == 0)) {
-                throw new IllegalArgumentException("rows and cols cannot both be zero");
+                // awt.75=rows and cols cannot both be zero
+                throw new IllegalArgumentException(Messages.getString("awt.75")); //$NON-NLS-1$
             }            
 
             columns = cols;
@@ -161,7 +166,8 @@
         toolkit.lockAWT();
         try {
             if ((rows == 0) && (columns == 0)) {
-                throw new IllegalArgumentException("rows and cols cannot both be zero");
+                // awt.75=rows and cols cannot both be zero
+                throw new IllegalArgumentException(Messages.getString("awt.75")); //$NON-NLS-1$
             }            
 
             this.rows = rows;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java Thu Nov  2 01:45:21 2006
@@ -27,6 +27,8 @@
 import java.awt.image.ImageProducer;
 import java.awt.image.ReplicateScaleFilter;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public abstract class Image {
 
     public static final Object UndefinedProperty = new Object();  //$NON-LOCK-1$
@@ -74,7 +76,8 @@
 
     public void setAccelerationPriority(float priority) {
         if (priority < 0 || priority > 1) {
-            throw new IllegalArgumentException("Priority must be a value between 0 and 1, inclusive");
+            // awt.10A=Priority must be a value between 0 and 1, inclusive
+            throw new IllegalArgumentException(Messages.getString("awt.10A")); //$NON-NLS-1$
         }
         accelerationPriority = priority;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Insets.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Insets.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Insets.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Insets.java Thu Nov  2 01:45:21 2006
@@ -77,8 +77,8 @@
          */
 
         return (getClass().getName() +
-                "[left=" + left + ",top=" + top +
-                ",right=" + right + ",bottom="  + bottom + "]");
+                "[left=" + left + ",top=" + top + //$NON-NLS-1$ //$NON-NLS-2$
+                ",right=" + right + ",bottom="  + bottom + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
     }
 
     public void set(int top, int left, int bottom, int right) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/JobAttributes.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/JobAttributes.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/JobAttributes.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/JobAttributes.java Thu Nov  2 01:45:21 2006
@@ -21,6 +21,8 @@
 
 package java.awt;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public final class JobAttributes implements Cloneable {
 
     private int copies;
@@ -175,7 +177,8 @@
 
     public void setCopies(int copies) {
         if(copies <= 0) {
-            throw new IllegalArgumentException("Invalid number of copies");
+            // awt.152=Invalid number of copies
+            throw new IllegalArgumentException(Messages.getString("awt.152")); //$NON-NLS-1$
         }
         this.copies = copies;
     }
@@ -186,7 +189,8 @@
 
     public void setMaxPage(int imaxPage) {
         if (imaxPage <= 0 || imaxPage < minPage) {
-            throw new IllegalArgumentException("Invalid value for maxPage");
+            // awt.153=Invalid value for maxPage
+            throw new IllegalArgumentException(Messages.getString("awt.153")); //$NON-NLS-1$
         }
         maxPage = imaxPage;
     }
@@ -197,7 +201,8 @@
 
     public void setMinPage(int iminPage) {
         if (iminPage <= 0 || iminPage > maxPage) {
-            throw new IllegalArgumentException("Invalid value for minPage");
+            // awt.154=Invalid value for minPage
+            throw new IllegalArgumentException(Messages.getString("awt.154")); //$NON-NLS-1$
         }
         minPage = iminPage;
     }
@@ -218,7 +223,8 @@
     public void setFromPage(int ifromPage) {
         if (ifromPage <= 0 || ifromPage > toPage
                 || ifromPage < minPage || ifromPage > maxPage) {
-            throw new IllegalArgumentException("Invalid value for fromPage");
+            // awt.155=Invalid value for fromPage
+            throw new IllegalArgumentException(Messages.getString("awt.155")); //$NON-NLS-1$
         }
         fromPage = ifromPage;
     }
@@ -240,7 +246,8 @@
         if (itoPage <= 0 || itoPage < fromPage
                 || itoPage < minPage
                 || itoPage > maxPage) {
-            throw new IllegalArgumentException("Invalid value for toPage");
+            // awt.156=Invalid value for toPage
+            throw new IllegalArgumentException(Messages.getString("awt.156")); //$NON-NLS-1$
         }
         toPage = itoPage;
     }
@@ -284,7 +291,8 @@
     }
 
     public void setPageRanges(int[][] pr) {
-        String msg = "Invalid value for pageRanges";
+        // awt.157=Invalid value for pageRanges
+        String msg = Messages.getString("awt.157"); //$NON-NLS-1$
         int n1 = 0;
         int n2 = 0;
         int prl = pr.length;
@@ -325,7 +333,8 @@
 
     public void setDestination(JobAttributes.DestinationType destination) {
         if(destination == null){
-            throw new IllegalArgumentException("Invalid value for destination");
+            // awt.158=Invalid value for destination
+            throw new IllegalArgumentException(Messages.getString("awt.158")); //$NON-NLS-1$
         }
         this.destination = destination;
     }
@@ -336,7 +345,8 @@
 
     public void setDialog(JobAttributes.DialogType dialog) {
         if(dialog == null) {
-            throw new IllegalArgumentException("Invalid value for dialog");
+            // awt.159=Invalid value for dialog
+            throw new IllegalArgumentException(Messages.getString("awt.159")); //$NON-NLS-1$
         }
         this.dialog = dialog;
     }
@@ -349,8 +359,8 @@
     public void setDefaultSelection(
             JobAttributes.DefaultSelectionType a_defaultSelection) {
         if (a_defaultSelection == null) {
-            throw new IllegalArgumentException(
-                    "Invalid value for defaultSelection");
+            // awt.15A=Invalid value for defaultSelection
+            throw new IllegalArgumentException(Messages.getString("awt.15A")); //$NON-NLS-1$
         }
         this.defaultSelection = a_defaultSelection;
     }
@@ -364,8 +374,8 @@
         (JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling){
 
         if(multipleDocumentHandling == null) {
-            throw new IllegalArgumentException
-                        ("Invalid value for multipleDocumentHandling");
+            // awt.15B=Invalid value for multipleDocumentHandling
+            throw new IllegalArgumentException(Messages.getString("awt.15B")); //$NON-NLS-1$
         }
         multiDocHandling = multipleDocumentHandling;
     }
@@ -377,8 +387,8 @@
     public void setSides(JobAttributes.SidesType sides){
 
         if(sides == null) {
-            throw new IllegalArgumentException
-                        ("Invalid value for attribute sides");
+            // awt.15C=Invalid value for attribute sides
+            throw new IllegalArgumentException(Messages.getString("awt.15C")); //$NON-NLS-1$
         }
         this.sides = sides;
     }
@@ -412,25 +422,25 @@
          * System.out.println(new JobAttributes());
          */
 
-        String s = "Page-ranges [";
+        String s = "Page-ranges ["; //$NON-NLS-1$
         int k = pageRanges.length-1;
         for(int i = 0; i <= k ; i++)            {
-            s += pageRanges[i][0] + "-"
-               + pageRanges[i][1] + ((i < k)? ",": "");
+            s += pageRanges[i][0] + "-" //$NON-NLS-1$
+               + pageRanges[i][1] + ((i < k)? ",": ""); //$NON-NLS-1$ //$NON-NLS-2$
         }
-        s += "], copies=" + getCopies()
-            + ",defSelection=" + getDefaultSelection()
-            + ",dest=" + getDestination()
-            + ",fromPg=" + getFromPage()
-            + ",toPg=" + getToPage()
-            + ",minPg=" + getMinPage()
-            + ",maxPg=" + getMaxPage()
-            + ",multiple-document-handling="
+        s += "], copies=" + getCopies() //$NON-NLS-1$
+            + ",defSelection=" + getDefaultSelection() //$NON-NLS-1$
+            + ",dest=" + getDestination() //$NON-NLS-1$
+            + ",fromPg=" + getFromPage() //$NON-NLS-1$
+            + ",toPg=" + getToPage() //$NON-NLS-1$
+            + ",minPg=" + getMinPage() //$NON-NLS-1$
+            + ",maxPg=" + getMaxPage() //$NON-NLS-1$
+            + ",multiple-document-handling=" //$NON-NLS-1$
             + getMultipleDocumentHandling()
-            + ",fileName=" + getFileName()
-            + ",printer=" + getPrinter()
-            + ",dialog=" + getDialog()
-            + ",sides=" + getSides();
+            + ",fileName=" + getFileName() //$NON-NLS-1$
+            + ",printer=" + getPrinter() //$NON-NLS-1$
+            + ",dialog=" + getDialog() //$NON-NLS-1$
+            + ",sides=" + getSides(); //$NON-NLS-1$
         return s;
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/KeyboardFocusManager.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/KeyboardFocusManager.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/KeyboardFocusManager.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/KeyboardFocusManager.java Thu Nov  2 01:45:21 2006
@@ -32,6 +32,8 @@
 import java.util.Set;
 import java.util.Vector;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public abstract class KeyboardFocusManager implements KeyEventDispatcher, KeyEventPostProcessor {
     public static final int FORWARD_TRAVERSAL_KEYS = 0;
 
@@ -226,8 +228,8 @@
      */
     private void checkInstance() throws SecurityException {
         if (getCurrentKeyboardFocusManager() != this) {
-            throw new SecurityException("this KeyboardFocusManager is not installed "
-                    + "in the current thread's context");
+            // awt.7C=this KeyboardFocusManager is not installed in the current thread's context
+            throw new SecurityException(Messages.getString("awt.7C")); //$NON-NLS-1$
         }
     }
 
@@ -317,7 +319,7 @@
         toolkit.lockAWT();
         try {
             SecurityManager secMan = System.getSecurityManager();
-            String permission = "replaceKeyboardFocusManager";
+            String permission = "replaceKeyboardFocusManager"; //$NON-NLS-1$
             if (secMan != null) {
                 secMan.checkPermission(new AWTPermission(permission));
             }
@@ -330,7 +332,7 @@
         if (oldManager == newManager) {
             return;
         }
-        String propName = "managingFocus";
+        String propName = "managingFocus"; //$NON-NLS-1$
         if (oldManager != null) {
             oldManager.firePropertyChange(propName, Boolean.TRUE, Boolean.FALSE);
         }
@@ -346,16 +348,16 @@
         String propName = null;
         switch (id) {
             case FORWARD_TRAVERSAL_KEYS:
-                propName = "forwardDefaultFocusTraversalKeys";
+                propName = "forwardDefaultFocusTraversalKeys"; //$NON-NLS-1$
                 break;
             case BACKWARD_TRAVERSAL_KEYS:
-                propName = "backwardDefaultFocusTraversalKeys";
+                propName = "backwardDefaultFocusTraversalKeys"; //$NON-NLS-1$
                 break;
             case UP_CYCLE_TRAVERSAL_KEYS:
-                propName = "upCycleDefaultFocusTraversalKeys";
+                propName = "upCycleDefaultFocusTraversalKeys"; //$NON-NLS-1$
                 break;
             case DOWN_CYCLE_TRAVERSAL_KEYS:
-                propName = "downCycleDefaultFocusTraversalKeys";
+                propName = "downCycleDefaultFocusTraversalKeys"; //$NON-NLS-1$
                 break;
         }
         firePropertyChange(propName, oldKeyStrokes, keystrokes);
@@ -363,17 +365,17 @@
 
     public void setDefaultFocusTraversalPolicy(FocusTraversalPolicy defaultPolicy) {
         if (defaultPolicy == null) {
-            throw new IllegalArgumentException("default focus traversal policy"
-                    + " cannot be null");
+            // awt.77=default focus traversal policy cannot be null
+            throw new IllegalArgumentException(Messages.getString("awt.77")); //$NON-NLS-1$
         }
         FocusTraversalPolicy oldPolicy = defaultFocusTraversalPolicy;
         defaultFocusTraversalPolicy = defaultPolicy;
-        firePropertyChange("defaultFocusTraversalPolicy", oldPolicy,
+        firePropertyChange("defaultFocusTraversalPolicy", oldPolicy, //$NON-NLS-1$
                 defaultFocusTraversalPolicy);
     }
 
     protected void setGlobalActiveWindow(Window activeWindow) {
-        String propName = "activeWindow";
+        String propName = "activeWindow"; //$NON-NLS-1$
         // fire Vetoable change[before it is reflected in Java focus state],
         // catch veto exception
         try {
@@ -392,11 +394,11 @@
     public void setGlobalCurrentFocusCycleRoot(Container newFocusCycleRoot) {
         Container oldFocusCycleRoot = currentFocusCycleRoot;
         currentFocusCycleRoot = newFocusCycleRoot;
-        firePropertyChange("currentFocusCycleRoot", oldFocusCycleRoot, currentFocusCycleRoot);
+        firePropertyChange("currentFocusCycleRoot", oldFocusCycleRoot, currentFocusCycleRoot); //$NON-NLS-1$
     }
 
     protected void setGlobalFocusOwner(Component focusOwner) {
-        String propName = "focusOwner";
+        String propName = "focusOwner"; //$NON-NLS-1$
         // fire Vetoable change[before it is reflected in Java focus state],
         // catch veto exception
         try {
@@ -425,7 +427,7 @@
     }
 
     protected void setGlobalFocusedWindow(Window focusedWindow) {
-        String propName = "focusedWindow";
+        String propName = "focusedWindow"; //$NON-NLS-1$
         // fire Vetoable change[before it is reflected in Java focus state],
         // catch veto exception
         try {
@@ -444,7 +446,7 @@
     }
 
     protected void setGlobalPermanentFocusOwner(Component permanentFocusOwner) {
-        String propName = "permanentFocusOwner";
+        String propName = "permanentFocusOwner"; //$NON-NLS-1$
         // fire Vetoable change[before it is reflected in Java focus state],
         // catch veto exception
         try {
@@ -473,7 +475,8 @@
 
     static void checkTraversalKeysID(Map<?, ?> keysMap, Integer id) {
         if (!keysMap.containsKey(id)) {
-            throw new IllegalArgumentException("invalid focus traversal key identifier");
+            // awt.78=invalid focus traversal key identifier
+            throw new IllegalArgumentException(Messages.getString("awt.78")); //$NON-NLS-1$
         }
     }
 
@@ -485,11 +488,12 @@
         }
         for (AWTKeyStroke key : keystrokes) {
             if (key == null) {
-                throw new IllegalArgumentException("cannot set null focus traversal key");
+                // awt.79=cannot set null focus traversal key
+                throw new IllegalArgumentException(Messages.getString("awt.79")); //$NON-NLS-1$
             } // actually throw ClassCastException ??
             if (key.getKeyEventType() == KeyEvent.KEY_TYPED) {
-                throw new IllegalArgumentException(
-                        "focus traversal keys cannot map to KEY_TYPED events");
+                // awt.7A=focus traversal keys cannot map to KEY_TYPED events
+                throw new IllegalArgumentException(Messages.getString("awt.7A")); //$NON-NLS-1$
             }
             // throw exception if such a KeyStroke is already present for
             // another id
@@ -499,8 +503,8 @@
                 if ((!theID.equals(kId)) &&
                         val != null && 
                         val.contains(key)) {
-                    throw new IllegalArgumentException("focus traversal keys must be unique"
-                            + " for a Component");
+                    // awt.7B=focus traversal keys must be unique for a Component
+                    throw new IllegalArgumentException(Messages.getString("awt.7B")); //$NON-NLS-1$
                 }
             }
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Label.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Label.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Label.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Label.java Thu Nov  2 01:45:21 2006
@@ -24,6 +24,7 @@
 import javax.accessibility.AccessibleContext;
 import javax.accessibility.AccessibleRole;
 
+import org.apache.harmony.awt.internal.nls.Messages;
 import org.apache.harmony.awt.state.LabelState;
 
 
@@ -103,7 +104,7 @@
     }
 
     public Label() throws HeadlessException {
-        this(new String(""), LEFT);
+        this(new String(""), LEFT); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
         } finally {
@@ -130,21 +131,21 @@
 
         toolkit.lockAWT();
         try {
-            return (super.paramString() + ",align=" + getAlignString() +
-                    ",text=" + text);
+            return (super.paramString() + ",align=" + getAlignString() + //$NON-NLS-1$
+                    ",text=" + text); //$NON-NLS-1$
         } finally {
             toolkit.unlockAWT();
         }
     }
 
     private String getAlignString() {
-        String alignStr = "left";
+        String alignStr = "left"; //$NON-NLS-1$
         switch (alignment) {
         case CENTER:
-            alignStr = "center";
+            alignStr = "center"; //$NON-NLS-1$
             break;
         case RIGHT:
-            alignStr = "right";
+            alignStr = "right"; //$NON-NLS-1$
             break;
         }
         return alignStr;
@@ -200,8 +201,9 @@
 
     private void setAlignmentImpl(int alignment) {
         if ((alignment < LEFT) || (alignment > RIGHT)) {
-            throw new IllegalArgumentException("improper alignment: " +
-                                               alignment);
+            // awt.10F=improper alignment: {0}
+            throw new IllegalArgumentException(Messages.getString("awt.10F", //$NON-NLS-1$
+                                               alignment));
         }
         this.alignment = alignment;
     }
@@ -237,7 +239,7 @@
 
     @Override
     String autoName() {
-        return ("label" + toolkit.autoNumber.nextLabel++);
+        return ("label" + toolkit.autoNumber.nextLabel++); //$NON-NLS-1$
     }
 
     @Override

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/List.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/List.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/List.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/List.java Thu Nov  2 01:45:21 2006
@@ -41,6 +41,7 @@
 import javax.accessibility.AccessibleStateSet;
 import org.apache.harmony.awt.ScrollStateController;
 import org.apache.harmony.awt.Scrollable;
+import org.apache.harmony.awt.internal.nls.Messages;
 import org.apache.harmony.awt.state.ListState;
 
 public class List extends Component implements ItemSelectable, Accessible {
@@ -454,7 +455,8 @@
         }
 
         public void keyPressed(KeyEvent e) {
-            assert isFocusOwner() : "Key event for unfocused component";
+            // awt.72=Key event for unfocused component
+            assert isFocusOwner() : Messages.getString("awt.72"); //$NON-NLS-1$
             int keyCode = e.getKeyCode();
             switch (keyCode) {
                 case KeyEvent.VK_UP:
@@ -735,7 +737,7 @@
     public void add(String item, int index) {
         toolkit.lockAWT();
         try {
-            String str = (item != null ? item : "");
+            String str = (item != null ? item : ""); //$NON-NLS-1$
             int pos = index;
             int size = items.size();
             if ((pos < 0) || (pos > size)) {
@@ -754,7 +756,8 @@
         try {
             int index = items.indexOf(item);
             if (index < 0) {
-                throw new IllegalArgumentException("no such item");
+                // awt.73=no such item
+                throw new IllegalArgumentException(Messages.getString("awt.73")); //$NON-NLS-1$
             }
             remove(index);
         } finally {
@@ -816,7 +819,7 @@
     protected String paramString() {
         toolkit.lockAWT();
         try {
-            return (super.paramString() + ",selected=" + getSelectedItem());
+            return (super.paramString() + ",selected=" + getSelectedItem()); //$NON-NLS-1$
         } finally {
             toolkit.unlockAWT();
         }
@@ -1381,7 +1384,7 @@
 
     @Override
     String autoName() {
-        return ("list" + toolkit.autoNumber.nextList++);
+        return ("list" + toolkit.autoNumber.nextList++); //$NON-NLS-1$
     }
 
     Dimension getMinimumSizeImpl() {
@@ -1407,7 +1410,7 @@
 
     private Dimension getMaxCharSize(Graphics g) {
         FontRenderContext frc = ((Graphics2D) g).getFontRenderContext();
-        return getFont().getStringBounds("W", frc).getBounds().getSize();
+        return getFont().getStringBounds("W", frc).getBounds().getSize(); //$NON-NLS-1$
     }
 
     private void doRepaint(Rectangle r) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Menu.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Menu.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Menu.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Menu.java Thu Nov  2 01:45:21 2006
@@ -25,6 +25,7 @@
 import javax.accessibility.AccessibleContext;
 import javax.accessibility.AccessibleRole;
 import org.apache.harmony.awt.gl.MultiRectArea;
+import org.apache.harmony.awt.internal.nls.Messages;
 import org.apache.harmony.awt.state.MenuState;
 
 public class Menu extends MenuItem implements MenuContainer, Accessible {
@@ -119,7 +120,7 @@
     }
 
     public Menu() throws HeadlessException {
-        this("", false);
+        this("", false); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
         } finally {
@@ -204,10 +205,12 @@
 
     void insertImpl(MenuItem item, int index) {
         if (index < 0) {
-            throw new IllegalArgumentException("Index less than zero");
+            // awt.6F=Index less than zero
+            throw new IllegalArgumentException(Messages.getString("awt.6F")); //$NON-NLS-1$
         }
         if (item == null) {
-            throw new NullPointerException("MenuItem is null");
+            // awt.70=MenuItem is null
+            throw new NullPointerException(Messages.getString("awt.70")); //$NON-NLS-1$
         }
         MenuContainer oldParent = item.getParent();
         if (oldParent != null) {
@@ -225,7 +228,7 @@
     public String paramString() {
         toolkit.lockAWT();
         try {
-            return super.paramString() + (tearOff ? ",tearOff" : "");
+            return super.paramString() + (tearOff ? ",tearOff" : ""); //$NON-NLS-1$ //$NON-NLS-2$
         } finally {
             toolkit.unlockAWT();
         }
@@ -301,7 +304,7 @@
     public void addSeparator() {
         toolkit.lockAWT();
         try {
-            add(new MenuItem("-"));
+            add(new MenuItem("-")); //$NON-NLS-1$
         } finally {
             toolkit.unlockAWT();
         }
@@ -310,7 +313,7 @@
     public void insertSeparator(int index) {
         toolkit.lockAWT();
         try {
-            insert(new MenuItem("-"), index);
+            insert(new MenuItem("-"), index); //$NON-NLS-1$
         } finally {
             toolkit.unlockAWT();
         }
@@ -351,7 +354,8 @@
      */
     void show(int x, int y, boolean modal) {
         if (parent == null) {
-            throw new NullPointerException("Parent is null");
+            // awt.71=Parent is null
+            throw new NullPointerException(Messages.getString("awt.71")); //$NON-NLS-1$
         }
         location.x = x;
         location.y = y;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuComponent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuComponent.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuComponent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuComponent.java Thu Nov  2 01:45:21 2006
@@ -391,7 +391,7 @@
     public String toString() {
         toolkit.lockAWT();
         try {
-            return getClass().getName() + "[" + paramString() + "]";
+            return getClass().getName() + "[" + paramString() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
         } finally {
             toolkit.unlockAWT();
         }
@@ -445,7 +445,7 @@
             toolkit.unlockAWT();
         }
         if (true) {
-            throw new RuntimeException("Method is not implemented"); //TODO: implement
+            throw new RuntimeException("Method is not implemented"); //TODO: implement //$NON-NLS-1$
         }
         return null;
     }
@@ -696,7 +696,7 @@
             i = (forward ? (i + 1) : (i + count - 1)) % count;
             i %= count;
             MenuItem item = getItem(i);
-            if (!"-".equals(item.getLabel())) {
+            if (!"-".equals(item.getLabel())) { //$NON-NLS-1$
                 selectItem(i, showSubMenu);
                 return;
             }
@@ -805,11 +805,11 @@
 
     String autoName() {
         String name = getClass().getName();
-        if (name.indexOf("$") != -1) {
+        if (name.indexOf("$") != -1) { //$NON-NLS-1$
             return null;
         }
         int number = toolkit.autoNumber.nextMenuComponent++;
-        name = name.substring(name.lastIndexOf(".") + 1) + Integer.toString(number);
+        name = name.substring(name.lastIndexOf(".") + 1) + Integer.toString(number); //$NON-NLS-1$
         return name;
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuItem.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuItem.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuItem.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuItem.java Thu Nov  2 01:45:21 2006
@@ -87,7 +87,7 @@
             if (i != 0) {
                 return null;
             }
-            return "click";
+            return "click"; //$NON-NLS-1$
         }
 
         public Number getCurrentAccessibleValue() {
@@ -143,7 +143,7 @@
         }
 
         public String getShortcut() {
-            return (shortcut != null ? shortcut.toString() : "");
+            return (shortcut != null ? shortcut.toString() : ""); //$NON-NLS-1$
         }
 
         public Rectangle getShortcutBounds() {
@@ -160,7 +160,7 @@
 
         public boolean isSeparator() {
             String label = MenuItem.this.getLabel();
-            return label != null && label.equals("-");
+            return label != null && label.equals("-"); //$NON-NLS-1$
         }
 
         public Dimension getMenuSize() {
@@ -188,7 +188,7 @@
     final State itemState = new State();
 
     public MenuItem() throws HeadlessException {
-        this("", null);
+        this("", null); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
         } finally {
@@ -281,15 +281,15 @@
          */
         toolkit.lockAWT();
         try {
-            String result = super.paramString() + ",label=" + label;
+            String result = super.paramString() + ",label=" + label; //$NON-NLS-1$
             if (!enabled) {
-                result += ",disabled";
+                result += ",disabled"; //$NON-NLS-1$
             }
             if (actionCommand != null) {
-                result += ",command=" + actionCommand;
+                result += ",command=" + actionCommand; //$NON-NLS-1$
             }
             if (shortcut != null) {
-                result += ",shortcut=" + shortcut.toString();
+                result += ",shortcut=" + shortcut.toString(); //$NON-NLS-1$
             }
             return result;
         } finally {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuShortcut.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuShortcut.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuShortcut.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuShortcut.java Thu Nov  2 01:45:21 2006
@@ -71,7 +71,7 @@
                 (shiftModifier ? InputEvent.SHIFT_DOWN_MASK : 0);
 
         return KeyEvent.getKeyModifiersText(modifiers) +
-                "+" + KeyEvent.getKeyText(keyCode);
+                "+" + KeyEvent.getKeyText(keyCode); //$NON-NLS-1$
     }
 
     public int getKey() {
@@ -86,9 +86,9 @@
          * System.out.println(obj.toString());
          */
 
-        String str = "key=" + keyCode;
+        String str = "key=" + keyCode; //$NON-NLS-1$
         if (shiftModifier) {
-            str += ",usesShiftModifier";
+            str += ",usesShiftModifier"; //$NON-NLS-1$
         }
         return str;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java Thu Nov  2 01:45:21 2006
@@ -322,7 +322,7 @@
                                      Point where) {
 
         Integer scrollAmountProperty =
-            (Integer)toolkit.getDesktopProperty("awt.wheelScrollingSize");
+            (Integer)toolkit.getDesktopProperty("awt.wheelScrollingSize"); //$NON-NLS-1$
         int amount = 1;
         int type = MouseWheelEvent.WHEEL_UNIT_SCROLL;
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseInfo.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseInfo.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseInfo.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseInfo.java Thu Nov  2 01:45:21 2006
@@ -35,7 +35,7 @@
         Toolkit.checkHeadless();
         SecurityManager secMan = System.getSecurityManager();
         if (secMan != null) {
-            secMan.checkPermission(new AWTPermission("watchMousePointer"));
+            secMan.checkPermission(new AWTPermission("watchMousePointer")); //$NON-NLS-1$
         }
         Toolkit toolkit = Toolkit.getDefaultToolkit();
         Point location = toolkit.getNativeMouseInfo().getLocation();



Mime
View raw message