harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r513311 [2/3] - in /harmony/enhanced/classlib/trunk/modules/swing/src/main/java: common/javax/swing/ common/javax/swing/border/ common/javax/swing/event/ common/javax/swing/filechooser/ common/javax/swing/plaf/ common/javax/swing/plaf/basic...
Date Thu, 01 Mar 2007 13:24:06 GMT
Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/LayoutFocusTraversalPolicy.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/LayoutFocusTraversalPolicy.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/LayoutFocusTraversalPolicy.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/LayoutFocusTraversalPolicy.java Thu Mar  1 05:24:01 2007
@@ -30,6 +30,8 @@
 import java.io.Serializable;
 import java.util.Comparator;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class LayoutFocusTraversalPolicy extends SortingFocusTraversalPolicy implements Serializable {
     private static final long serialVersionUID = 3761404205428127289L;
 
@@ -41,10 +43,10 @@
 
     public Component getComponentBefore(final Container focusCycleRoot, final Component component) {
         if (focusCycleRoot == null) {
-            throw new IllegalArgumentException("focusCycleRoot must not be null");
+            throw new IllegalArgumentException(Messages.getString("swing.4E")); //$NON-NLS-1$
         }
         if (component == null) {
-            throw new IllegalArgumentException("component must not be null");
+            throw new IllegalArgumentException(Messages.getString("swing.4F")); //$NON-NLS-1$
         }
         ((LayoutComparator)getComparator()).setOrientation(focusCycleRoot.getComponentOrientation());
         return super.getComponentBefore(focusCycleRoot, component);
@@ -52,10 +54,10 @@
 
     public Component getComponentAfter(final Container focusCycleRoot, final Component component) {
         if (focusCycleRoot == null) {
-            throw new IllegalArgumentException("focusCycleRoot must not be null");
+            throw new IllegalArgumentException(Messages.getString("swing.4E")); //$NON-NLS-1$
         }
         if (component == null) {
-            throw new IllegalArgumentException("component must not be null");
+            throw new IllegalArgumentException(Messages.getString("swing.4F")); //$NON-NLS-1$
         }
         ((LayoutComparator)getComparator()).setOrientation(focusCycleRoot.getComponentOrientation());
         return super.getComponentAfter(focusCycleRoot, component);
@@ -63,7 +65,7 @@
 
     public Component getLastComponent(final Container focusCycleRoot) {
         if (focusCycleRoot == null) {
-            throw new IllegalArgumentException("focusCycleRoot must not be null");
+            throw new IllegalArgumentException(Messages.getString("swing.4E")); //$NON-NLS-1$
         }
         ((LayoutComparator)getComparator()).setOrientation(focusCycleRoot.getComponentOrientation());
         return super.getLastComponent(focusCycleRoot);
@@ -71,7 +73,7 @@
 
     public Component getFirstComponent(final Container focusCycleRoot) {
         if (focusCycleRoot == null) {
-            throw new IllegalArgumentException("focusCycleRoot must not be null");
+            throw new IllegalArgumentException(Messages.getString("swing.4E")); //$NON-NLS-1$
         }
         ((LayoutComparator)getComparator()).setOrientation(focusCycleRoot.getComponentOrientation());
         return super.getFirstComponent(focusCycleRoot);
@@ -133,7 +135,7 @@
                 return TRCompare(c1, c2);
             }
 
-            throw new IllegalStateException("Cannot happen");
+            throw new IllegalStateException(Messages.getString("swing.50")); //$NON-NLS-1$
         }
 
         private int LTCompare(final Component c1, final Component c2) {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/LookAndFeel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/LookAndFeel.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/LookAndFeel.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/LookAndFeel.java Thu Mar  1 05:24:01 2007
@@ -46,6 +46,8 @@
 
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public abstract class LookAndFeel {
     private static Map classToSettersMap = new HashMap();
@@ -181,16 +183,16 @@
         }
         Method setter = getSetter(propertyName, c.getClass());
         if (setter == null) {
-            throw new IllegalArgumentException("can't set " + propertyName);
+            throw new IllegalArgumentException(Messages.getString("swing.51") + propertyName); //$NON-NLS-1$
         }
         try {
             setter.invoke(c, new Object[] {propertyValue});
         } catch (IllegalArgumentException e) {
             throw new ClassCastException();
         } catch (IllegalAccessException e) {
-            throw new IllegalArgumentException("can't set " + propertyName);
+            throw new IllegalArgumentException(Messages.getString("swing.51") + propertyName); //$NON-NLS-1$
         } catch (InvocationTargetException e) {
-            throw new IllegalArgumentException("can't set " + propertyName);
+            throw new IllegalArgumentException(Messages.getString("swing.51") + propertyName); //$NON-NLS-1$
         }
         c.installablePropertiesExcluded.remove(propertyName);
     }
@@ -229,4 +231,5 @@
         c.installablePropertiesExcluded.add(propertyName);
     }
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/OverlayLayout.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/OverlayLayout.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/OverlayLayout.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/OverlayLayout.java Thu Mar  1 05:24:01 2007
@@ -27,6 +27,8 @@
 import java.awt.LayoutManager2;
 import java.io.Serializable;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class OverlayLayout implements LayoutManager2, Serializable {
 
     private final Container target;
@@ -101,9 +103,10 @@
      */
     private void checkTarget(final Container target) {
         if (this.target != target) {
-            throw new AWTError("OverlayLayout can't be shared");
+            throw new AWTError(Messages.getString("swing.err.03")); //$NON-NLS-1$
         }
     }
 
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Popup.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Popup.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Popup.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Popup.java Thu Mar  1 05:24:01 2007
@@ -25,6 +25,8 @@
 
 import org.apache.harmony.awt.ComponentInternals;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class Popup {
     class PopupWindow extends JWindow {
@@ -63,7 +65,7 @@
 
     protected Popup(final Component owner, final Component content, final int x, final int y) {
         if (content == null) {
-            throw new IllegalArgumentException("Popup content should be specified");
+            throw new IllegalArgumentException(Messages.getString("swing.52")); //$NON-NLS-1$
         }
 
         Window ownerWindow = owner instanceof Window ? (Window)owner : SwingUtilities.getWindowAncestor(owner);

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/PopupFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/PopupFactory.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/PopupFactory.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/PopupFactory.java Thu Mar  1 05:24:01 2007
@@ -33,6 +33,8 @@
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class PopupFactory {
     private static class ReleasedPopupStorage {
         private static final int STORAGE_CAPACITY = 5;
@@ -154,7 +156,7 @@
 
     public static void setSharedInstance(final PopupFactory factory) {
         if (factory == null) {
-            throw new IllegalArgumentException("Factory should be not null");
+            throw new IllegalArgumentException(Messages.getString("swing.53")); //$NON-NLS-1$
         }
 
         instance = factory;
@@ -167,7 +169,7 @@
     public Popup getPopup(final Component owner, final Component content,
                           final int x, final int y) throws IllegalArgumentException {
         if (content == null) {
-            throw new IllegalArgumentException("Popup content should be specified");
+            throw new IllegalArgumentException(Messages.getString("swing.52")); //$NON-NLS-1$
         }
 
         Window ownerWindow = owner instanceof Window ? (Window)owner : SwingUtilities.getWindowAncestor(owner);

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ScrollPaneLayout.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ScrollPaneLayout.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ScrollPaneLayout.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ScrollPaneLayout.java Thu Mar  1 05:24:01 2007
@@ -125,7 +125,7 @@
         if (x != ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED &&
             x != ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS && 
             x != ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER) {
-            throw new IllegalArgumentException(Messages.getString("swing.02"));
+            throw new IllegalArgumentException(Messages.getString("swing.02","verticalScrollBarPolicy")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         vsbPolicy = x;
     }
@@ -138,7 +138,7 @@
         if (x != ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED &&
             x != ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER && 
             x != ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS) {
-            throw new IllegalArgumentException(Messages.getString("swing.03")); 
+            throw new IllegalArgumentException(Messages.getString("swing.02","horizontalScrollBarPolicy")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         hsbPolicy = x;
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SortingFocusTraversalPolicy.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SortingFocusTraversalPolicy.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SortingFocusTraversalPolicy.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SortingFocusTraversalPolicy.java Thu Mar  1 05:24:01 2007
@@ -29,6 +29,8 @@
 import java.util.LinkedList;
 import java.util.List;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class SortingFocusTraversalPolicy extends InternalFrameFocusTraversalPolicy {
     private Comparator<? super java.awt.Component> comparator;
     private boolean isImplicitDownCycleTraversal = true;
@@ -231,18 +233,18 @@
     private Component getComponentBeforeOrAfter(final NextComponentFinder finder) {
         checkCycleRootIsNotNull(finder.focusCycleRoot);
         if (!finder.focusCycleRoot.isFocusCycleRoot() && !finder.focusCycleRoot.isFocusTraversalPolicyProvider()) {
-            throw new IllegalArgumentException("Container is not a focus cycle root");
+            throw new IllegalArgumentException(Messages.getString("swing.54")); //$NON-NLS-1$
         }
 
         if (finder.currentComponent == null) {
-            throw new IllegalArgumentException("Component must be specified");
+            throw new IllegalArgumentException(Messages.getString("swing.55","Component")); //$NON-NLS-1$ //$NON-NLS-2$
         }
 
         if (finder.currentComponent != finder.focusCycleRoot
             && finder.currentComponent.getFocusCycleRootAncestor() != finder.focusCycleRoot
             && getPolicyProvider(finder.currentComponent) != finder.focusCycleRoot) {
 
-            throw new IllegalArgumentException("Component must be in a cycle root of the specified container");
+            throw new IllegalArgumentException(Messages.getString("swing.56")); //$NON-NLS-1$
         }
 
         List components = getAllAcceptableComponentsSorted(finder.focusCycleRoot, finder.currentComponent, true);
@@ -267,7 +269,7 @@
 
     private static void checkCycleRootIsNotNull(final Container focusCycleRoot) {
         if (focusCycleRoot == null) {
-            throw new IllegalArgumentException("Container must be specified");
+            throw new IllegalArgumentException(Messages.getString("swing.55","Container")); //$NON-NLS-1$ //$NON-NLS-2$
         }
     }
 
@@ -289,4 +291,5 @@
         public abstract Component findNextComponent(List availableComponents, int currentComponentIndex);
     }
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerDateModel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerDateModel.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerDateModel.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerDateModel.java Thu Mar  1 05:24:01 2007
@@ -26,6 +26,8 @@
 
 import org.apache.harmony.awt.text.TextUtils;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class SpinnerDateModel extends AbstractSpinnerModel implements Serializable {
 
@@ -42,16 +44,16 @@
     public SpinnerDateModel(final Date value, final Comparable start,
                             final Comparable end, final int calendarField) {
         if (value == null) {
-            throw new IllegalArgumentException("value is null");
+            throw new IllegalArgumentException(Messages.getString("swing.03","value")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         if (start != null && start.compareTo(value) > 0) {
-            throw new IllegalArgumentException("(start <= value <= end) is false");
+            throw new IllegalArgumentException(Messages.getString("swing.59")); //$NON-NLS-1$
         }
         if (end != null && end.compareTo(value) < 0) {
-            throw new IllegalArgumentException("(start <= value <= end) is false");
+            throw new IllegalArgumentException(Messages.getString("swing.59")); //$NON-NLS-1$
         }
         if (!isValidCalendarField(calendarField)) {
-            throw new IllegalArgumentException("invalid calendarField");
+            throw new IllegalArgumentException(Messages.getString("swing.5A")); //$NON-NLS-1$
         }
 
         this.value = value;
@@ -84,7 +86,7 @@
 
     public void setCalendarField(final int calendarField) {
         if (!isValidCalendarField(calendarField)) {
-            throw new IllegalArgumentException("invalid calendarField");
+            throw new IllegalArgumentException(Messages.getString("swing.5A")); //$NON-NLS-1$
         }
         if (this.calendarField != calendarField) {
             this.calendarField = calendarField;
@@ -114,7 +116,7 @@
 
     public void setValue(final Object value) {
         if (!(value instanceof Date)) {
-            throw new IllegalArgumentException("illegal value");
+            throw new IllegalArgumentException(Messages.getString("swing.5B")); //$NON-NLS-1$
         }
         if (this.value != value) {
             this.value = (Date)value;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerListModel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerListModel.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerListModel.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerListModel.java Thu Mar  1 05:24:01 2007
@@ -24,6 +24,8 @@
 import java.util.Arrays;
 import java.util.List;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class SpinnerListModel extends AbstractSpinnerModel implements Serializable {
     private static final String[] DEFAULT_VALUES = {"empty"};
     private List<?> values;
@@ -35,14 +37,14 @@
 
     public SpinnerListModel(final List<?> values) {
         if (values == null || values.size() <= 0) {
-            throw new IllegalArgumentException("SpinnerListModel(List) expects non-null non-empty List");
+            throw new IllegalArgumentException(Messages.getString("swing.5C")); //$NON-NLS-1$
         }
         this.values = values;
     }
 
     public SpinnerListModel(final Object[] values) {
         if (values == null || values.length <= 0) {
-            throw new IllegalArgumentException("SpinnerListModel(Object[]) expects non-null non-empty Object[]");
+            throw new IllegalArgumentException(Messages.getString("swing.5D")); //$NON-NLS-1$
         }
         this.values = Arrays.asList(values);
     }
@@ -66,7 +68,7 @@
 
     public void setValue(final Object obj) {
         if (!values.contains(obj)) {
-            throw new IllegalArgumentException("invalid sequence element");
+            throw new IllegalArgumentException(Messages.getString("swing.58")); //$NON-NLS-1$
         }
         index = values.indexOf(obj);
         fireStateChanged();
@@ -80,4 +82,5 @@
         return (index == 0) ? null : values.get(index - 1);
     }
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerNumberModel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerNumberModel.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerNumberModel.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerNumberModel.java Thu Mar  1 05:24:01 2007
@@ -24,6 +24,8 @@
 
 import java.io.Serializable;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class SpinnerNumberModel extends AbstractSpinnerModel implements Serializable {
 
     private static final Number DEFAULT_VALUE = new Integer(0);
@@ -36,13 +38,13 @@
 
     public SpinnerNumberModel(final Number value, final Comparable minimum, final Comparable maximum, final Number stepSize) {
         if (value == null || stepSize == null) {
-            throw new IllegalArgumentException("value and stepSize must be non-null");
+            throw new IllegalArgumentException(Messages.getString("swing.5E")); //$NON-NLS-1$
         }
         if (minimum != null && minimum.compareTo(value) > 0) {
-            throw new IllegalArgumentException("(minimum <= value <= maximum) is false");
+            throw new IllegalArgumentException(Messages.getString("swing.5F")); //$NON-NLS-1$
         }
         if (maximum != null && maximum.compareTo(value) < 0) {
-            throw new IllegalArgumentException("(minimum <= value <= maximum) is false");
+            throw new IllegalArgumentException(Messages.getString("swing.5F")); //$NON-NLS-1$
         }
         this.value = value;
         this.minimum = minimum;
@@ -86,7 +88,7 @@
 
     public void setStepSize(final Number stepSize) {
         if (stepSize == null || !(stepSize instanceof Number)) {
-            throw new IllegalArgumentException("null stepSize");
+            throw new IllegalArgumentException(Messages.getString("swing.60")); //$NON-NLS-1$
         }
         if (this.stepSize != stepSize) {
             this.stepSize = stepSize;
@@ -120,7 +122,7 @@
 
     public void setValue(final Object value) {
         if (!(value instanceof Number)) {
-            throw new IllegalArgumentException("illegal value");
+            throw new IllegalArgumentException(Messages.getString("swing.5B")); //$NON-NLS-1$
         }
         if (this.value != value) {
             this.value = (Number)value;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SwingUtilities.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SwingUtilities.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SwingUtilities.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SwingUtilities.java Thu Mar  1 05:24:01 2007
@@ -47,6 +47,8 @@
 
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class SwingUtilities implements SwingConstants {
 
@@ -116,14 +118,14 @@
 
     public static void convertPointToScreen(final Point point, final Component component) {
         if (component == null) {
-            throw new NullPointerException("Cannot convert point from null-component");
+            throw new NullPointerException(Messages.getString("swing.61")); //$NON-NLS-1$
         }
         translateRelatedPoint(point, component, 1, false);
     }
 
     public static void convertPointFromScreen(final Point point, final Component component) {
         if (component == null) {
-            throw new NullPointerException("Cannot convert point to null-component");
+            throw new NullPointerException(Messages.getString("swing.62")); //$NON-NLS-1$
         }
         translateRelatedPoint(point, component, -1, false);
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Timer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Timer.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Timer.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Timer.java Thu Mar  1 05:24:01 2007
@@ -23,6 +23,8 @@
 
 import javax.swing.event.EventListenerList;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>Timer</i>
@@ -109,7 +111,7 @@
 
     public void setInitialDelay(final int initialDelay) {
         if (initialDelay < 0) {
-            throw new IllegalArgumentException("Invalid initial delay: " + initialDelay);
+            throw new IllegalArgumentException(Messages.getString("swing.63", initialDelay)); //$NON-NLS-1$
         }
         this.initialDelay = initialDelay;
     }
@@ -120,7 +122,7 @@
 
     public void setDelay(final int delay) {
         if (delay < 0) {
-            throw new IllegalArgumentException("Invalid delay: " + delay);
+            throw new IllegalArgumentException(Messages.getString("swing.64", delay)); //$NON-NLS-1$
         }
         this.delay = delay;
     }
@@ -209,4 +211,4 @@
     private static int getPositiveDelay(final int d) {
         return (d > 0) ? d : 1;
     }
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ToolTipManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ToolTipManager.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ToolTipManager.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ToolTipManager.java Thu Mar  1 05:24:01 2007
@@ -31,6 +31,8 @@
 
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class ToolTipManager extends MouseAdapter implements MouseMotionListener {
     protected class insideTimerAction implements ActionListener {
@@ -105,7 +107,7 @@
 
     public void setInitialDelay(final int milliseconds) {
         if (milliseconds < 0) {
-            throw new IllegalArgumentException("Incorrect initial delay: " + milliseconds);
+            throw new IllegalArgumentException(Messages.getString("swing.65", milliseconds)); //$NON-NLS-1$
         }
         initialDelay = milliseconds;
     }
@@ -116,7 +118,7 @@
 
     public void setDismissDelay(final int milliseconds) {
         if (milliseconds < 0) {
-            throw new IllegalArgumentException("Incorrect dismiss delay: " + milliseconds);
+            throw new IllegalArgumentException(Messages.getString("swing.66", milliseconds)); //$NON-NLS-1$
         }
         dismissDelay = milliseconds;
     }
@@ -127,7 +129,7 @@
 
     public void setReshowDelay(final int milliseconds) {
         if (milliseconds < 0) {
-            throw new IllegalArgumentException("Incorrect reshow delay: " + milliseconds);
+            throw new IllegalArgumentException(Messages.getString("swing.67", milliseconds)); //$NON-NLS-1$
         }
         reshowDelay = milliseconds;
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/UIDefaults.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/UIDefaults.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/UIDefaults.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/UIDefaults.java Thu Mar  1 05:24:01 2007
@@ -44,6 +44,8 @@
 import javax.swing.plaf.ComponentUI;
 import javax.swing.plaf.UIResource;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class UIDefaults extends Hashtable<Object, Object> {
 
     public static interface ActiveValue {
@@ -408,7 +410,7 @@
     }
 
     protected void getUIError(final String message) {
-        System.err.println("ERROR: UIDefaults.getUI() failed: " + message);
+        System.err.println(Messages.getString("swing.err.06",message)); //$NON-NLS-1$
     }
 
     private Object getFromResourceBundles(final Object key, final Locale locale) {
@@ -437,4 +439,4 @@
 
         return null;
     }
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/UIManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/UIManager.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/UIManager.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/UIManager.java Thu Mar  1 05:24:01 2007
@@ -39,6 +39,8 @@
 
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>UIManager</i>
@@ -243,7 +245,7 @@
             return;
         }
         if (!laf.isSupportedLookAndFeel()) {
-            throw new UnsupportedLookAndFeelException(laf + " is not supported on this platform.");
+            throw new UnsupportedLookAndFeelException(Messages.getString("swing.2E",laf)); //$NON-NLS-1$
         }
         LookAndFeel oldValue = lookAndFeel;
         if (lookAndFeel != null) {
@@ -457,4 +459,5 @@
         return userUIDefaults;
     }
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/BevelBorder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/BevelBorder.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/BevelBorder.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/BevelBorder.java Thu Mar  1 05:24:01 2007
@@ -25,6 +25,8 @@
 import java.awt.Graphics;
 import java.awt.Insets;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class BevelBorder extends AbstractBorder {
 
@@ -49,7 +51,7 @@
 
         if (highlightOuterColor == null || highlightInnerColor == null ||
                 shadowOuterColor == null || shadowInnerColor == null) {
-            throw new NullPointerException("Color should not be null");
+            throw new NullPointerException(Messages.getString("swing.68")); //$NON-NLS-1$
         }
         highlightOuter = highlightOuterColor;
         highlightInner = highlightInnerColor;
@@ -177,4 +179,4 @@
         return bevelType;
     }
 
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/EtchedBorder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/EtchedBorder.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/EtchedBorder.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/EtchedBorder.java Thu Mar  1 05:24:01 2007
@@ -26,6 +26,8 @@
 import java.awt.Insets;
 import java.security.InvalidParameterException;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class EtchedBorder extends AbstractBorder {
 
     public static final int RAISED = 0;
@@ -36,7 +38,7 @@
     protected Color shadow;
 
     private static final int INSETS_SIZE = 2;
-    private static final String INCORRECT_BORDER_TYPE_EXCEPTION_TEXT = "Incorrect type of the etched border";
+    private static final String INCORRECT_BORDER_TYPE_EXCEPTION_TEXT = Messages.getString("swing.1D"); //$NON-NLS-1$
 
     public EtchedBorder() {
     }
@@ -112,4 +114,5 @@
     }
 
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/TitledBorder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/TitledBorder.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/TitledBorder.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/TitledBorder.java Thu Mar  1 05:24:01 2007
@@ -36,6 +36,8 @@
 import org.apache.harmony.awt.gl.MultiRectArea;
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class TitledBorder extends AbstractBorder {
 
@@ -284,7 +286,7 @@
 
     public void setTitlePosition(final int pos) {
         if (pos < DEFAULT_POSITION || BELOW_BOTTOM < pos) {
-            throw new IllegalArgumentException(pos + " is not a valid title position.");
+            throw new IllegalArgumentException(Messages.getString("swing.24",pos)); //$NON-NLS-1$
         }
         titlePosition = pos;
     }
@@ -295,7 +297,7 @@
 
     public void setTitleJustification(final int justification) {
         if (justification < DEFAULT_JUSTIFICATION || TRAILING < justification) {
-            throw new IllegalArgumentException(justification + " is not a valid title justification.");
+            throw new IllegalArgumentException(Messages.getString("swing.23",justification)); //$NON-NLS-1$
         }
         titleJustification = justification;
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/event/TreeSelectionEvent.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/event/TreeSelectionEvent.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/event/TreeSelectionEvent.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/event/TreeSelectionEvent.java Thu Mar  1 05:24:01 2007
@@ -24,6 +24,8 @@
 
 import javax.swing.tree.TreePath;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class TreeSelectionEvent extends EventObject {
     protected TreePath[] paths;
     protected boolean[] areNew;
@@ -68,12 +70,12 @@
                 return isAddedPath(i);
             }
         }
-        throw new IllegalArgumentException("path is not found");
+        throw new IllegalArgumentException(Messages.getString("swing.69")); //$NON-NLS-1$
     }
 
     public boolean isAddedPath(final int index) {
         if (index < 0 || index >= areNew.length) {
-            throw new IllegalArgumentException("index is invalid");
+            throw new IllegalArgumentException(Messages.getString("swing.6A")); //$NON-NLS-1$
         }
         return areNew[index];
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/filechooser/FileSystemView.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/filechooser/FileSystemView.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/filechooser/FileSystemView.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/filechooser/FileSystemView.java Thu Mar  1 05:24:01 2007
@@ -37,6 +37,8 @@
 import org.apache.harmony.x.swing.filechooser.PlatformFile;
 import org.apache.harmony.x.swing.filechooser.PlatformFileManager;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public abstract class FileSystemView {
     private static FileSystemView instance;
 
@@ -383,6 +385,6 @@
 
 
     protected File createFileSystemRoot(final File f) {
-        throw new UnsupportedOperationException("Not implemented");
+        throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/BorderUIResource.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/BorderUIResource.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/BorderUIResource.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/BorderUIResource.java Thu Mar  1 05:24:01 2007
@@ -38,6 +38,8 @@
 import javax.swing.border.MatteBorder;
 import javax.swing.border.TitledBorder;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class BorderUIResource implements Border, UIResource, Serializable {
     private static Border etched;
     private static Border blackLine;
@@ -158,7 +160,7 @@
 
     public BorderUIResource(final Border border) {
         if (border == null) {
-            throw new IllegalArgumentException("null delegate");
+            throw new IllegalArgumentException(Messages.getString("swing.6B")); //$NON-NLS-1$
         }
         this.border = border;
     }
@@ -219,4 +221,5 @@
         return blackLine;
     }
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/IconUIResource.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/IconUIResource.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/IconUIResource.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/IconUIResource.java Thu Mar  1 05:24:01 2007
@@ -27,12 +27,14 @@
 import java.io.Serializable;
 import javax.swing.Icon;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class IconUIResource implements Icon, UIResource, Serializable {
     private Icon icon;
 
     public IconUIResource(final Icon icon) {
         if (icon == null) {
-            throw new IllegalArgumentException("null delegate");
+            throw new IllegalArgumentException(Messages.getString("swing.6B")); //$NON-NLS-1$
         }
         this.icon = icon;
     }
@@ -49,4 +51,5 @@
         return icon.getIconHeight();
     }
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboBoxUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboBoxUI.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboBoxUI.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboBoxUI.java Thu Mar  1 05:24:01 2007
@@ -69,6 +69,8 @@
 
 import org.apache.harmony.x.swing.internal.nls.Messages;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class BasicComboBoxUI extends ComboBoxUI {
 
@@ -82,14 +84,14 @@
 
         public Dimension preferredLayoutSize(final Container parent) {
             if (parent == null) {
-                throw new NullPointerException("parent is null");
+                throw new NullPointerException(Messages.getString("swing.03","Parent")); //$NON-NLS-1$ //$NON-NLS-2$
             }
             return new Dimension(0, 0);
         }
 
         public Dimension minimumLayoutSize(final Container parent) {
             if (parent == null) {
-                throw new NullPointerException("parent is null");
+                throw new NullPointerException(Messages.getString("swing.03","Parent")); //$NON-NLS-1$ //$NON-NLS-2$
             }
             return new Dimension(0, 0);
         }
@@ -429,7 +431,7 @@
     public void paintCurrentValueBackground(final Graphics g, final Rectangle bounds, final boolean hasFocus) {
         Color oldColor = g.getColor();
         if (comboBox == null) {
-            throw new NullPointerException("comboBox is null");
+            throw new NullPointerException(Messages.getString("swing.03","ComboBox")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         if (hasFocus) {
             g.setColor(UIManager.getColor("ComboBox.selectionBackground"));
@@ -487,7 +489,7 @@
 
     public int getAccessibleChildrenCount(final JComponent c) {
         if (comboBox == null) {
-            throw new NullPointerException(Messages.getString("swing.04")); //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("swing.03","ComboBox")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         return 0;
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboPopup.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboPopup.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboPopup.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboPopup.java Thu Mar  1 05:24:01 2007
@@ -65,6 +65,8 @@
 import org.apache.harmony.x.swing.StringConstants;
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class BasicComboPopup extends JPopupMenu implements ComboPopup {
     /**
@@ -571,7 +573,7 @@
                     } else if (scrollDirection == SCROLL_DOWN) {
                         autoScrollDown();
                     } else {
-                        throw new IllegalArgumentException("Incorrect direction is specified!");
+                        throw new IllegalArgumentException(Messages.getString("swing.6E")); //$NON-NLS-1$
                     }
                 }
             });

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicDesktopIconUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicDesktopIconUI.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicDesktopIconUI.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicDesktopIconUI.java Thu Mar  1 05:24:01 2007
@@ -46,6 +46,8 @@
 import org.apache.harmony.x.swing.ComponentDragImplHelper;
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class BasicDesktopIconUI extends DesktopIconUI {
     private static  final int INSETS_WIDTH = 5;
 
@@ -128,7 +130,7 @@
 
     public Insets getInsets(final JComponent c) {
         if (c == null) {
-            throw new NullPointerException("component is null");
+            throw new NullPointerException(Messages.getString("swing.03","component")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         //return desktopIcon.getInsets();
         return new Insets(INSETS_WIDTH, INSETS_WIDTH,

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicListUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicListUI.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicListUI.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicListUI.java Thu Mar  1 05:24:01 2007
@@ -62,6 +62,8 @@
 import org.apache.harmony.x.swing.StringConstants;
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class BasicListUI extends ListUI {
     protected int cellHeight = -1;
     protected int cellWidth = -1;
@@ -1029,7 +1031,7 @@
                     result = new HorizontalWrapVisibleUnspecifiedLayoutStrategy();
                 }
             } else {
-                throw new IllegalArgumentException("Incorrect layout orientation");
+                throw new IllegalArgumentException(Messages.getString("swing.70")); //$NON-NLS-1$
             }
 
             return result;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicMenuItemUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicMenuItemUI.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicMenuItemUI.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicMenuItemUI.java Thu Mar  1 05:24:01 2007
@@ -60,6 +60,8 @@
 import org.apache.harmony.x.swing.StringConstants;
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class BasicMenuItemUI extends MenuItemUI {
     protected class MouseInputHandler implements MouseInputListener {
@@ -304,7 +306,7 @@
 
     public Dimension getMinimumSize(final JComponent c) {
         if (c == null) {
-            throw new NullPointerException("component is null");
+            throw new NullPointerException(Messages.getString("swing.03","component")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         return null;
     }
@@ -315,7 +317,7 @@
 
     public Dimension getMaximumSize(final JComponent c) {
         if (c == null) {
-            throw new NullPointerException("component is null");
+            throw new NullPointerException(Messages.getString("swing.03","component")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         return null;
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicOptionPaneUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicOptionPaneUI.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicOptionPaneUI.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicOptionPaneUI.java Thu Mar  1 05:24:01 2007
@@ -63,6 +63,8 @@
 import org.apache.harmony.x.swing.StringConstants;
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class BasicOptionPaneUI extends OptionPaneUI {
 
@@ -568,7 +570,7 @@
 
     protected Icon getIconForType(final int messageType) {
         if (optionPane == null) {
-            throw new NullPointerException("optionPane is null");
+            throw new NullPointerException(Messages.getString("swing.03","optionPane")); //$NON-NLS-1$ //$NON-NLS-2$
         }
 
         if (defaultIcons == null) {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicProgressBarUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicProgressBarUI.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicProgressBarUI.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicProgressBarUI.java Thu Mar  1 05:24:01 2007
@@ -49,6 +49,8 @@
 import org.apache.harmony.x.swing.StringConstants;
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class BasicProgressBarUI extends ProgressBarUI {
 
@@ -338,7 +340,7 @@
 
     protected void setAnimationIndex(final int newValue) {
         if (progressBar == null) {
-            throw new NullPointerException("progressBar is null");
+            throw new NullPointerException(Messages.getString("swing.03","progressBar")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         animationIndex = newValue % maxAnimationIndex;
     }
@@ -437,4 +439,5 @@
         return (length - getBoxLength(length, 0)) * 2 * Math.min(animationIndex, (maxAnimationIndex - animationIndex)) / maxAnimationIndex;
     }
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java Thu Mar  1 05:24:01 2007
@@ -54,6 +54,8 @@
 import org.apache.harmony.x.swing.StringConstants;
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <b>Note:</b> <code>serialVersionUID</code> fields are added as
  * a performance optimization only but not as a guarantee of correct
@@ -433,7 +435,7 @@
     public void uninstallUI(final JComponent c) {
         if (c != slider) {
             // TODO Perform i18n after HARMONY-1320 is applied
-            throw new IllegalComponentStateException(this + " was asked to deinstall() " + c + " when it only knows about " + slider);
+            throw new IllegalComponentStateException(Messages.getString("swing.0E",new Object[]{this, c, slider})); //$NON-NLS-1$
         }
         uninstallListeners(slider);
         uninstallKeyboardActions(slider);

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSplitPaneUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSplitPaneUI.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSplitPaneUI.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSplitPaneUI.java Thu Mar  1 05:24:01 2007
@@ -42,6 +42,8 @@
 
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class BasicSplitPaneUI extends SplitPaneUI {
 
     public class BasicHorizontalLayoutManager implements LayoutManager2 {
@@ -159,7 +161,7 @@
                                   && !JSplitPane.BOTTOM.equals(place)
                                   && !JSplitPane.RIGHT.equals(place)
                                   && !JSplitPane.DIVIDER.equals(place)) {
-                throw new IllegalArgumentException("illegal argument");
+                throw new IllegalArgumentException(Messages.getString("swing.73")); //$NON-NLS-1$
             }
             if (JSplitPane.DIVIDER.equals(place)) {
                 components[DIVIDER_INDEX] = component;
@@ -238,7 +240,7 @@
 
         public void addLayoutComponent(final Component comp, final Object constraints) {
             if (!(constraints instanceof String)) {
-                throw new IllegalArgumentException("constraints must be String");
+                throw new IllegalArgumentException(Messages.getString("swing.74")); //$NON-NLS-1$
             }
             addLayoutComponent((String)constraints, comp);
         }
@@ -722,7 +724,7 @@
     @Override
     public int getDividerLocation(final JSplitPane jc) {
         if (jc == null) { // Fix for HARMONY-2661, for compatibility with RI
-            throw new NullPointerException("jc is null");
+            throw new NullPointerException(Messages.getString("swing.03","jc")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         return dividerLocation;
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableUI.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableUI.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableUI.java Thu Mar  1 05:24:01 2007
@@ -54,6 +54,8 @@
 
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class BasicTableUI extends TableUI {
     public class FocusHandler implements FocusListener {
@@ -323,7 +325,7 @@
 
     public void paint(final Graphics g, final JComponent c) {
         if (g == null) {
-            throw new NullPointerException("context is null");
+            throw new NullPointerException(Messages.getString("swing.03","context")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         if (table.getColumnCount() == 0 || table.getRowCount() == 0) {
             return;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTextAreaUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTextAreaUI.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTextAreaUI.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTextAreaUI.java Thu Mar  1 05:24:01 2007
@@ -36,6 +36,8 @@
 
 import org.apache.harmony.x.swing.StringConstants;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class BasicTextAreaUI extends BasicTextUI {
     private static final String PLAIN_VIEW_I18N_CLASS =
         "javax.swing.text.PlainViewI18N";
@@ -88,7 +90,7 @@
     @Override
     public Dimension getMinimumSize(final JComponent c) {
         if (!(c instanceof JTextComponent)) {
-            throw new IllegalArgumentException("not text component");
+            throw new IllegalArgumentException(Messages.getString("swing.77")); //$NON-NLS-1$
         }
         Dimension dim = super.getMinimumSize(c);
         Caret caret = ((JTextComponent)c).getCaret();
@@ -101,7 +103,7 @@
     @Override
     public Dimension getPreferredSize(final JComponent c) {
         if (!(c instanceof JTextComponent)) {
-            throw new IllegalArgumentException("not text component");
+            throw new IllegalArgumentException(Messages.getString("swing.77")); //$NON-NLS-1$
         }
         Dimension dim = super.getPreferredSize(c);
 
@@ -127,4 +129,4 @@
             modelChanged();
         }
     }
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/DefaultTableColumnModel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/DefaultTableColumnModel.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/DefaultTableColumnModel.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/DefaultTableColumnModel.java Thu Mar  1 05:24:01 2007
@@ -38,6 +38,8 @@
 import javax.swing.event.TableColumnModelEvent;
 import javax.swing.event.TableColumnModelListener;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class DefaultTableColumnModel implements TableColumnModel, PropertyChangeListener, ListSelectionListener, Serializable {
     protected Vector<TableColumn> tableColumns = new Vector<TableColumn>();
     protected ListSelectionModel selectionModel;
@@ -55,7 +57,7 @@
 
     public void addColumn(final TableColumn column) {
         if (column == null) {
-            throw new IllegalArgumentException("Column must be not null");
+            throw new IllegalArgumentException(Messages.getString("swing.78")); //$NON-NLS-1$
         }
         tableColumns.add(column);
         totalColumnWidth = -1;
@@ -78,7 +80,7 @@
         if (columnIndex < 0 || columnIndex >= getColumnCount()
             || newIndex < 0 || newIndex > getColumnCount()) {
 
-            throw new IllegalArgumentException("Specified index is out of range");
+            throw new IllegalArgumentException(Messages.getString("swing.79")); //$NON-NLS-1$
         }
 
         if (columnIndex != newIndex) {
@@ -120,7 +122,7 @@
 
     public int getColumnIndex(final Object identifier) {
         if (identifier == null) {
-            throw new IllegalArgumentException("Identifier must be not null");
+            throw new IllegalArgumentException(Messages.getString("swing.7A")); //$NON-NLS-1$
         }
 
         for (int i = 0; i < getColumnCount(); i++) {
@@ -130,7 +132,7 @@
             }
         }
 
-        throw new IllegalArgumentException("Identifier is not found");
+        throw new IllegalArgumentException(Messages.getString("swing.7B")); //$NON-NLS-1$
     }
 
     public TableColumn getColumn(final int columnIndex) {
@@ -160,7 +162,7 @@
 
     public void setSelectionModel(final ListSelectionModel model) {
         if (model == null) {
-            throw new IllegalArgumentException("Model must be not-null");
+            throw new IllegalArgumentException(Messages.getString("swing.7C")); //$NON-NLS-1$
         }
         selectionModel.removeListSelectionListener(this);
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/JTableHeader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/JTableHeader.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/JTableHeader.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/JTableHeader.java Thu Mar  1 05:24:01 2007
@@ -54,11 +54,13 @@
 import javax.swing.event.TableColumnModelListener;
 import javax.swing.plaf.TableHeaderUI;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class JTableHeader extends JComponent implements TableColumnModelListener, Accessible {
     protected class AccessibleJTableHeader extends AccessibleJComponent {
         protected class AccessibleJTableHeaderEntry extends AccessibleContext implements Accessible, AccessibleComponent {
             public AccessibleJTableHeaderEntry(final int c, final JTableHeader p, final JTable t) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public AccessibleContext getAccessibleContext() {
@@ -66,179 +68,179 @@
             }
 
             public String getAccessibleName() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void setAccessibleName(final String s) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public String getAccessibleDescription() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void setAccessibleDescription(final String s) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public AccessibleRole getAccessibleRole() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public AccessibleStateSet getAccessibleStateSet() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public int getAccessibleIndexInParent() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public int getAccessibleChildrenCount() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public Accessible getAccessibleChild(final int i) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public Locale getLocale() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void addPropertyChangeListener(final PropertyChangeListener l) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void removePropertyChangeListener(final PropertyChangeListener l) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public AccessibleAction getAccessibleAction() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public AccessibleComponent getAccessibleComponent() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public AccessibleSelection getAccessibleSelection() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public AccessibleText getAccessibleText() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public AccessibleValue getAccessibleValue() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public Color getBackground() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void setBackground(final Color c) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public Color getForeground() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void setForeground(final Color c) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public Cursor getCursor() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void setCursor(final Cursor c) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public Font getFont() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void setFont(final Font f) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public FontMetrics getFontMetrics(final Font f) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public boolean isEnabled() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void setEnabled(final boolean b) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public boolean isVisible() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void setVisible(final boolean b) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public boolean isShowing() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public boolean contains(final Point p) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public Point getLocationOnScreen() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public Point getLocation() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void setLocation(final Point p) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public Rectangle getBounds() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void setBounds(final Rectangle r) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public Dimension getSize() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void setSize(final Dimension d) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public Accessible getAccessibleAt(final Point p) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public boolean isFocusTraversable() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void requestFocus() {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void addFocusListener(final FocusListener l) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
 
             public void removeFocusListener(final FocusListener l) {
-                throw new UnsupportedOperationException("Not implemented");
+                throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
             }
         }
 
@@ -247,15 +249,15 @@
         }
 
         public Accessible getAccessibleAt(final Point p) {
-            throw new UnsupportedOperationException("Not implemented");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
 
         public int getAccessibleChildrenCount() {
-            throw new UnsupportedOperationException("Not implemented");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
 
         public Accessible getAccessibleChild(final int i) {
-            throw new UnsupportedOperationException("Not implemented");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
     }
 
@@ -437,7 +439,7 @@
 
     public void setColumnModel(final TableColumnModel cm) {
         if (cm == null) {
-            throw new IllegalArgumentException("Null model cannot be used");
+            throw new IllegalArgumentException(Messages.getString("swing.7D")); //$NON-NLS-1$
         }
 
         columnModel.removeColumnModelListener(this);
@@ -548,4 +550,5 @@
         return ((JComponent)renderingComponent).getToolTipText();
     }
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java Thu Mar  1 05:24:01 2007
@@ -51,6 +51,8 @@
 import org.apache.harmony.awt.text.TextUtils;
 import org.apache.harmony.x.swing.StringConstants;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public abstract class AbstractDocument implements Document, Serializable {
 
@@ -878,8 +880,7 @@
 
         public final synchronized void writeLock() {
             if (callingListeners) {
-                throw new IllegalStateException("Document cannot be modified "
-                                                + "from listener handler");
+                throw new IllegalStateException(Messages.getString("swing.7E")); //$NON-NLS-1$
             }
 
             final Thread thread = Thread.currentThread();
@@ -1368,11 +1369,11 @@
         }
 
         if (offset < 0 || offset > getLength()) {
-            throw new BadLocationException("Invalid remove position", offset);
+            throw new BadLocationException(Messages.getString("swing.7F"), offset); //$NON-NLS-1$
         }
 
         if (offset + length > getLength()) {
-            throw new BadLocationException("Invalid remove length",
+            throw new BadLocationException(Messages.getString("swing.80"), //$NON-NLS-1$
                                            offset + length);
         }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/BoxView.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/BoxView.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/BoxView.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/BoxView.java Thu Mar  1 05:24:01 2007
@@ -29,6 +29,8 @@
 import org.apache.harmony.x.swing.SizeRequirementsHelper;
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class BoxView extends CompositeView {
     private static final int[] EMPTY_INT_ARRAY = new int[0];
     private static final SizeRequirements[] EMPTY_REQUIREMENTS_ARRAY =
@@ -484,7 +486,7 @@
 
     private void isAxisValid(final int axis) {
         if (axis != X_AXIS && axis != Y_AXIS) {
-            throw new IllegalArgumentException("Invalid axis");
+            throw new IllegalArgumentException(Messages.getString("swing.81")); //$NON-NLS-1$
         }
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/ComponentView.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/ComponentView.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/ComponentView.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/ComponentView.java Thu Mar  1 05:24:01 2007
@@ -33,6 +33,8 @@
 
 import org.apache.harmony.awt.text.TextUtils;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class ComponentView extends View {
 
     private static final class ComponentViewLayout implements LayoutManager {
@@ -185,9 +187,9 @@
 
     private void isAxisValid(final int axis) {
         if (axis != X_AXIS && axis != Y_AXIS) {
-            throw new IllegalArgumentException("Invalid axis: " + axis);
+            throw new IllegalArgumentException(Messages.getString("swing.00", axis)); //$NON-NLS-1$
         }
     }
     
     
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/CompositeView.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/CompositeView.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/CompositeView.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/CompositeView.java Thu Mar  1 05:24:01 2007
@@ -27,6 +27,8 @@
 
 import org.apache.harmony.awt.text.TextUtils;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public abstract class CompositeView extends View {
     private View[] children;
@@ -125,8 +127,7 @@
                     getChildAllocation(index, shape), bias);
         }
 
-        throw new BadLocationException("View representing " + pos
-                                       + " not found", pos);
+        throw new BadLocationException(Messages.getString("swing.83", pos), pos); //$NON-NLS-1$
     }
 
     @Override
@@ -137,14 +138,12 @@
         // TODO should throw IllegalArgumentException for invalid bias arg
         int index1 = getViewIndex(p1, b1);
         if (index1 == -1) {
-            throw new BadLocationException("View representing " + p1
-                                           + " not found", p1);
+            throw new BadLocationException(Messages.getString("swing.83", p1), p1); //$NON-NLS-1$
         }
 
         int index2 = getViewIndex(p2, b2);
         if (index2 == -1) {
-            throw new BadLocationException("View representing " + p2
-                                           + " not found", p2);
+            throw new BadLocationException(Messages.getString("swing.83", p2), p2); //$NON-NLS-1$
         }
 
         Rectangle rc1;
@@ -220,7 +219,7 @@
                                                        direction, biasRet);
         }
 
-        throw new IllegalArgumentException("Invalid direction");
+        throw new IllegalArgumentException(Messages.getString("swing.84")); //$NON-NLS-1$
     }
 
     protected void loadChildren(final ViewFactory factory) {
@@ -329,7 +328,7 @@
                                                        biasRet);
         }
 
-        throw new IllegalArgumentException("Invalid direction");
+        throw new IllegalArgumentException(Messages.getString("swing.84")); //$NON-NLS-1$
     }
 
     protected int getNextNorthSouthVisualPositionFrom(final int pos,
@@ -346,7 +345,7 @@
                                                        biasRet);
         }
 
-        throw new IllegalArgumentException("Invalid direction");
+        throw new IllegalArgumentException(Messages.getString("swing.84")); //$NON-NLS-1$
     }
 
     protected boolean flipEastAndWestAtEnds(final int position,

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/ContentPositions.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/ContentPositions.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/ContentPositions.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/ContentPositions.java Thu Mar  1 05:24:01 2007
@@ -29,6 +29,8 @@
 import java.util.List;
 import java.util.Vector;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 abstract class ContentPositions {
     public final class DocumentMark implements Position, Comparable {
         protected int index;
@@ -131,7 +133,7 @@
             throws BadLocationException {
 
         if (offset < 0) {
-            throw new BadLocationException("Invalid position offset", offset);
+            throw new BadLocationException(Messages.getString("swing.85"), offset); //$NON-NLS-1$
         }
 
         return new WeakPosition(offset);

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java Thu Mar  1 05:24:01 2007
@@ -58,6 +58,8 @@
 import org.apache.harmony.awt.text.TextUtils;
 import org.apache.harmony.x.swing.StringConstants;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class DefaultCaret extends Rectangle implements Caret, FocusListener,
         MouseListener, MouseMotionListener {
 
@@ -983,7 +985,7 @@
      */
     public void setBlinkRate(final int i) {
         if (i < 0) {
-            throw new IllegalArgumentException("Invalid delay: " + i);
+            throw new IllegalArgumentException(Messages.getString("swing.64", i)); //$NON-NLS-1$
         }
         blinkRate = i;
         stopTimer(blinkTimer);

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultFormatter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultFormatter.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultFormatter.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultFormatter.java Thu Mar  1 05:24:01 2007
@@ -26,6 +26,8 @@
 import javax.swing.SwingUtilities;
 import javax.swing.text.DocumentFilter.FilterBypass;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>DefaultFormatter</i>
@@ -280,7 +282,7 @@
         }
        Object result = stringToValue(string, valueClass);
        if (result == null) {
-           throw new ParseException("Error creating instance", 0);
+           throw new ParseException(Messages.getString("swing.86"), 0); //$NON-NLS-1$
        }
        return result;
     }
@@ -332,4 +334,5 @@
         return (value != null) ? text : "";
     }
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultGlyphPainter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultGlyphPainter.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultGlyphPainter.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultGlyphPainter.java Thu Mar  1 05:24:01 2007
@@ -43,6 +43,8 @@
 import org.apache.harmony.awt.text.TextKit;
 import org.apache.harmony.awt.text.TextUtils;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * Default GlyphPainter which is used when a GlyphView needs a painter but
  * none was set.
@@ -86,10 +88,7 @@
             throws BadLocationException {
 
             if (true) {
-                throw new UnsupportedOperationException("Default painter of "
-                                                        + "GlyphView can't "
-                                                        + "paint composed "
-                                                        + "text.");
+                throw new UnsupportedOperationException(Messages.getString("swing.87")); //$NON-NLS-1$
             }
             return x;
         }
@@ -161,8 +160,7 @@
         throws BadLocationException {
 
         if (offset < v.getStartOffset() || offset > v.getEndOffset()) {
-            throw new BadLocationException("This view doesn't represent "
-                                           + "offset " + offset, offset);
+            throw new BadLocationException(Messages.getString("swing.88", offset), offset); //$NON-NLS-1$
         }
 
         final Segment text = v.getText(v.getStartOffset(), offset);

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultHighlighter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultHighlighter.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultHighlighter.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultHighlighter.java Thu Mar  1 05:24:01 2007
@@ -30,6 +30,8 @@
 import org.apache.harmony.awt.text.TextKit;
 import org.apache.harmony.awt.text.TextUtils;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 
 public class DefaultHighlighter extends LayeredHighlighter {
@@ -379,10 +381,10 @@
     private void checkBoundaries(final int start, final int end)
        throws BadLocationException {
         if (start < 0) {
-            throw new BadLocationException("Invalid position: " + start, end);
+            throw new BadLocationException(Messages.getString("swing.89", start), end); //$NON-NLS-1$
         }
         if (end < start) {
-            throw new BadLocationException("Invalid position: " + start, end);
+            throw new BadLocationException(Messages.getString("swing.89", start), end); //$NON-NLS-1$
         }
     }
 
@@ -431,4 +433,5 @@
     }
 
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/EmptyAttributeSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/EmptyAttributeSet.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/EmptyAttributeSet.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/EmptyAttributeSet.java Thu Mar  1 05:24:01 2007
@@ -24,6 +24,8 @@
 import java.util.Enumeration;
 import java.util.NoSuchElementException;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * Implementation of empty attribute set.
  *
@@ -65,7 +67,7 @@
                 return false;
             }
             public Object nextElement() {
-                throw new NoSuchElementException("Empty attribute set");
+                throw new NoSuchElementException(Messages.getString("swing.8A")); //$NON-NLS-1$
             }
         };
     }



Mime
View raw message