harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r470296 [1/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
Author: hindessm
Date: Thu Nov  2 01:45:21 2006
New Revision: 470296

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

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTEventMulticaster.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTKeyStroke.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AlphaComposite.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BasicStroke.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BorderLayout.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Button.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Canvas.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CardLayout.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Checkbox.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CheckboxGroup.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CheckboxMenuItem.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Choice.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Color.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ComponentOrientation.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Container.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ContainerOrderFocusTraversalPolicy.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Cursor.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dialog.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dimension.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dispatcher.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Event.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventDispatchThread.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueueCore.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueueThread.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FileDialog.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FlowLayout.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Font.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/FontMetrics.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Frame.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GradientPaint.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Graphics.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsConfiguration.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsDevice.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridBagConstraints.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridBagLayout.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GridLayout.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Insets.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/JobAttributes.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/KeyboardFocusManager.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Label.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/List.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Menu.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuComponent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuItem.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuShortcut.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseInfo.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PageAttributes.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Panel.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Point.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Polygon.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PopupMenu.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Rectangle.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/RenderingHints.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Robot.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ScrollPane.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ScrollPaneAdjustable.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Scrollbar.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/SystemColor.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextArea.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextComponent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextField.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TexturePaint.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Toolkit.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Window.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/AWTEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTEvent.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTEvent.java Thu Nov  2 01:45:21 2006
@@ -193,21 +193,21 @@
          * AWTEvent event = new AWTEvent(new Component(){}, 1){};
          * System.out.println(event);
          */
-        String name = "";
+        String name = ""; //$NON-NLS-1$
         if (source instanceof Component && (source != null)) {
             Component comp = (Component) getSource();
             name = comp.getName();
             if (name == null) {
-                name = "";
+                name = ""; //$NON-NLS-1$
             }
         }
-        return (getClass().getName() + "[" + paramString() + "]"
-                + " on " + (name.length() > 0 ? name : source));
+        return (getClass().getName() + "[" + paramString() + "]" //$NON-NLS-1$ //$NON-NLS-2$
+                + " on " + (name.length() > 0 ? name : source)); //$NON-NLS-1$
     }
 
     public String paramString() {
         //nothing to implement: all event types must override this method
-        return "";
+        return ""; //$NON-NLS-1$
     }
 
     protected boolean isConsumed() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTEventMulticaster.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTEventMulticaster.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTEventMulticaster.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTEventMulticaster.java Thu Nov  2 01:45:21 2006
@@ -53,6 +53,8 @@
 import java.util.EventListener;
 import java.util.LinkedList;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class AWTEventMulticaster implements ComponentListener, ContainerListener,
         FocusListener, KeyListener, MouseListener, MouseMotionListener, WindowListener,
         WindowFocusListener, WindowStateListener, ActionListener, ItemListener,
@@ -255,7 +257,8 @@
     }
 
     protected AWTEventMulticaster(EventListener a, EventListener b) {
-        assert (a != null) && (b != null) : "Input parameters a and b should not be null";
+        // awt.74=Input parameters a and b should not be null
+        assert (a != null) && (b != null) : Messages.getString("awt.74"); //$NON-NLS-1$
 
         this.a = a;
         this.b = b;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTKeyStroke.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTKeyStroke.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTKeyStroke.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AWTKeyStroke.java Thu Nov  2 01:45:21 2006
@@ -30,6 +30,8 @@
 import java.util.NoSuchElementException;
 import java.util.StringTokenizer;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class AWTKeyStroke implements Serializable {
     private static final long serialVersionUID = -6430539691155161871L;
 
@@ -38,9 +40,9 @@
     private static Constructor<?> subConstructor;
     
     static {
-        keyEventTypesMap.put(new Integer(KeyEvent.KEY_PRESSED), "pressed");
-        keyEventTypesMap.put(new Integer(KeyEvent.KEY_RELEASED), "released");
-        keyEventTypesMap.put(new Integer(KeyEvent.KEY_TYPED), "typed");
+        keyEventTypesMap.put(new Integer(KeyEvent.KEY_PRESSED), "pressed"); //$NON-NLS-1$
+        keyEventTypesMap.put(new Integer(KeyEvent.KEY_RELEASED), "released"); //$NON-NLS-1$
+        keyEventTypesMap.put(new Integer(KeyEvent.KEY_TYPED), "typed"); //$NON-NLS-1$
     }
 
     private char keyChar;
@@ -90,8 +92,8 @@
     @Override
     public String toString() {
         int type = getKeyEventType();
-        return InputEvent.getModifiersExText(getModifiers()) + " " +
-            keyEventTypesMap.get(new Integer(type)) +  " " +
+        return InputEvent.getModifiersExText(getModifiers()) + " " + //$NON-NLS-1$
+            keyEventTypesMap.get(new Integer(type)) +  " " + //$NON-NLS-1$
             (type == KeyEvent.KEY_TYPED ? new String(new char[] {keyChar}) :
                                           KeyEvent.getKeyText(keyCode));
     }
@@ -164,7 +166,8 @@
 
     public static AWTKeyStroke getAWTKeyStroke(String s) {
         if (s == null) {
-            throw new IllegalArgumentException("null argument");
+            // awt.65=null argument
+            throw new IllegalArgumentException(Messages.getString("awt.65")); //$NON-NLS-1$
         }
 
         StringTokenizer tokenizer = new StringTokenizer(s);
@@ -197,7 +200,8 @@
             keyCode = parseKey(token);
         }
         if (tokenizer.hasMoreTokens()) {
-            throw new IllegalArgumentException("Invalid format");
+            // awt.66=Invalid format
+            throw new IllegalArgumentException(Messages.getString("awt.66")); //$NON-NLS-1$
         }
 
         return getAWTKeyStroke(keyChar, keyCode, modifiers,
@@ -208,17 +212,19 @@
         try {
             return tokenizer.nextToken();
         } catch (NoSuchElementException exception) {
-            throw new IllegalArgumentException("Invalid format");
+            // awt.66=Invalid format
+            throw new IllegalArgumentException(Messages.getString("awt.66")); //$NON-NLS-1$
         }
     }
 
     static int getKeyCode(String s) {
         try {
-            Field vk = KeyEvent.class.getField("VK_" + s);
+            Field vk = KeyEvent.class.getField("VK_" + s); //$NON-NLS-1$
             return vk.getInt(null);
         } catch (Exception e) {
             if (s.length() != 1) {
-                throw new IllegalArgumentException("Invalid format");
+                // awt.66=Invalid format
+                throw new IllegalArgumentException(Messages.getString("awt.66")); //$NON-NLS-1$
             }
             return KeyEvent.VK_UNDEFINED;
         }
@@ -236,7 +242,8 @@
 
     public static AWTKeyStroke getAWTKeyStroke(Character keyChar, int modifiers) {
         if (keyChar == null) {
-            throw new IllegalArgumentException("keyChar cannot be null");
+            // awt.01='{0}' parameter is null
+            throw new IllegalArgumentException(Messages.getString("awt.01", "keyChar")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         return getAWTKeyStroke(keyChar.charValue(), KeyEvent.VK_UNDEFINED,
                                modifiers, false);
@@ -275,10 +282,12 @@
 
     protected static void registerSubclass(Class<?> subclass) {
         if (subclass == null) {
-            throw new IllegalArgumentException("subclass cannot be null");
+            // awt.01='{0}' parameter is null
+            throw new IllegalArgumentException(Messages.getString("awt.01", "subclass")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         if (! AWTKeyStroke.class.isAssignableFrom(subclass)) {
-            throw new ClassCastException("subclass is not derived from AWTKeyStroke");
+            // awt.67=subclass is not derived from AWTKeyStroke
+            throw new ClassCastException(Messages.getString("awt.67")); //$NON-NLS-1$
         }
         try {
             subConstructor = subclass.getDeclaredConstructor();
@@ -286,35 +295,36 @@
         } catch (SecurityException e) {
             throw new RuntimeException(e);
         } catch (NoSuchMethodException e) {
-            throw new IllegalArgumentException("subclass could not be instantiated");
+            // awt.68=subclass could not be instantiated
+            throw new IllegalArgumentException(Messages.getString("awt.68")); //$NON-NLS-1$
         }
         cache.clear(); //flush the cache
     }
 
     private static long parseModifier(String strMod) {
         long modifiers = 0l;
-        if (strMod.equals("shift")) {
+        if (strMod.equals("shift")) { //$NON-NLS-1$
             modifiers |= InputEvent.SHIFT_DOWN_MASK;
-        } else if (strMod.equals("control") || strMod.equals("ctrl")) {
+        } else if (strMod.equals("control") || strMod.equals("ctrl")) { //$NON-NLS-1$ //$NON-NLS-2$
             modifiers |= InputEvent.CTRL_DOWN_MASK;
-        } else if (strMod.equals("meta")) {
+        } else if (strMod.equals("meta")) { //$NON-NLS-1$
             modifiers |= InputEvent.META_DOWN_MASK;
-        } else if (strMod.equals("alt")) {
+        } else if (strMod.equals("alt")) { //$NON-NLS-1$
             modifiers |= InputEvent.ALT_DOWN_MASK;
-        } else if (strMod.equals("altGraph")) {
+        } else if (strMod.equals("altGraph")) { //$NON-NLS-1$
             modifiers |= InputEvent.ALT_GRAPH_DOWN_MASK;
-        } else if (strMod.equals("button1")) {
+        } else if (strMod.equals("button1")) { //$NON-NLS-1$
             modifiers |= InputEvent.BUTTON1_DOWN_MASK;
-        } else if (strMod.equals("button2")) {
+        } else if (strMod.equals("button2")) { //$NON-NLS-1$
             modifiers |= InputEvent.BUTTON2_DOWN_MASK;
-        } else if (strMod.equals("button3")) {
+        } else if (strMod.equals("button3")) { //$NON-NLS-1$
             modifiers |= InputEvent.BUTTON3_DOWN_MASK;
         }
         return modifiers;
     }
 
     private static boolean parseTypedID(String strTyped) {
-        if (strTyped.equals("typed")) {
+        if (strTyped.equals("typed")) { //$NON-NLS-1$
             return true;
         }
 
@@ -325,7 +335,8 @@
         char keyChar = KeyEvent.CHAR_UNDEFINED;
 
         if (strChar.length() != 1) {
-            throw new IllegalArgumentException("Invalid format");
+            // awt.66=Invalid format
+            throw new IllegalArgumentException(Messages.getString("awt.66")); //$NON-NLS-1$
         }
         keyChar = strChar.charAt(0);
         return keyChar;
@@ -333,9 +344,9 @@
 
     private static Boolean parsePressedReleasedID(String str) {
 
-        if (str.equals("pressed")) {
+        if (str.equals("pressed")) { //$NON-NLS-1$
             return Boolean.FALSE;
-        } else if (str.equals("released")) {
+        } else if (str.equals("released")) { //$NON-NLS-1$
             return Boolean.TRUE;
         }
         return null;
@@ -347,7 +358,8 @@
         keyCode = getKeyCode(strCode);
 
         if (keyCode == KeyEvent.VK_UNDEFINED) {
-            throw new IllegalArgumentException("Invalid format");
+            // awt.66=Invalid format
+            throw new IllegalArgumentException(Messages.getString("awt.66")); //$NON-NLS-1$
         }
         return keyCode;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AlphaComposite.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AlphaComposite.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AlphaComposite.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/AlphaComposite.java Thu Nov  2 01:45:21 2006
@@ -26,6 +26,7 @@
 import java.awt.image.ColorModel;
 
 import org.apache.harmony.awt.gl.ICompositeContext;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 
 public final class AlphaComposite implements Composite {
@@ -83,10 +84,12 @@
 
     private AlphaComposite(int rule, float alpha){
         if(rule < CLEAR || rule > XOR) {
-            throw new IllegalArgumentException("Unknown rule");
+            // awt.11D=Unknown rule
+            throw new IllegalArgumentException(Messages.getString("awt.11D")); //$NON-NLS-1$
         }
         if(alpha < 0.0f || alpha > 1.0f) {
-            throw new IllegalArgumentException("Wrong alpha value");
+            // awt.11E=Wrong alpha value
+            throw new IllegalArgumentException(Messages.getString("awt.11E")); //$NON-NLS-1$
         }
 
         this.rule = rule;
@@ -163,7 +166,8 @@
         case XOR:
             return Xor;
         default:
-            throw new IllegalArgumentException("Unknown rule");
+            // awt.11D=Unknown rule
+            throw new IllegalArgumentException(Messages.getString("awt.11D")); //$NON-NLS-1$
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BasicStroke.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BasicStroke.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BasicStroke.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BasicStroke.java Thu Nov  2 01:45:21 2006
@@ -23,6 +23,7 @@
 import java.awt.geom.GeneralPath;
 import java.awt.geom.PathIterator;
 
+import org.apache.harmony.awt.internal.nls.Messages;
 import org.apache.harmony.misc.HashCode;
 
 public class BasicStroke implements Stroke {
@@ -109,34 +110,42 @@
 
     public BasicStroke(float width, int cap, int join, float miterLimit, float[] dash, float dashPhase) {
         if (width < 0.0f) {
-            throw new IllegalArgumentException("Negative width");
+            // awt.133=Negative width
+            throw new IllegalArgumentException(Messages.getString("awt.133")); //$NON-NLS-1$
         }
         if (cap != CAP_BUTT && cap != CAP_ROUND && cap != CAP_SQUARE) {
-            throw new IllegalArgumentException("Illegal cap");
+            // awt.134=Illegal cap
+            throw new IllegalArgumentException(Messages.getString("awt.134")); //$NON-NLS-1$
         }
         if (join != JOIN_MITER && join != JOIN_ROUND && join != JOIN_BEVEL) {
-            throw new IllegalArgumentException("Illegal join");
+            // awt.135=Illegal join
+            throw new IllegalArgumentException(Messages.getString("awt.135")); //$NON-NLS-1$
         }
         if (join == JOIN_MITER && miterLimit < 1.0f) {
-            throw new IllegalArgumentException("miterLimit less than 1.0f");
+            // awt.136=miterLimit less than 1.0f
+            throw new IllegalArgumentException(Messages.getString("awt.136")); //$NON-NLS-1$
         }
         if (dash != null) {
             if (dashPhase < 0.0f) {
-                throw new IllegalArgumentException("Negative dashPhase");
+                // awt.137=Negative dashPhase
+                throw new IllegalArgumentException(Messages.getString("awt.137")); //$NON-NLS-1$
             }
             if (dash.length == 0) {
-                throw new IllegalArgumentException("Zero dash length");
+                // awt.138=Zero dash length
+                throw new IllegalArgumentException(Messages.getString("awt.138")); //$NON-NLS-1$
             }
             ZERO: {
                 for(int i = 0; i < dash.length; i++) {
                     if (dash[i] < 0.0) {
-                        throw new IllegalArgumentException("Negative dash[" + i + "]");
+                        // awt.139=Negative dash[{0}]
+                        throw new IllegalArgumentException(Messages.getString("awt.139", i)); //$NON-NLS-1$
                     }
                     if (dash[i] > 0.0) {
                         break ZERO;
                     }
                 }
-                throw new IllegalArgumentException("All dash lengths zero");
+                // awt.13A=All dash lengths zero
+                throw new IllegalArgumentException(Messages.getString("awt.13A")); //$NON-NLS-1$
             }
         }
         this.width = width;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BorderLayout.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BorderLayout.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BorderLayout.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BorderLayout.java Thu Nov  2 01:45:21 2006
@@ -31,24 +31,25 @@
 import java.util.Set;
 
 import org.apache.harmony.awt.FieldsAccessor;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 
 public class BorderLayout implements LayoutManager2, Serializable {
     private static final long serialVersionUID = -8658291919501921765L;
 
-    public static final String BEFORE_LINE_BEGINS = "Before";
-    public static final String BEFORE_FIRST_LINE = "First";
-    public static final String AFTER_LINE_ENDS = "After";
-    public static final String AFTER_LAST_LINE = "Last";
-    public static final String LINE_START = "Before";
-    public static final String PAGE_START = "First";
-    public static final String LINE_END = "After";
-    public static final String PAGE_END = "Last";
-    public static final String CENTER = "Center";
-    public static final String NORTH = "North";
-    public static final String SOUTH = "South";
-    public static final String EAST = "East";
-    public static final String WEST = "West";
+    public static final String BEFORE_LINE_BEGINS = "Before"; //$NON-NLS-1$
+    public static final String BEFORE_FIRST_LINE = "First"; //$NON-NLS-1$
+    public static final String AFTER_LINE_ENDS = "After"; //$NON-NLS-1$
+    public static final String AFTER_LAST_LINE = "Last"; //$NON-NLS-1$
+    public static final String LINE_START = "Before"; //$NON-NLS-1$
+    public static final String PAGE_START = "First"; //$NON-NLS-1$
+    public static final String LINE_END = "After"; //$NON-NLS-1$
+    public static final String PAGE_END = "Last"; //$NON-NLS-1$
+    public static final String CENTER = "Center"; //$NON-NLS-1$
+    public static final String NORTH = "North"; //$NON-NLS-1$
+    public static final String SOUTH = "South"; //$NON-NLS-1$
+    public static final String EAST = "East"; //$NON-NLS-1$
+    public static final String WEST = "West"; //$NON-NLS-1$
 
     private static final Set<String> supportedConstraints = new HashSet<String>();
 
@@ -141,7 +142,8 @@
             } else {
                 cons = name;
                 if (!supportedConstraints.contains(cons)) {
-                    throw new IllegalArgumentException("Unsupported constraints object: " + cons);
+                    // awt.91=Unsupported constraints object: {0}
+                    throw new IllegalArgumentException(Messages.getString("awt.91", cons)); //$NON-NLS-1$
                 }
             }
 
@@ -173,7 +175,8 @@
             if ((constraints == null) || (constraints instanceof String)) {
                 addLayoutComponent((String) constraints, comp);
             } else {
-                throw new IllegalArgumentException("Constraints object must be String");
+                // awt.92=Constraints object must be String
+                throw new IllegalArgumentException(Messages.getString("awt.92")); //$NON-NLS-1$
             }
         } finally {
             toolkit.unlockAWT();
@@ -198,7 +201,8 @@
         try {
             if (!supportedConstraints.contains(constraints)) {
                 throw new IllegalArgumentException(
-                        "Unsupported constraints object: " + constraints);
+                        // awt.91=Unsupported constraints object: {0}
+                        Messages.getString("awt.91", constraints)); //$NON-NLS-1$
             }
 
             return constraints2Components.get(constraints);
@@ -220,8 +224,9 @@
         } else if (CENTER.equals(constraints)) {
             return constraints2Components.get(CENTER);
         }
-        throw new IllegalArgumentException("cannot get component: " +
-                                           "invalid constraint: " + constraints);
+        // awt.93=cannot get component: invalid constraint: {0}
+        throw new IllegalArgumentException(Messages.getString("awt.93", //$NON-NLS-1$
+                                           constraints));
     }
 
     private Component getComponent(Object relCons, Object absCons) {
@@ -356,7 +361,7 @@
 
         toolkit.lockAWT();
         try {
-            return getClass().getName() + "[hgap=" + hGap + ",vgap=" + vGap + "]";
+            return getClass().getName() + "[hgap=" + hGap + ",vgap=" + vGap + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         } finally {
             toolkit.unlockAWT();
         }
@@ -519,7 +524,7 @@
         stream.defaultReadObject();
 
         FieldsAccessor accessor = new FieldsAccessor(BorderLayout.class, this);
-        accessor.set("toolkit", Toolkit.getDefaultToolkit());
+        accessor.set("toolkit", Toolkit.getDefaultToolkit()); //$NON-NLS-1$
     }
 
     private void forgetComponent(Component comp, Object cons) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Button.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Button.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Button.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Button.java Thu Nov  2 01:45:21 2006
@@ -48,7 +48,7 @@
 
         public String getAccessibleActionDescription(int i) {
             if (i == 0) {
-                return "click";
+                return "click"; //$NON-NLS-1$
             }
             return null;
         }
@@ -155,7 +155,7 @@
     }
 
     public Button() throws HeadlessException {
-        this("");
+        this(""); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
         } finally {
@@ -274,8 +274,8 @@
     protected String paramString() {
         toolkit.lockAWT();
         try {
-            return (super.paramString() + ",label=" + label + "," + (stateController
-                    .isPressed() ? "pressed" : "unpressed"));
+            return (super.paramString() + ",label=" + label + "," + (stateController //$NON-NLS-1$ //$NON-NLS-2$
+                    .isPressed() ? "pressed" : "unpressed")); //$NON-NLS-1$ //$NON-NLS-2$
         } finally {
             toolkit.unlockAWT();
         }
@@ -312,7 +312,7 @@
 
     @Override
     String autoName() {
-        return ("button" + Integer.toString(toolkit.autoNumber.nextButton++));
+        return ("button" + Integer.toString(toolkit.autoNumber.nextButton++)); //$NON-NLS-1$
     }
 
     @Override
@@ -359,8 +359,8 @@
             ClassNotFoundException {
         stream.defaultReadObject();
         FieldsAccessor accessor = new FieldsAccessor(Button.class, this);
-        accessor.set("stateController", createStateController());
-        accessor.set("state", new State());
+        accessor.set("stateController", createStateController()); //$NON-NLS-1$
+        accessor.set("state", new State()); //$NON-NLS-1$
     }
 
     @Override

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Canvas.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Canvas.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Canvas.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Canvas.java Thu Nov  2 01:45:21 2006
@@ -81,7 +81,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;
     }
@@ -93,7 +93,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;
     }
@@ -110,7 +110,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;
     }
@@ -132,7 +132,7 @@
 
     @Override
     String autoName() {
-        return ("canvas" + toolkit.autoNumber.nextCanvas++);
+        return ("canvas" + toolkit.autoNumber.nextCanvas++); //$NON-NLS-1$
     }
 
     @Override

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CardLayout.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CardLayout.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CardLayout.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CardLayout.java Thu Nov  2 01:45:21 2006
@@ -23,6 +23,8 @@
 import java.io.Serializable;
 import java.util.Hashtable;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class CardLayout implements LayoutManager2, Serializable {
     private static final long serialVersionUID = -4328196481005934313L;
 
@@ -69,7 +71,7 @@
 
         toolkit.lockAWT();
         try {
-            return getClass().getName() + "[hgap=" + hGap + ",vgap=" +vGap + "]";
+            return getClass().getName() + "[hgap=" + hGap + ",vgap=" +vGap + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         } finally {
             toolkit.unlockAWT();
         }
@@ -158,8 +160,8 @@
         toolkit.lockAWT();
         try {
             if (!String.class.isInstance(constraints)) {
-                throw new IllegalArgumentException(
-                        "AddLayoutComponent: constraint object must be String");
+                // awt.131=AddLayoutComponent: constraint object must be String
+                throw new IllegalArgumentException(Messages.getString("awt.131")); //$NON-NLS-1$
             }
             addLayoutComponent((String) constraints, comp);
         } finally {
@@ -260,7 +262,8 @@
 
     private void check(Container parent) {
         if (parent.getLayout() != this) {
-            throw new IllegalArgumentException("wrong parent for CardLayout");
+            // awt.132=wrong parent for CardLayout
+            throw new IllegalArgumentException(Messages.getString("awt.132")); //$NON-NLS-1$
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Checkbox.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Checkbox.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Checkbox.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Checkbox.java Thu Nov  2 01:45:21 2006
@@ -261,7 +261,7 @@
          */
         toolkit.lockAWT();
         try {
-            return super.paramString() + ",label=" + label + ",state=" + checked;
+            return super.paramString() + ",label=" + label + ",state=" + checked; //$NON-NLS-1$ //$NON-NLS-2$
         } finally {
             toolkit.unlockAWT();
         }
@@ -443,7 +443,7 @@
 
     @Override
     String autoName() {
-        return ("checkbox" + toolkit.autoNumber.nextCheckBox++);
+        return ("checkbox" + toolkit.autoNumber.nextCheckBox++); //$NON-NLS-1$
     }
 
     @Override
@@ -477,8 +477,8 @@
             ClassNotFoundException {
         stream.defaultReadObject();
         FieldsAccessor accessor = new FieldsAccessor(Button.class, this);
-        accessor.set("stateController", createStateController());
-        accessor.set("state", new State());
+        accessor.set("stateController", createStateController()); //$NON-NLS-1$
+        accessor.set("state", new State()); //$NON-NLS-1$
     }
 
     @Override

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CheckboxGroup.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CheckboxGroup.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CheckboxGroup.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CheckboxGroup.java Thu Nov  2 01:45:21 2006
@@ -46,8 +46,8 @@
 
         toolkit.lockAWT();
         try {
-            return (getClass().getName() + "[" +
-                    "selectedCheckbox=" + current + "]");
+            return (getClass().getName() + "[" + //$NON-NLS-1$
+                    "selectedCheckbox=" + current + "]"); //$NON-NLS-1$ //$NON-NLS-2$
         } finally {
             toolkit.unlockAWT();
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CheckboxMenuItem.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CheckboxMenuItem.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CheckboxMenuItem.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/CheckboxMenuItem.java Thu Nov  2 01:45:21 2006
@@ -146,7 +146,7 @@
          */
         toolkit.lockAWT();
         try {
-            return super.paramString() + (checked ? ",checked" : "");
+            return super.paramString() + (checked ? ",checked" : ""); //$NON-NLS-1$ //$NON-NLS-2$
         } finally {
             toolkit.unlockAWT();
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Choice.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Choice.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Choice.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Choice.java Thu Nov  2 01:45:21 2006
@@ -36,6 +36,7 @@
 
 import org.apache.harmony.awt.ButtonStateController;
 import org.apache.harmony.awt.ChoiceStyle;
+import org.apache.harmony.awt.internal.nls.Messages;
 import org.apache.harmony.awt.state.ChoiceState;
 
 public class Choice extends Component implements ItemSelectable, Accessible {
@@ -277,7 +278,8 @@
         toolkit.lockAWT();
         try {
             if (item == null) {
-                throw new NullPointerException("item is null");
+                // awt.103=item is null
+                throw new NullPointerException(Messages.getString("awt.103")); //$NON-NLS-1$
             }
             if (items.size() == 0) {
                 selectedIndex = 0;
@@ -294,7 +296,8 @@
         try {
             int index = items.indexOf(item);
             if (index == -1) {
-                throw new IllegalArgumentException("item doesn't exist in the choice menu");
+                // awt.104=item doesn't exist in the choice menu
+                throw new IllegalArgumentException(Messages.getString("awt.104")); //$NON-NLS-1$
             }
             if (selectedIndex == index) {
                 selectedIndex = 0;
@@ -342,7 +345,8 @@
         toolkit.lockAWT();
         try {
             if (index < 0) {
-                throw new IllegalArgumentException("index less than zero");
+                // awt.105=index less than zero
+                throw new IllegalArgumentException(Messages.getString("awt.105")); //$NON-NLS-1$
             }
             int idx = Math.min(items.size(), index);
             if (items.size() == 0) {
@@ -387,7 +391,7 @@
 
         toolkit.lockAWT();
         try {
-            return (super.paramString() + ",current=" + getSelectedItem());
+            return (super.paramString() + ",current=" + getSelectedItem()); //$NON-NLS-1$
         } finally {
             toolkit.unlockAWT();
         }
@@ -470,8 +474,8 @@
         toolkit.lockAWT();
         try {
             if (pos >= items.size() || pos < 0) {
-                throw new IllegalArgumentException(
-                        "specified position is greater than the number of items");
+                // awt.106=specified position is greater than the number of items
+                throw new IllegalArgumentException(Messages.getString("awt.106")); //$NON-NLS-1$
             }
             selectedIndex = pos;
             repaint();
@@ -541,7 +545,7 @@
 
     @Override
     String autoName() {
-        return ("choice" + toolkit.autoNumber.nextChoice++);
+        return ("choice" + toolkit.autoNumber.nextChoice++); //$NON-NLS-1$
     }
 
     /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Color.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Color.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Color.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Color.java Thu Nov  2 01:45:21 2006
@@ -30,6 +30,8 @@
 import java.io.Serializable;
 import java.util.Arrays;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class Color implements Paint, Serializable {
     private static final long serialVersionUID = 118526816881161077L;
 
@@ -144,16 +146,16 @@
         for(int i=0 ; i<nComps; i++) {
             comp = components[i];
             if(comp < 0.0f || comp > 1.0f) {
+                // awt.107=Color parameter outside of expected range: component {0}.
                 throw new IllegalArgumentException(
-                        "Color parameter outside of expected range: " +
-                        "component " + i + ".");
+                        Messages.getString("awt.107", i)); //$NON-NLS-1$
             }
             fvalue[i] = components[i];
         }
 
         if (alpha < 0.0f || alpha > 1.0f) {
-            throw new IllegalArgumentException(
-                    "Alpha value outside of expected range.");
+            // awt.108=Alpha value outside of expected range.
+            throw new IllegalArgumentException(Messages.getString("awt.108")); //$NON-NLS-1$
         }
         falpha = alpha;
 
@@ -177,14 +179,16 @@
 
     public Color(int r, int g, int b, int a) {
         if ((r & 0xFF) != r || (g & 0xFF) != g || (b & 0xFF) != b || (a & 0xFF) != a) {
-            throw new IllegalArgumentException("Color parameter outside of expected range.");
+            // awt.109=Color parameter outside of expected range.
+            throw new IllegalArgumentException(Messages.getString("awt.109")); //$NON-NLS-1$
         }
         value = b | (g << 8) | (r << 16) | (a << 24);
     }
 
     public Color(int r, int g, int b) {
         if ((r & 0xFF) != r || (g & 0xFF) != g || (b & 0xFF) != b) {
-            throw new IllegalArgumentException("Color parameter outside of expected range.");
+            // awt.109=Color parameter outside of expected range.
+            throw new IllegalArgumentException(Messages.getString("awt.109")); //$NON-NLS-1$
         }
         // 0xFF for alpha channel
         value = b | (g << 8) | (r << 16) | 0xFF000000;
@@ -236,10 +240,10 @@
         */
         
         return getClass().getName() +
-                "[r=" + getRed() +
-                ",g=" + getGreen() +
-                ",b=" + getBlue() +
-                "]";
+                "[r=" + getRed() + //$NON-NLS-1$
+                ",g=" + getGreen() + //$NON-NLS-1$
+                ",b=" + getBlue() + //$NON-NLS-1$
+                "]"; //$NON-NLS-1$
     }
 
     @Override

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java Thu Nov  2 01:45:21 2006
@@ -78,6 +78,7 @@
 import org.apache.harmony.awt.ClipRegion;
 import org.apache.harmony.awt.FieldsAccessor;
 import org.apache.harmony.awt.gl.MultiRectArea;
+import org.apache.harmony.awt.internal.nls.Messages;
 import org.apache.harmony.awt.state.State;
 import org.apache.harmony.awt.text.TextFieldKit;
 import org.apache.harmony.awt.text.TextKit;
@@ -566,14 +567,14 @@
 
         protected BltBufferStrategy(int numBuffers, BufferCapabilities caps) {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
         }
 
         @Override
         public boolean contentsLost() {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
             return false;
         }
@@ -581,14 +582,14 @@
         @Override
         public boolean contentsRestored() {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
             return false;
         }
 
         protected void createBackBuffers(int numBuffers) {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
         }
 
@@ -600,21 +601,21 @@
         @Override
         public Graphics getDrawGraphics() {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
             return null;
         }
 
         protected void revalidate() {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
         }
 
         @Override
         public void show() {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
         }
     }
@@ -633,7 +634,8 @@
         protected FlipBufferStrategy(int numBuffers, BufferCapabilities caps)
                 throws AWTException {
             if (!(Component.this instanceof Window) && !(Component.this instanceof Canvas)) {
-                throw new ClassCastException("OnlyCanvas or Window is allowed");
+                // awt.14B=Only Canvas or Window is allowed
+                throw new ClassCastException(Messages.getString("awt.14B")); //$NON-NLS-1$
             }
             // TODO: throw new AWTException("Capabilities are not supported");
             this.numBuffers = numBuffers;
@@ -643,7 +645,7 @@
         @Override
         public boolean contentsLost() {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
             return false;
         }
@@ -651,7 +653,7 @@
         @Override
         public boolean contentsRestored() {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
             return false;
         }
@@ -659,36 +661,38 @@
         protected void createBuffers(int numBuffers, BufferCapabilities caps)
                 throws AWTException {
             if (numBuffers < 2) {
-                throw new IllegalArgumentException("Number of buffers must be greater than one");
+                // awt.14C=Number of buffers must be greater than one
+                throw new IllegalArgumentException(Messages.getString("awt.14C")); //$NON-NLS-1$
             }
             if (!caps.isPageFlipping()) {
-                throw new IllegalArgumentException(
-                        "Buffer capabilities should support flipping");
+                // awt.14D=Buffer capabilities should support flipping
+                throw new IllegalArgumentException(Messages.getString("awt.14D")); //$NON-NLS-1$
             }
             if (!Component.this.behaviour.isDisplayable()) {
-                throw new IllegalStateException("Component should be displayable");
+                // awt.14E=Component should be displayable
+                throw new IllegalStateException(Messages.getString("awt.14E")); //$NON-NLS-1$
             }
             // TODO: throw new AWTException("Capabilities are not supported");
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
         }
 
         protected void destroyBuffers() {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
         }
 
         protected void flip(BufferCapabilities.FlipContents flipAction) {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
         }
 
         protected Image getBackBuffer() {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
             return null;
         }
@@ -701,21 +705,21 @@
         @Override
         public Graphics getDrawGraphics() {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
             return null;
         }
 
         protected void revalidate() {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
         }
 
         @Override
         public void show() {
             if (true) {
-                throw new RuntimeException("Method is not implemented");
+                throw new RuntimeException("Method is not implemented"); //$NON-NLS-1$
             }
         }
     }
@@ -941,8 +945,8 @@
         PrivilegedAction<String[]> action = new PrivilegedAction<String[]>() {
             public String[] run() {
                 String properties[] = new String[2];
-                properties[0] = System.getProperty("awt.image.redrawrate", "100");
-                properties[1] = System.getProperty("awt.image.incrementaldraw", "true");
+                properties[0] = System.getProperty("awt.image.redrawrate", "100"); //$NON-NLS-1$ //$NON-NLS-2$
+                properties[1] = System.getProperty("awt.image.incrementaldraw", "true"); //$NON-NLS-1$ //$NON-NLS-2$
                 return properties;
             }
         };
@@ -956,7 +960,7 @@
         // } catch (NumberFormatException e) {
         // rate = 100;
         // }
-        incrementalImageUpdate = properties[1].equals("true");
+        incrementalImageUpdate = properties[1].equals("true"); //$NON-NLS-1$
     }
 
     protected Component() {
@@ -990,9 +994,9 @@
                 Method coalesceMethod = null;
                 for (Class<?> c = thisClass; c != Component.class; c = c.getSuperclass()) {
                     try {
-                        coalesceMethod = c.getDeclaredMethod("coalesceEvents", new Class[] {
-                                Class.forName("java.awt.AWTEvent"),
-                                Class.forName("java.awt.AWTEvent") });
+                        coalesceMethod = c.getDeclaredMethod("coalesceEvents", new Class[] { //$NON-NLS-1$
+                                Class.forName("java.awt.AWTEvent"), //$NON-NLS-1$
+                                Class.forName("java.awt.AWTEvent") }); //$NON-NLS-1$
                     } catch (Exception e) {
                     }
                     if (coalesceMethod != null) {
@@ -1023,7 +1027,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("name", oldName, name);
+        firePropertyChange("name", oldName, name); //$NON-NLS-1$
     }
 
     public String getName() {
@@ -1040,11 +1044,11 @@
 
     String autoName() {
         String name = getClass().getName();
-        if (name.indexOf("$") != -1) {
+        if (name.indexOf("$") != -1) { //$NON-NLS-1$
             return null;
         }
         int number = toolkit.autoNumber.nextComponent++;
-        name = name.substring(name.lastIndexOf(".") + 1) + Integer.toString(number);
+        name = name.substring(name.lastIndexOf(".") + 1) + Integer.toString(number); //$NON-NLS-1$
         return name;
     }
 
@@ -1059,7 +1063,7 @@
          */
         toolkit.lockAWT();
         try {
-            return getClass().getName() + "[" + paramString() + "]";
+            return getClass().getName() + "[" + paramString() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
         } finally {
             toolkit.unlockAWT();
         }
@@ -1480,7 +1484,8 @@
             if (traversalKeys.containsKey(Id)) {
                 return traversalKeys.get(Id) != null;
             }
-            throw new IllegalArgumentException("invalid focus traversal key identifier");
+            // awt.14F=invalid focus traversal key identifier
+            throw new IllegalArgumentException(Messages.getString("awt.14F")); //$NON-NLS-1$
         } finally {
             toolkit.unlockAWT();
         }
@@ -1941,7 +1946,8 @@
                     if (this instanceof Window) {
                         return Locale.getDefault();
                     }
-                    throw new IllegalComponentStateException("no parent");
+                    // awt.150=no parent
+                    throw new IllegalComponentStateException(Messages.getString("awt.150")); //$NON-NLS-1$
                 }
                 return getParent().getLocale();
             }
@@ -1966,8 +1972,8 @@
                 }
                 return p;
             }
-            throw new IllegalComponentStateException(
-                    "component must be showing on the screen to determine its location");
+            // awt.151=component must be showing on the screen to determine its location
+            throw new IllegalComponentStateException(Messages.getString("awt.151")); //$NON-NLS-1$
         } finally {
             toolkit.unlockAWT();
         }
@@ -2390,8 +2396,8 @@
          */
         toolkit.lockAWT();
         try {
-            return getName() + "," + getX() + "," + getY() + "," + getWidth() + "x"
-                    + getHeight() + (!isVisible() ? ",hidden" : "");
+            return getName() + "," + getX() + "," + getY() + "," + getWidth() + "x" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+                    + getHeight() + (!isVisible() ? ",hidden" : ""); //$NON-NLS-1$ //$NON-NLS-2$
         } finally {
             toolkit.unlockAWT();
         }
@@ -2749,7 +2755,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("componentOrientation", oldOrientation, orientation);
+        firePropertyChange("componentOrientation", oldOrientation, orientation); //$NON-NLS-1$
         invalidate();
     }
 
@@ -2882,7 +2888,7 @@
 
     public void setFocusTraversalKeys(int id, Set<? extends AWTKeyStroke> keystrokes) {
         Set<? extends AWTKeyStroke> oldTraversalKeys;
-        String propName = "FocusTraversalKeys";
+        String propName = "FocusTraversalKeys"; //$NON-NLS-1$
         toolkit.lockAWT();
         try {
             Integer kId = new Integer(id);
@@ -2900,19 +2906,19 @@
                 newKeys = new HashSet<AWTKeyStroke>(keystrokes);
             }
             traversalKeys.put(kId, newKeys);
-            String direction = "";
+            String direction = ""; //$NON-NLS-1$
             switch (id) {
                 case KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS:
-                    direction = "forward";
+                    direction = "forward"; //$NON-NLS-1$
                     break;
                 case KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS:
-                    direction = "backward";
+                    direction = "backward"; //$NON-NLS-1$
                     break;
                 case KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS:
-                    direction = "upCycle";
+                    direction = "upCycle"; //$NON-NLS-1$
                     break;
                 case KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS:
-                    direction = "downCycle";
+                    direction = "downCycle"; //$NON-NLS-1$
                     break;
             }
             propName = direction + propName;
@@ -2931,7 +2937,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("focusTraversalKeysEnabled", oldFocusTraversalKeysEnabled,
+        firePropertyChange("focusTraversalKeysEnabled", oldFocusTraversalKeysEnabled, //$NON-NLS-1$
                 focusTraversalKeysEnabled);
     }
 
@@ -2948,7 +2954,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("focusable", oldFocusable, focusable);
+        firePropertyChange("focusable", oldFocusable, focusable); //$NON-NLS-1$
     }
 
     public Font getFont() {
@@ -2975,7 +2981,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("font", oldFont, font);
+        firePropertyChange("font", oldFont, font); //$NON-NLS-1$
     }
 
     void setFontImpl(Font f) {
@@ -3013,7 +3019,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("foreground", oldFgColor, foreColor);
+        firePropertyChange("foreground", oldFgColor, foreColor); //$NON-NLS-1$
         repaint();
     }
 
@@ -3026,7 +3032,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("background", oldBkColor, backColor);
+        firePropertyChange("background", oldBkColor, backColor); //$NON-NLS-1$
         repaint();
     }
 
@@ -3048,7 +3054,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("locale", oldLocale, locale);
+        firePropertyChange("locale", oldLocale, locale); //$NON-NLS-1$
     }
 
     public void setLocation(Point p) {
@@ -3320,7 +3326,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("maximumSize", oldMaximumSize, this.maximumSize);
+        firePropertyChange("maximumSize", oldMaximumSize, this.maximumSize); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
             invalidateRealParent();
@@ -3351,7 +3357,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("minimumSize", oldMinimumSize, this.minimumSize);
+        firePropertyChange("minimumSize", oldMinimumSize, this.minimumSize); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
             invalidateRealParent();
@@ -3382,7 +3388,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("preferredSize", oldPreferredSize, this.preferredSize);
+        firePropertyChange("preferredSize", oldPreferredSize, this.preferredSize); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
             invalidateRealParent();
@@ -4171,9 +4177,9 @@
             ClassNotFoundException {
         stream.defaultReadObject();
         FieldsAccessor accessor = new FieldsAccessor(Component.class, this);
-        accessor.set("toolkit", Toolkit.getDefaultToolkit());
-        accessor.set("behaviour", createBehavior());
-        accessor.set("componentLock", new Object()); // $NON-LOCK-1$
+        accessor.set("toolkit", Toolkit.getDefaultToolkit()); //$NON-NLS-1$
+        accessor.set("behaviour", createBehavior()); //$NON-NLS-1$
+        accessor.set("componentLock", new Object()); // $NON-LOCK-1$ //$NON-NLS-1$
     }
 
     final void onDrawImage(Image image, Point destLocation, Dimension destSize, Rectangle source) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ComponentOrientation.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ComponentOrientation.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ComponentOrientation.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ComponentOrientation.java Thu Nov  2 01:45:21 2006
@@ -39,10 +39,10 @@
     private final boolean left2right;
 
     static {
-        rlLangs.add("ar");
-        rlLangs.add("fa");
-        rlLangs.add("iw");
-        rlLangs.add("ur");
+        rlLangs.add("ar"); //$NON-NLS-1$
+        rlLangs.add("fa"); //$NON-NLS-1$
+        rlLangs.add("iw"); //$NON-NLS-1$
+        rlLangs.add("ur"); //$NON-NLS-1$
     }
 
     /**
@@ -52,7 +52,7 @@
     public static ComponentOrientation getOrientation(ResourceBundle bdl) {
         Object obj = null;
         try {
-            obj = bdl.getObject("Orientation");
+            obj = bdl.getObject("Orientation"); //$NON-NLS-1$
         }
         catch (MissingResourceException mre) {
             obj = null;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Container.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Container.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Container.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Container.java Thu Nov  2 01:45:21 2006
@@ -33,6 +33,8 @@
 import javax.accessibility.AccessibleComponent;
 import javax.accessibility.AccessibleContext;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class Container extends Component {
     private static final long serialVersionUID = 4613797578919906343L;
 
@@ -392,15 +394,19 @@
         toolkit.lockAWT();
         try {
             if ((index < -1) || (index > children.size())) {
-                throw new IllegalArgumentException("illegal component position");
+                // awt.12A=illegal component position
+                throw new IllegalArgumentException(Messages.getString("awt.12A")); //$NON-NLS-1$
             }
             if ((comp instanceof Container)) {
                 if (comp == this) {
-                    throw new IllegalArgumentException("adding container to itself");
+                    // awt.12B=adding container to itself
+                    throw new IllegalArgumentException(Messages.getString("awt.12B")); //$NON-NLS-1$
                 } else if (((Container) comp).isAncestorOf(this)) {
-                    throw new IllegalArgumentException("adding container's parent to itself");
+                    // awt.12C=adding container's parent to itself
+                    throw new IllegalArgumentException(Messages.getString("awt.12C")); //$NON-NLS-1$
                 } else if (comp instanceof Window) {
-                    throw new IllegalArgumentException("adding a window to a container");
+                    // awt.12D=adding a window to a container
+                    throw new IllegalArgumentException(Messages.getString("awt.12D")); //$NON-NLS-1$
                 }
             }
 
@@ -949,8 +955,8 @@
 
         toolkit.lockAWT();
         try {
-            return super.paramString() + (!isValid() ? ",invalid" : "")
-                    + (layout != null ? ",layout=" + layout.getClass().getName() : "");
+            return super.paramString() + (!isValid() ? ",invalid" : "") //$NON-NLS-1$ //$NON-NLS-2$
+                    + (layout != null ? ",layout=" + layout.getClass().getName() : ""); //$NON-NLS-1$ //$NON-NLS-2$
         } finally {
             toolkit.unlockAWT();
         }
@@ -1024,7 +1030,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("focusCycleRoot", wasFocusCycleRoot, focusCycleRoot);
+        firePropertyChange("focusCycleRoot", wasFocusCycleRoot, focusCycleRoot); //$NON-NLS-1$
     }
 
     @Override
@@ -1046,7 +1052,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("focusTraversalPolicy", oldPolicy, policy);
+        firePropertyChange("focusTraversalPolicy", oldPolicy, policy); //$NON-NLS-1$
     }
 
     @Override
@@ -1387,7 +1393,7 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("focusTraversalPolicyProvider", wasProvider,
+        firePropertyChange("focusTraversalPolicyProvider", wasProvider, //$NON-NLS-1$
                 focusTraversalPolicyProvider);
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ContainerOrderFocusTraversalPolicy.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ContainerOrderFocusTraversalPolicy.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ContainerOrderFocusTraversalPolicy.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ContainerOrderFocusTraversalPolicy.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 ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
         implements Serializable {
     private static final long serialVersionUID = 486933713763926351L;
@@ -62,19 +64,19 @@
 
     private void check(Container aContainer, Component component) {
         if (aContainer == null || component == null) {
-            throw new IllegalArgumentException("aContainer and aComponent " +
-                    "cannot be null");
+            // awt.10B=aContainer and aComponent cannot be null
+            throw new IllegalArgumentException(Messages.getString("awt.10B")); //$NON-NLS-1$
         }
 
         if (aContainer.isFocusCycleRoot()) {
             Component root = component.getFocusCycleRootAncestor();
             if ((root != aContainer) && (component != aContainer)) {
-                throw new IllegalArgumentException("aContainer is not " +
-                        "a focus cycle root of aComponent");
+                // awt.10C=aContainer is not a focus cycle root of aComponent
+                throw new IllegalArgumentException(Messages.getString("awt.10C")); //$NON-NLS-1$
             }
         } else if (!aContainer.isFocusTraversalPolicyProvider()) {
-            throw new IllegalArgumentException("aContainer should be " +
-                    "focus cycle root or focus traversal policy provider");
+            // awt.10D=aContainer should be focus cycle root or focus traversal policy provider
+            throw new IllegalArgumentException(Messages.getString("awt.10D")); //$NON-NLS-1$
         }
     }
 
@@ -164,8 +166,8 @@
         toolkit.lockAWT();
         try {
             if (container == null) {
-                throw new IllegalArgumentException(
-                        "focusCycleRoot cannot be null");
+                // awt.10E=focusCycleRoot cannot be null
+                throw new IllegalArgumentException(Messages.getString("awt.10E")); //$NON-NLS-1$
             }
             Component firstComp = getComponent(container, container, true, true);
             return firstComp;
@@ -435,7 +437,8 @@
         toolkit.lockAWT();
         try {
             if (container == null) {
-                throw new IllegalArgumentException("focusCycleRoot cannot be null");
+                // awt.10E=focusCycleRoot cannot be null
+                throw new IllegalArgumentException(Messages.getString("awt.10E")); //$NON-NLS-1$
             }
             int count = container.getComponentCount();
             if ( count <= 0) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Cursor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Cursor.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Cursor.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Cursor.java Thu Nov  2 01:45:21 2006
@@ -30,6 +30,7 @@
 import java.util.Map;
 import java.util.Properties;
 
+import org.apache.harmony.awt.internal.nls.Messages;
 import org.apache.harmony.awt.wtk.NativeCursor;
 
 
@@ -70,11 +71,11 @@
     static Properties cursorProps;
 
     static final String[] predefinedNames = {
-            "Default", "Crosshair", "Text", "Wait",
-            "Southwest Resize", "Southeast Resize",
-            "Northwest Resize", "Northeast Resize",
-            "North Resize", "South Resize", "West Resize", "East Resize",
-            "Hand", "Move"
+            "Default", "Crosshair", "Text", "Wait", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+            "Southwest Resize", "Southeast Resize", //$NON-NLS-1$ //$NON-NLS-2$
+            "Northwest Resize", "Northeast Resize", //$NON-NLS-1$ //$NON-NLS-2$
+            "North Resize", "South Resize", "West Resize", "East Resize", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+            "Hand", "Move" //$NON-NLS-1$ //$NON-NLS-2$
 
     };
 
@@ -102,7 +103,7 @@
         checkType(type);
         this.type = type;
         if ((type >= 0) && (type < predefinedNames.length)) {
-            name = predefinedNames[type] + " Cursor";
+            name = predefinedNames[type] + " Cursor"; //$NON-NLS-1$
         }
     }
 
@@ -126,7 +127,7 @@
 
     @Override
     public String toString() {
-        return getClass().getName() + "[" + name + "]";
+        return getClass().getName() + "[" + name + "]"; //$NON-NLS-1$ //$NON-NLS-2$
     }
 
     public int getType() {
@@ -163,11 +164,12 @@
         if (cursor != null) {
             return cursor;
         }
-        String exMsg = "failed to parse hotspot property for cursor: " + name;
-        String nm = "Cursor." + name;
-        String nameStr = cursorProps.getProperty(nm + ".Name");
-        String hotSpotStr = cursorProps.getProperty(nm + ".HotSpot");
-        String fileStr = cursorProps.getProperty(nm + ".File");
+        // awt.141=failed to parse hotspot property for cursor:
+        String exMsg = Messages.getString("awt.141") + name; //$NON-NLS-1$
+        String nm = "Cursor." + name; //$NON-NLS-1$
+        String nameStr = cursorProps.getProperty(nm + ".Name"); //$NON-NLS-1$
+        String hotSpotStr = cursorProps.getProperty(nm + ".HotSpot"); //$NON-NLS-1$
+        String fileStr = cursorProps.getProperty(nm + ".File"); //$NON-NLS-1$
         int idx = hotSpotStr.indexOf(',');
         if (idx < 0) {
             throw new AWTException(exMsg);
@@ -192,10 +194,10 @@
             return;
         }
         String sep = File.separator;
-        String cursorsDir = "lib" + sep + "images" + sep + "cursors";
-        String cursorsAbsDir = System.getProperty("java.home") + sep +
+        String cursorsDir = "lib" + sep + "images" + sep + "cursors"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        String cursorsAbsDir = System.getProperty("java.home") + sep + //$NON-NLS-1$
                                 cursorsDir;
-        String cursorPropsFileName = "cursors.properties";
+        String cursorPropsFileName = "cursors.properties"; //$NON-NLS-1$
         String cursorPropsFullFileName = (cursorsAbsDir + sep +
                                           cursorPropsFileName);
         cursorProps = new Properties();
@@ -203,9 +205,9 @@
             cursorProps.load(new FileInputStream(new File(
                     cursorPropsFullFileName)));
         } catch (FileNotFoundException e) {
-            throw new AWTException("Exception: class " + e.getClass() + " " +
-                      e.getMessage() + "occurred while loading: " +
-                      cursorPropsFullFileName);
+            // awt.142=Exception: class {0} {1} occurred while loading: {2}
+            throw new AWTException(Messages.getString("awt.142",//$NON-NLS-1$
+                      new Object[]{e.getClass(), e.getMessage(), cursorPropsFullFileName}));
         } catch (IOException e) {
             throw new AWTException(e.getMessage());
         }
@@ -216,7 +218,8 @@
         // can't use predefined array here because it may not have been
         // initialized yet
         if ((type < 0) || (type >= predefinedNames.length)) {
-            throw new IllegalArgumentException("illegal cursor type");
+            // awt.143=illegal cursor type
+            throw new IllegalArgumentException(Messages.getString("awt.143")); //$NON-NLS-1$
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dialog.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dialog.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dialog.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dialog.java Thu Nov  2 01:45:21 2006
@@ -26,6 +26,8 @@
 import javax.accessibility.AccessibleState;
 import javax.accessibility.AccessibleStateSet;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class Dialog extends Window {
     private static final long serialVersionUID = 5920926903803293709L;
 
@@ -140,7 +142,7 @@
     }
 
     public Dialog(Frame owner, boolean modal) {
-        this(owner, "", modal, null);
+        this(owner, "", modal, null); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
         } finally {
@@ -149,7 +151,7 @@
     }
 
     public Dialog(Frame owner) {
-        this(owner, "", false, null);
+        this(owner, "", false, null); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
         } finally {
@@ -158,7 +160,7 @@
     }
 
     public Dialog(Dialog owner) {
-        this(owner, "", false, null);
+        this(owner, "", false, null); //$NON-NLS-1$
         toolkit.lockAWT();
         try {
         } finally {
@@ -170,8 +172,8 @@
     protected String paramString() {
         toolkit.lockAWT();
         try {
-            return super.paramString() + ",title=" + getTitle()
-                    + (isResizable() ? ",resizable" : "") + (isModal() ? ",modal" : "");
+            return super.paramString() + ",title=" + getTitle() //$NON-NLS-1$
+                    + (isResizable() ? ",resizable" : "") + (isModal() ? ",modal" : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
         } finally {
             toolkit.unlockAWT();
         }
@@ -311,8 +313,8 @@
                 return;
             }
             if (isVisible()) {
-                throw new IllegalComponentStateException(
-                        "Cannot change the modality while the dialog is visible");
+                // awt.124=Cannot change the modality while the dialog is visible
+                throw new IllegalComponentStateException(Messages.getString("awt.124")); //$NON-NLS-1$
             }
             modalContext = modal ? new DialogModalContext() : null;
         } finally {
@@ -393,7 +395,7 @@
     @Override
     String autoName() {
         int number = toolkit.autoNumber.nextDialog++;
-        return "dialog" + Integer.toString(number);
+        return "dialog" + Integer.toString(number); //$NON-NLS-1$
     }
 
     @Override

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dimension.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dimension.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dimension.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dimension.java Thu Nov  2 01:45:21 2006
@@ -69,7 +69,7 @@
     public String toString() {
         // The output format based on 1.5 release behaviour. It could be obtained in the following way
         // System.out.println(new Dimension().toString())
-        return getClass().getName() + "[width=" + width + ",height=" + height + "]";
+        return getClass().getName() + "[width=" + width + ",height=" + height + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
     }
 
     public void setSize(int width, int height) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dispatcher.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dispatcher.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dispatcher.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Dispatcher.java Thu Nov  2 01:45:21 2006
@@ -28,6 +28,7 @@
 import java.awt.event.PaintEvent;
 import java.awt.event.WindowEvent;
 
+import org.apache.harmony.awt.internal.nls.Messages;
 import org.apache.harmony.awt.wtk.NativeEvent;
 import org.apache.harmony.awt.wtk.NativeWindow;
 
@@ -200,7 +201,8 @@
                 mask = NativeWindow.BOUNDS_NOMOVE;
                 break;
             default:
-                throw new RuntimeException("Unknown component event id.");
+                // awt.12E=Unknown component event id.
+                throw new RuntimeException(Messages.getString("awt.12E")); //$NON-NLS-1$
             }
 
             if (!(src instanceof Window)) {
@@ -321,13 +323,14 @@
          */
         void startGrab(Window grabWindow, Runnable whenCanceled) {
             if (nativeGrabOwner != null) {
-                throw new RuntimeException("Attempt to start nested mouse grab");
+                // awt.12F=Attempt to start nested mouse grab
+                throw new RuntimeException(Messages.getString("awt.12F")); //$NON-NLS-1$
             }
 
             NativeWindow win = grabWindow.getNativeWindow();
             if (win == null) {
-                throw new RuntimeException(
-                        "Attempt to grab mouse in not displayable window");
+                // awt.130=Attempt to grab mouse in not displayable window
+                throw new RuntimeException(Messages.getString("awt.130")); //$NON-NLS-1$
             }
 
             nativeGrabOwner = grabWindow;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Event.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Event.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Event.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Event.java Thu Nov  2 01:45:21 2006
@@ -201,26 +201,26 @@
          * System.out.println(e);
          */
 
-        return getClass().getName() + "[" + paramString() + "]";
+        return getClass().getName() + "[" + paramString() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
     }
 
     protected String paramString() {
-        return "id=" + id + ",x=" + x + ",y=" + y +
-        (key != 0 ? ",key=" + key  + getModifiersString() : "") +
-        ",target=" + target +
-        (arg != null ? ",arg=" + arg : "");
+        return "id=" + id + ",x=" + x + ",y=" + y + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        (key != 0 ? ",key=" + key  + getModifiersString() : "") + //$NON-NLS-1$ //$NON-NLS-2$
+        ",target=" + target + //$NON-NLS-1$
+        (arg != null ? ",arg=" + arg : ""); //$NON-NLS-1$ //$NON-NLS-2$
     }
 
     private String getModifiersString() {
-        String strMod = "";
+        String strMod = ""; //$NON-NLS-1$
         if (shiftDown()) {
-            strMod += ",shift";
+            strMod += ",shift"; //$NON-NLS-1$
         }
         if (controlDown()) {
-            strMod += ",control";
+            strMod += ",control"; //$NON-NLS-1$
         }
         if (metaDown()) {
-            strMod += ",meta";
+            strMod += ",meta"; //$NON-NLS-1$
         }
         return strMod;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventDispatchThread.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventDispatchThread.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventDispatchThread.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventDispatchThread.java Thu Nov  2 01:45:21 2006
@@ -108,7 +108,7 @@
     EventDispatchThread(Toolkit toolkit, Dispatcher dispatcher ) {
         this.toolkit = toolkit;
         this.dispatcher = dispatcher;
-        setName("AWT-EventDispatchThread");
+        setName("AWT-EventDispatchThread"); //$NON-NLS-1$
         setDaemon(true);
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueueCore.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueueCore.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueueCore.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueueCore.java Thu Nov  2 01:45:21 2006
@@ -27,6 +27,8 @@
 import java.awt.event.MouseEvent;
 import java.util.LinkedList;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 /**
  * The events storage for EventQueue
  */
@@ -187,7 +189,8 @@
     synchronized void push(EventQueue newEventQueue) {
         // TODO: handle incorrect situations
         if (queueStack.isEmpty()) {
-            throw new IllegalStateException("Queue stack is empty");
+            // awt.6B=Queue stack is empty
+            throw new IllegalStateException(Messages.getString("awt.6B")); //$NON-NLS-1$
         }
         
         queueStack.addLast(newEventQueue);
@@ -198,7 +201,8 @@
     synchronized void pop() {
         EventQueue removed = queueStack.removeLast();
         if (removed != activeQueue) {
-            throw new IllegalStateException("Event queue stack is broken");
+            // awt.6C=Event queue stack is broken
+            throw new IllegalStateException(Messages.getString("awt.6C")); //$NON-NLS-1$
         }
         activeQueue = queueStack.getLast();
         removed.setCore(null);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueueThread.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueueThread.java?view=diff&rev=470296&r1=470295&r2=470296
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueueThread.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueueThread.java Thu Nov  2 01:45:21 2006
@@ -29,14 +29,14 @@
 
     private static final class StopThreadEvent extends ActionEvent {
         StopThreadEvent(Thread thread) {
-            super(thread, ACTION_PERFORMED, "stopThread");
+            super(thread, ACTION_PERFORMED, "stopThread"); //$NON-NLS-1$
         }
     }
 
     private final EventQueueCore core;
 
     EventQueueThread(EventQueueCore core) {
-        super("AWT-EventQueueThread");
+        super("AWT-EventQueueThread"); //$NON-NLS-1$
         this.core = core;
         setDaemon(false);
     }



Mime
View raw message