harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r513311 [1/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
Author: apetrenko
Date: Thu Mar  1 05:24:01 2007
New Revision: 513311

URL: http://svn.apache.org/viewvc?view=rev&rev=513311
Log:
Patch for HARMONY-1320 "[classlib][internationalization]Internationalization of the swing module"

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/BequestedFocusTraversalPolicy.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Box.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/BoxLayout.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ComponentInputMap.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/DefaultBoundedRangeModel.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/DefaultListSelectionModel.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/GrayFilter.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JColorChooser.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComboBox.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComponent.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JEditorPane.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JFileChooser.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JFormattedTextField.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JLabel.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JList.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenu.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenuItem.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JOptionPane.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JPopupMenu.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JProgressBar.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JScrollBar.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JScrollPane.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSeparator.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSlider.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSpinner.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSplitPane.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTabbedPane.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTable.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextArea.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextField.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextPane.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToggleButton.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToolBar.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToolTip.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTree.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JViewport.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/LayoutFocusTraversalPolicy.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/LookAndFeel.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/OverlayLayout.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Popup.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/PopupFactory.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ScrollPaneLayout.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SortingFocusTraversalPolicy.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerDateModel.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerListModel.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SpinnerNumberModel.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/SwingUtilities.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Timer.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ToolTipManager.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/UIDefaults.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/UIManager.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/BevelBorder.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/EtchedBorder.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/border/TitledBorder.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/event/TreeSelectionEvent.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/filechooser/FileSystemView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/BorderUIResource.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/IconUIResource.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboBoxUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboPopup.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicDesktopIconUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicListUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicMenuItemUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicOptionPaneUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicProgressBarUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSplitPaneUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTextAreaUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/DefaultTableColumnModel.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/JTableHeader.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/BoxView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/ComponentView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/CompositeView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/ContentPositions.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultFormatter.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultGlyphPainter.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultHighlighter.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/EmptyAttributeSet.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/FlowView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/GapContent.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/IconView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/InternationalFormatter.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/JTextComponent.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/MaskFormatter.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/ParagraphView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/PasswordView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/PlainView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/PlainViewI18N.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/Segment.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/StringContent.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/StyleContext.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/StyledEditorKit.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/TabSet.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/WrappedPlainView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/CSS.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/CascadedStyle.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLDocument.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLEditorKit.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/MinimalHTMLWriter.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ObjectView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/StyleSheet.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/Parser.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ParserCup.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultMutableTreeNode.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeModel.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeSelectionModel.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/FixedHeightLayoutCache.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/TreePath.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/BlitSupport.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/Utilities.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/internal/nls/messages.properties
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/windows/org/apache/harmony/x/swing/filechooser/windows/WinFileManager.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java Thu Mar  1 05:24:01 2007
@@ -50,6 +50,7 @@
 import org.apache.harmony.x.swing.ButtonCommons;
 import org.apache.harmony.x.swing.StringConstants;
 import org.apache.harmony.x.swing.Utilities;
+import org.apache.harmony.x.swing.internal.nls.Messages;
 
 /**
  * <p>
@@ -803,7 +804,7 @@
 
     public void setMultiClickThreshhold(long threshold) {
         if (threshold < 0) {
-            throw new IllegalArgumentException("threshhold must be >= 0");
+            throw new IllegalArgumentException(Messages.getString("swing.05")); //$NON-NLS-1$
         }
         multiClickThreshhold = threshold;
     }
@@ -853,7 +854,7 @@
 
     public void setDisplayedMnemonicIndex(int index) throws IllegalArgumentException {
         if (index < -1 || index >= 0 && (text == null || index >= text.length())) {
-            throw new IllegalArgumentException("index == " + index);
+            throw new IllegalArgumentException(Messages.getString("swing.10",index)); //$NON-NLS-1$
         }
         int oldValue = mnemonicIndex;
         mnemonicIndex = index;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/BequestedFocusTraversalPolicy.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/BequestedFocusTraversalPolicy.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/BequestedFocusTraversalPolicy.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/BequestedFocusTraversalPolicy.java Thu Mar  1 05:24:01 2007
@@ -21,6 +21,8 @@
 import java.awt.Container;
 import java.awt.FocusTraversalPolicy;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 class BequestedFocusTraversalPolicy extends FocusTraversalPolicy {
     private final FocusTraversalPolicy ancestor;
 
@@ -41,7 +43,7 @@
         super();
         this.ancestor = ancestor;
         if (this.ancestor == null) {
-            throw new IllegalArgumentException("Ancestor shouldn't be null");
+            throw new IllegalArgumentException(Messages.getString("swing.06")); //$NON-NLS-1$
         }
         this.fixedComponent = fixedComponent;
         this.fixedNextComponent = fixedNextComponent;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Box.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Box.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Box.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/Box.java Thu Mar  1 05:24:01 2007
@@ -26,6 +26,8 @@
 import javax.accessibility.AccessibleContext;
 import javax.accessibility.AccessibleRole;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class Box extends JComponent implements Accessible {
     private static final long serialVersionUID = 1525417495883046342L;
 
@@ -117,7 +119,7 @@
 
     @Override
     public void setLayout(LayoutManager layout) {
-        throw new AWTError("Illegal request");
+        throw new AWTError(Messages.getString("swing.err.01")); //$NON-NLS-1$
     }
 
     public static Component createRigidArea(Dimension size) {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/BoxLayout.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/BoxLayout.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/BoxLayout.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/BoxLayout.java Thu Mar  1 05:24:01 2007
@@ -24,6 +24,8 @@
 import java.awt.LayoutManager2;
 import java.io.Serializable;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class BoxLayout implements LayoutManager2, Serializable {
     private static final long serialVersionUID = -2474455742719112368L;
 
@@ -119,7 +121,7 @@
                         : LayoutParameters.HORIZONTAL_ALIGNMENT;
             }
         } else {
-            throw new AWTError("Invalid axis");
+            throw new AWTError(Messages.getString("swing.err.04")); //$NON-NLS-1$
         }
         return alignment;
     }
@@ -131,7 +133,7 @@
      */
     private void checkTarget(final Container target) {
         if (this.target != target) {
-            throw new AWTError("BoxLayout should be used for one container only");
+            throw new AWTError(Messages.getString("swing.err.02")); //$NON-NLS-1$
         }
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ComponentInputMap.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ComponentInputMap.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ComponentInputMap.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/ComponentInputMap.java Thu Mar  1 05:24:01 2007
@@ -17,6 +17,8 @@
 
 package javax.swing;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>ComponentInputMap</i>
@@ -34,8 +36,7 @@
 
     public ComponentInputMap(JComponent component) {
         if (component == null) {
-            throw new IllegalArgumentException(
-                    "ComponentInputMaps must be associated with a non-null JComponent");
+            throw new IllegalArgumentException(Messages.getString("swing.57")); //$NON-NLS-1$
         }
         this.component = component;
     }
@@ -63,8 +64,7 @@
         if (parent != null
                 && (!(parent instanceof ComponentInputMap) || (((ComponentInputMap) parent)
                         .getComponent() != component))) {
-            throw new IllegalArgumentException(
-                    "ComponentInputMap must have a ComponentInputMap parent associated with the same component");
+            throw new IllegalArgumentException(Messages.getString("swing.4D")); //$NON-NLS-1$
         }
         super.setParent(parent);
         if (component != null) {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/DefaultBoundedRangeModel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/DefaultBoundedRangeModel.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/DefaultBoundedRangeModel.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/DefaultBoundedRangeModel.java Thu Mar  1 05:24:01 2007
@@ -22,6 +22,8 @@
 import javax.swing.event.ChangeListener;
 import javax.swing.event.EventListenerList;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>DefaultBoundedRangeModel</i>
@@ -57,7 +59,7 @@
 
     public DefaultBoundedRangeModel(int value, int extent, int min, int max) {
         if (min > value || value > value + extent || value + extent > max) {
-            throw new IllegalArgumentException("invalid range properties");
+            throw new IllegalArgumentException(Messages.getString("swing.07")); //$NON-NLS-1$
         }
         this.min = min;
         this.max = max;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/DefaultListSelectionModel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/DefaultListSelectionModel.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/DefaultListSelectionModel.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/DefaultListSelectionModel.java Thu Mar  1 05:24:01 2007
@@ -24,6 +24,8 @@
 import javax.swing.event.ListSelectionListener;
 import org.apache.harmony.awt.gl.MultiRectArea;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>DefaultListSelectionModel</i>
@@ -326,7 +328,7 @@
     public void setSelectionMode(int selectionMode) {
         if (selectionMode != SINGLE_SELECTION && selectionMode != SINGLE_INTERVAL_SELECTION
                 && selectionMode != MULTIPLE_INTERVAL_SELECTION) {
-            throw new IllegalArgumentException("Incorrect selection mode is specified");
+            throw new IllegalArgumentException(Messages.getString("swing.08")); //$NON-NLS-1$
         }
         this.selectionMode = selectionMode;
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/GrayFilter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/GrayFilter.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/GrayFilter.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/GrayFilter.java Thu Mar  1 05:24:01 2007
@@ -28,6 +28,8 @@
 import java.awt.image.FilteredImageSource;
 import java.awt.image.RGBImageFilter;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class GrayFilter extends RGBImageFilter {
     private static final float INTERVAL_BOUND = 1f / 3;
     
@@ -41,7 +43,7 @@
 
     public GrayFilter(boolean bright, int grayPercentage) {
         if (grayPercentage < 0 || grayPercentage > 100) {
-            throw new IllegalArgumentException("Incorrect range for grayscale factor");
+            throw new IllegalArgumentException(Messages.getString("swing.09")); //$NON-NLS-1$
         }
 
         canFilterIndexColorModel = true;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JColorChooser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JColorChooser.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JColorChooser.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JColorChooser.java Thu Mar  1 05:24:01 2007
@@ -36,6 +36,7 @@
 import javax.swing.colorchooser.DefaultColorSelectionModel;
 import javax.swing.plaf.ColorChooserUI;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
 /**
  * <p>
  * <i>JColorChooser</i>
@@ -251,7 +252,7 @@
             }
         }
         if (panelToRemove == null) {
-            throw new IllegalArgumentException("panel to remove can not be found");
+            throw new IllegalArgumentException(Messages.getString("swing.0A")); //$NON-NLS-1$
         }
         AbstractColorChooserPanel[] newChooserPanels = new AbstractColorChooserPanel[chooserPanels.length - 1];
         System.arraycopy(chooserPanels, 0, newChooserPanels, 0, index);

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComboBox.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComboBox.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComboBox.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComboBox.java Thu Mar  1 05:24:01 2007
@@ -40,6 +40,7 @@
 import javax.swing.event.PopupMenuListener;
 import javax.swing.plaf.ComboBoxUI;
 import org.apache.harmony.luni.util.NotImplementedException;
+import org.apache.harmony.x.swing.internal.nls.Messages;
 import org.apache.harmony.x.swing.StringConstants;
 
 /**
@@ -348,8 +349,7 @@
 
     public void setSelectedIndex(int index) {
         if (index < -1 || index >= dataModel.getSize()) {
-            throw new IllegalArgumentException(
-                    "Selected index should in the range of available indices");
+            throw new IllegalArgumentException(Messages.getString("swing.0C")); //$NON-NLS-1$
         }
         if (index == -1) {
             setSelectedItem(null);
@@ -387,7 +387,7 @@
         if (dataModel instanceof MutableComboBoxModel) {
             ((MutableComboBoxModel) dataModel).addElement(element);
         } else {
-            throw new RuntimeException("Cannot modify immutable data model");
+            throw new RuntimeException(Messages.getString("swing.0B")); //$NON-NLS-1$
         }
     }
 
@@ -396,7 +396,7 @@
         if (dataModel instanceof MutableComboBoxModel) {
             ((MutableComboBoxModel) dataModel).insertElementAt(element, index);
         } else {
-            throw new RuntimeException("Cannot modify immutable data model");
+            throw new RuntimeException(Messages.getString("swing.0B")); //$NON-NLS-1$
         }
     }
 
@@ -405,7 +405,7 @@
         if (dataModel instanceof MutableComboBoxModel) {
             ((MutableComboBoxModel) dataModel).removeElement(element);
         } else {
-            throw new RuntimeException("Cannot modify immutable data model");
+            throw new RuntimeException(Messages.getString("swing.0B")); //$NON-NLS-1$
         }
     }
 
@@ -414,7 +414,7 @@
         if (dataModel instanceof MutableComboBoxModel) {
             ((MutableComboBoxModel) dataModel).removeElementAt(index);
         } else {
-            throw new RuntimeException("Cannot modify immutable data model");
+            throw new RuntimeException(Messages.getString("swing.0B")); //$NON-NLS-1$
         }
     }
 
@@ -426,7 +426,7 @@
                 model.removeElementAt(0);
             }
         } else {
-            throw new RuntimeException("Cannot modify immutable data model");
+            throw new RuntimeException(Messages.getString("swing.0B")); //$NON-NLS-1$
         }
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComponent.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComponent.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComponent.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComponent.java Thu Mar  1 05:24:01 2007
@@ -82,6 +82,7 @@
 import javax.swing.plaf.ComponentUI;
 import org.apache.harmony.awt.ClipRegion;
 import org.apache.harmony.awt.gl.MultiRectArea;
+import org.apache.harmony.x.swing.internal.nls.Messages;
 import org.apache.harmony.x.swing.StringConstants;
 import org.apache.harmony.x.swing.Utilities;
 
@@ -681,8 +682,7 @@
     public final void setInputMap(int condition, InputMap map) {
         if (condition == WHEN_IN_FOCUSED_WINDOW && !(map instanceof ComponentInputMap)
                 && map != null) {
-            throw new IllegalArgumentException("For WHEN_IN_FOCUSED_WINDOW condition "
-                    + "ComponentInputMap has to be provided");
+            throw new IllegalArgumentException(Messages.getString("swing.0D","WHEN_IN_FOCUSED_WINDOW")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         if (condition < FIRST_INPUT_MAP_INDEX || condition > LAST_INPUT_MAP_INDEX) {
             throw new IllegalArgumentException(ILLEGAL_CONDITION_MESSAGE);

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JEditorPane.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JEditorPane.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JEditorPane.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JEditorPane.java Thu Mar  1 05:24:01 2007
@@ -57,6 +57,8 @@
 import org.apache.harmony.luni.util.NotImplementedException;
 import org.apache.harmony.x.swing.StringConstants;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>JEditorPane</i>
@@ -559,7 +561,7 @@
 
     public final void setContentType(final String type) {
         if (type == null) {
-            throw new NullPointerException("Content type is null");
+            throw new NullPointerException(Messages.getString("swing.03","Content type")); //$NON-NLS-1$ //$NON-NLS-2$
         }
 
         int index = contentTypes.indexOf(type);
@@ -677,7 +679,7 @@
 
     public void setPage(final URL page) throws IOException {
         if (page == null) {
-            throw new IOException("Page is null");
+            throw new IOException(Messages.getString("swing.03","Page")); //$NON-NLS-1$ //$NON-NLS-2$
         } 
 
         String url = page.toString();

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JFileChooser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JFileChooser.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JFileChooser.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JFileChooser.java Thu Mar  1 05:24:01 2007
@@ -35,6 +35,8 @@
 import javax.swing.plaf.FileChooserUI;
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>JFileChooser</i>
@@ -387,7 +389,7 @@
     public void setDialogType(final int dialogType) {
         if (dialogType != OPEN_DIALOG && dialogType != SAVE_DIALOG
                 && dialogType != CUSTOM_DIALOG) {
-            throw new IllegalArgumentException("Incorrect dialog type is specified");
+            throw new IllegalArgumentException(Messages.getString("swing.11")); //$NON-NLS-1$
         }
         int oldValue = this.dialogType;
         this.dialogType = dialogType;
@@ -418,7 +420,7 @@
 
     public void setFileSelectionMode(final int mode) {
         if (mode != FILES_ONLY && mode != DIRECTORIES_ONLY && mode != FILES_AND_DIRECTORIES) {
-            throw new IllegalArgumentException("Incorrect file selection mode is psecified");
+            throw new IllegalArgumentException(Messages.getString("swing.12")); //$NON-NLS-1$
         }
         int oldValue = fileSelectionMode;
         fileSelectionMode = mode;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JFormattedTextField.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JFormattedTextField.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JFormattedTextField.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JFormattedTextField.java Thu Mar  1 05:24:01 2007
@@ -41,6 +41,8 @@
 import javax.swing.text.NumberFormatter;
 import javax.swing.text.TextAction;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>JFormattedTextField</i>
@@ -455,10 +457,10 @@
     public void setFocusLostBehavior(final int behavior) {
         if (behavior != COMMIT && behavior != COMMIT_OR_REVERT && behavior != PERSIST
                 && behavior != REVERT) {
-            throw new IllegalArgumentException("setFocusLostBehavior " + "must be one of: "
-                    + "JFormattedTextField.COMMIT, " + "JFormattedTextField.COMMIT_OR_"
-                    + "REVERT, " + "JFormattedTextField.PERSIST "
-                    + "or JFormattedTextField.REVERT");
+            throw new IllegalArgumentException("setFocusLostBehavior" + Messages.getString("swing.13") //$NON-NLS-1$ //$NON-NLS-2$
+                    + "JFormattedTextField.COMMIT, " + "JFormattedTextField.COMMIT_OR_" //$NON-NLS-1$ //$NON-NLS-2$
+                    + "REVERT, " + "JFormattedTextField.PERSIST " //$NON-NLS-1$ //$NON-NLS-2$
+                    + "or JFormattedTextField.REVERT"); //$NON-NLS-1$
         }
         focusLostBehaviour = behavior;
     }
@@ -584,4 +586,4 @@
             docListener = new DocumentListenerImpl();
         }
     }
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JLabel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JLabel.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JLabel.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JLabel.java Thu Mar  1 05:24:01 2007
@@ -33,6 +33,8 @@
 import org.apache.harmony.x.swing.StringConstants;
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>JLabel</i>
@@ -294,7 +296,7 @@
 
     public void setDisplayedMnemonicIndex(final int index) {
         if (index < -1 || index >= 0 && (text == null || index >= text.length())) {
-            throw new IllegalArgumentException("Invalid index is specified");
+            throw new IllegalArgumentException(Messages.getString("swing.14")); //$NON-NLS-1$
         }
         int oldValue = this.displayedMnemonicIndex;
         this.displayedMnemonicIndex = index;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JList.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JList.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JList.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JList.java Thu Mar  1 05:24:01 2007
@@ -64,6 +64,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 JList extends JComponent implements Scrollable, Accessible {
     public static final int VERTICAL = 0;
@@ -395,7 +397,7 @@
 
     public JList(final ListModel model) {
         if (model == null) {
-            throw new IllegalArgumentException("data model must be not null");
+            throw new IllegalArgumentException(Messages.getString("swing.15")); //$NON-NLS-1$
         }
         this.model = model;
         this.selectionModel = createSelectionModel();
@@ -407,7 +409,7 @@
 
     public void setModel(final ListModel model) {
         if (model == null) {
-            throw new IllegalArgumentException("Model cannot be null");
+            throw new IllegalArgumentException(Messages.getString("swing.16")); //$NON-NLS-1$
         }
 
         if (this.model != model) {
@@ -424,7 +426,7 @@
 
     public void setSelectionModel(final ListSelectionModel selectionModel) {
         if (selectionModel == null) {
-            throw new IllegalArgumentException("Selection model must be not null");
+            throw new IllegalArgumentException(Messages.getString("swing.17")); //$NON-NLS-1$
         }
 
         if (this.selectionModel != selectionModel) {
@@ -522,7 +524,7 @@
 
     public void setDragEnabled(final boolean dragEnabled) {
         if (dragEnabled && GraphicsEnvironment.isHeadless()) {
-            throw new HeadlessException("DnD could not be used in headless environment");
+            throw new HeadlessException(Messages.getString("swing.18")); //$NON-NLS-1$
         }
 
         this.dragEnabled = dragEnabled;
@@ -564,7 +566,7 @@
             && layoutOrientation != VERTICAL_WRAP
             && layoutOrientation != HORIZONTAL_WRAP) {
 
-            throw new IllegalArgumentException("Incorect layout orientation is specified");
+            throw new IllegalArgumentException(Messages.getString("swing.19")); //$NON-NLS-1$
         }
 
         if (this.layoutOrientation != layoutOrientation) {
@@ -856,10 +858,10 @@
 
     public int getScrollableBlockIncrement(final Rectangle visibleRect, final int orientation, final int direction) {
         if (visibleRect == null) {
-            throw new IllegalArgumentException("Visible region should be not null");
+            throw new IllegalArgumentException(Messages.getString("swing.1A")); //$NON-NLS-1$
         }
         if (orientation != SwingConstants.VERTICAL && orientation != SwingConstants.HORIZONTAL) {
-            throw new IllegalArgumentException("Incorrect orientation is specified");
+            throw new IllegalArgumentException(Messages.getString("swing.1B")); //$NON-NLS-1$
         }
 
         if (orientation == SwingConstants.VERTICAL) {
@@ -909,10 +911,10 @@
 
     public int getScrollableUnitIncrement(final Rectangle visibleRect, final int orientation, final int direction) {
         if (visibleRect == null) {
-            throw new IllegalArgumentException("Visible region should be not null");
+            throw new IllegalArgumentException(Messages.getString("swing.1A")); //$NON-NLS-1$
         }
         if (orientation != SwingConstants.VERTICAL && orientation != SwingConstants.HORIZONTAL) {
-            throw new IllegalArgumentException("Incorrect orientation is specified");
+            throw new IllegalArgumentException(Messages.getString("swing.1B")); //$NON-NLS-1$
         }
 
         if (orientation == SwingConstants.HORIZONTAL) {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenu.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenu.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenu.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenu.java Thu Mar  1 05:24:01 2007
@@ -34,6 +34,8 @@
 import org.apache.harmony.luni.util.NotImplementedException;
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>JMenu</i>
@@ -331,7 +333,7 @@
 
     public void setDelay(int delay) {
         if (delay < 0) {
-            throw new IllegalArgumentException("Delay must be positive");
+            throw new IllegalArgumentException(Messages.getString("swing.1C")); //$NON-NLS-1$
         }
         this.delay = delay;
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenuItem.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenuItem.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenuItem.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenuItem.java Thu Mar  1 05:24:01 2007
@@ -37,6 +37,8 @@
 
 import org.apache.harmony.x.swing.StringConstants;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class JMenuItem extends AbstractButton implements Accessible, MenuElement {
 
@@ -52,7 +54,7 @@
         }
 
         public void stateChanged(final ChangeEvent e) {
-            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/JOptionPane.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JOptionPane.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JOptionPane.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JOptionPane.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;
+
 
 public class JOptionPane extends JComponent implements Accessible {
 
@@ -400,7 +402,7 @@
         JDesktopPane desktop = JOptionPane.getDesktopPaneForComponent(parentComponent);
         Container parent = (desktop != null) ? desktop : parentComponent.getParent();
         if (parent == null) {
-            throw new RuntimeException("JOptionPane: parentComponent does not have a valid parent");
+            throw new RuntimeException(Messages.getString("swing.1E","JOptionPane")); //$NON-NLS-1$ //$NON-NLS-2$
         }
 
         JInternalFrame frame = new JInternalFrame(title);
@@ -512,10 +514,10 @@
             firePropertyChange(MESSAGE_TYPE_PROPERTY, oldValue, type);
             break;
         default:
-            throw new RuntimeException("JOptionPane: type must be one of " +
-                    "JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE, " +
-                    "JOptionPane.WARNING_MESSAGE, JOptionPane.QUESTION_MESSAGE " +
-                    "or JOptionPane.PLAIN_MESSAGE");
+            throw new RuntimeException(Messages.getString("swing.1F","JOptionPane") + //$NON-NLS-1$ //$NON-NLS-2$
+                    "JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE, " + //$NON-NLS-1$
+                    "JOptionPane.WARNING_MESSAGE, JOptionPane.QUESTION_MESSAGE " + //$NON-NLS-1$
+                    "or JOptionPane.PLAIN_MESSAGE"); //$NON-NLS-1$
         }
     }
 
@@ -534,7 +536,7 @@
             firePropertyChange(OPTION_TYPE_PROPERTY, oldValue, newType);
             break;
         default:
-            throw new RuntimeException("Illegal Option Type");
+            throw new RuntimeException(Messages.getString("swing.20")); //$NON-NLS-1$
         }
     }
 
@@ -637,4 +639,4 @@
         }
         dialog.getRootPane().setWindowDecorationStyle(messageTypeToRootPaneDecoration(messageType));
     }
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JPopupMenu.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JPopupMenu.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JPopupMenu.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JPopupMenu.java Thu Mar  1 05:24:01 2007
@@ -47,6 +47,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 JPopupMenu extends JComponent implements Accessible, MenuElement {
 
@@ -65,7 +67,7 @@
         }
 
         public void propertyChange(final PropertyChangeEvent event) {
-            throw new UnsupportedOperationException("not implemented");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
     }
 
@@ -226,7 +228,7 @@
 
     public void insert(final Component c, final int i) {
         if (i < 0) {
-            throw new IllegalArgumentException("index must be positive");
+            throw new IllegalArgumentException(Messages.getString("swing.21")); //$NON-NLS-1$
         }
         if (i <= getComponentCount()) {
             super.add(c, i);
@@ -235,17 +237,17 @@
 
     public void insert(final Action action, final int i) {
         if (i < 0) {
-            throw new IllegalArgumentException("index must be positive");
+            throw new IllegalArgumentException(Messages.getString("swing.21")); //$NON-NLS-1$
         }
         insert(createActionComponent(action), i < getComponentCount() ? i : getComponentCount());
     }
 
     public void remove(final int i) {
         if (i < 0) {
-            throw new IllegalArgumentException("index must be positive");
+            throw new IllegalArgumentException(Messages.getString("swing.21")); //$NON-NLS-1$
         }
         if (i >= getComponentCount()) {
-            throw new IllegalArgumentException("index is greater than the number of items");
+            throw new IllegalArgumentException(Messages.getString("swing.22")); //$NON-NLS-1$
         }
 
         super.remove(i);
@@ -505,4 +507,4 @@
         return p;
     }
 
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JProgressBar.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JProgressBar.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JProgressBar.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JProgressBar.java Thu Mar  1 05:24:01 2007
@@ -36,6 +36,7 @@
 
 import org.apache.harmony.x.swing.StringConstants;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
 
 public class JProgressBar extends JComponent implements SwingConstants, Accessible {
     protected int orientation = JProgressBar.HORIZONTAL;
@@ -128,7 +129,7 @@
         if (orientation != JProgressBar.HORIZONTAL
             && orientation != JProgressBar.VERTICAL) {
 
-            throw new IllegalArgumentException(orientation + " is not a legal orientation");
+            throw new IllegalArgumentException(Messages.getString("swing.4A", orientation)); //$NON-NLS-1$
         }
         int oldValue = this.orientation;
         this.orientation = orientation;
@@ -274,4 +275,5 @@
         }
     }
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JScrollBar.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JScrollBar.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JScrollBar.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JScrollBar.java Thu Mar  1 05:24:01 2007
@@ -38,6 +38,8 @@
 import javax.swing.event.EventListenerList;
 import javax.swing.plaf.ScrollBarUI;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class JScrollBar extends JComponent implements Adjustable, Accessible {
 
     protected class AccessibleJScrollBar extends JComponent.AccessibleJComponent implements AccessibleValue {
@@ -121,7 +123,7 @@
         model = new DefaultBoundedRangeModel(value, extent, min, max);
 
         if (orientation != HORIZONTAL && orientation != VERTICAL) {
-            throw new IllegalArgumentException("orientation must be HORIZONTAL or VERTICAL");
+            throw new IllegalArgumentException(Messages.getString("swing.28")); //$NON-NLS-1$
         } 
 
         this.orientation = orientation;
@@ -161,7 +163,7 @@
 
     public void setOrientation(final int orientation) {
         if (orientation != VERTICAL && orientation != HORIZONTAL) {
-            throw new IllegalArgumentException("orientation must be HORIZONTAL or VERTICAL");
+            throw new IllegalArgumentException(Messages.getString("swing.28")); //$NON-NLS-1$
         }
         if (orientation != this.orientation) {
             int oldValue = this.orientation;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JScrollPane.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JScrollPane.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JScrollPane.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JScrollPane.java Thu Mar  1 05:24:01 2007
@@ -42,6 +42,8 @@
 
 import org.apache.harmony.x.swing.StringConstants;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class JScrollPane extends JComponent implements ScrollPaneConstants, Accessible {
     //TODO: implement
@@ -184,7 +186,7 @@
             && policy != VERTICAL_SCROLLBAR_NEVER
             && policy != VERTICAL_SCROLLBAR_ALWAYS) {
 
-            throw new IllegalArgumentException("Incorrect vertical policy is psecified");
+            throw new IllegalArgumentException(Messages.getString("swing.25")); //$NON-NLS-1$
         }
         if (this.verticalScrollBarPolicy != policy) {
             int oldValue = this.verticalScrollBarPolicy;
@@ -202,7 +204,7 @@
             && policy != HORIZONTAL_SCROLLBAR_NEVER
             && policy != HORIZONTAL_SCROLLBAR_ALWAYS) {
 
-            throw new IllegalArgumentException("Incorrect vertical policy is specified");
+            throw new IllegalArgumentException(Messages.getString("swing.25")); //$NON-NLS-1$
         }
         if (this.horizontalScrollBarPolicy != policy) {
             int oldValue = this.horizontalScrollBarPolicy;
@@ -399,7 +401,7 @@
             upperRight = corner;
             updateComponent(JScrollPane.UPPER_RIGHT_CORNER, oldValue, corner, JScrollPane.UPPER_RIGHT_CORNER);
         } else {
-            throw new IllegalArgumentException("Incorrect key " + key + " is invalid");
+            throw new IllegalArgumentException(Messages.getString("swing.26", key)); //$NON-NLS-1$
         }
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSeparator.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSeparator.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSeparator.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSeparator.java Thu Mar  1 05:24:01 2007
@@ -25,6 +25,8 @@
 import javax.accessibility.AccessibleRole;
 import javax.swing.plaf.SeparatorUI;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class JSeparator extends JComponent implements SwingConstants, Accessible {
 
     protected class AccessibleJSeparator extends AccessibleJComponent {
@@ -85,8 +87,7 @@
             return;
         }
 
-        throw new IllegalArgumentException(
-                                           "orientation must VERTICAL or HORIZONTAL");
+        throw new IllegalArgumentException(Messages.getString("swing.47")); //$NON-NLS-1$
     }
 
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSlider.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSlider.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSlider.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSlider.java Thu Mar  1 05:24:01 2007
@@ -38,28 +38,30 @@
 import javax.swing.plaf.SliderUI;
 import javax.swing.plaf.UIResource;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class JSlider extends JComponent implements SwingConstants, Accessible {
     protected class AccessibleJSlider extends AccessibleJComponent implements AccessibleValue {
         public AccessibleStateSet getAccessibleStateSet() {
-            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 AccessibleValue getAccessibleValue() {
-            throw new UnsupportedOperationException("Not implemented");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
         public Number getCurrentAccessibleValue() {
-            throw new UnsupportedOperationException("Not implemented");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
         public boolean setCurrentAccessibleValue(final Number n) {
-            throw new UnsupportedOperationException("Not implemented");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
         public Number getMinimumAccessibleValue() {
-            throw new UnsupportedOperationException("Not implemented");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
         public Number getMaximumAccessibleValue() {
-            throw new UnsupportedOperationException("Not implemented");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
     }
 
@@ -138,7 +140,7 @@
 
     private static int checkOrientation(final int orientation) {
         if (orientation != VERTICAL && orientation != HORIZONTAL) {
-            throw new IllegalArgumentException("orientation must be one of: VERTICAL, HORIZONTAL");
+            throw new IllegalArgumentException(Messages.getString("swing.28")); //$NON-NLS-1$
         }
         return orientation;
     }
@@ -253,7 +255,7 @@
 
     public void setOrientation(final int orientation) {
         if (orientation != VERTICAL && orientation != HORIZONTAL) {
-            throw new IllegalArgumentException("argument must be VERTICAL or HORIZONTAL");
+            throw new IllegalArgumentException(Messages.getString("swing.29")); //$NON-NLS-1$
         }
         if (orientation != this.orientation) {
             int oldValue = this.orientation;
@@ -301,10 +303,10 @@
 
     public Hashtable createStandardLabels(final int increment, final int start) {
         if (increment <= 0) {
-            throw new IllegalArgumentException("increment must be > 0");
+            throw new IllegalArgumentException(Messages.getString("swing.2A")); //$NON-NLS-1$
         }
         if (start < sliderModel.getMinimum() || start > sliderModel.getMaximum()) {
-            throw new IllegalArgumentException("start is out of range");
+            throw new IllegalArgumentException(Messages.getString("swing.2B")); //$NON-NLS-1$
         }
 
         Hashtable result = new Hashtable();

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSpinner.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSpinner.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSpinner.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSpinner.java Thu Mar  1 05:24:01 2007
@@ -52,6 +52,8 @@
 import org.apache.harmony.x.swing.StringConstants;
 import org.apache.harmony.x.swing.Utilities;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>JSpinner</i>
@@ -340,7 +342,7 @@
         public DateEditor(JSpinner spinner) {
             super(spinner);
             if (!(spinner.getModel() instanceof SpinnerDateModel)) {
-                throw new IllegalArgumentException("model not a SpinnerDateModel");
+                throw new IllegalArgumentException(Messages.getString("swing.2C","SpinnerDateModel")); //$NON-NLS-1$ //$NON-NLS-2$
             }
             format = new SimpleDateFormat();
             initTextField();
@@ -349,7 +351,7 @@
         public DateEditor(JSpinner spinner, String dateFormatPattern) {
             super(spinner);
             if (!(spinner.getModel() instanceof SpinnerDateModel)) {
-                throw new IllegalArgumentException("model not a SpinnerDateModel");
+                throw new IllegalArgumentException(Messages.getString("swing.2C","SpinnerDateModel")); //$NON-NLS-1$ //$NON-NLS-2$
             }
             format = new SimpleDateFormat(dateFormatPattern);
             initTextField();
@@ -453,7 +455,7 @@
         public ListEditor(JSpinner spinner) {
             super(spinner);
             if (!(spinner.getModel() instanceof SpinnerListModel)) {
-                throw new IllegalArgumentException("model not a SpinnerListModel");
+                throw new IllegalArgumentException(Messages.getString("swing.2C","SpinnerListModel")); //$NON-NLS-1$ //$NON-NLS-2$
             }
             SpinnerListFormatter formatter = new SpinnerListFormatter(this.getModel(), this
                     .getTextField());
@@ -514,7 +516,7 @@
         public NumberEditor(JSpinner spinner) {
             super(spinner);
             if (!(spinner.getModel() instanceof SpinnerNumberModel)) {
-                throw new IllegalArgumentException("model not a SpinnerNumberModel");
+                throw new IllegalArgumentException(Messages.getString("swing.2C","SpinnerNumberModel")); //$NON-NLS-1$ //$NON-NLS-2$
             }
             format = new DecimalFormat();
             initTextField();
@@ -523,7 +525,7 @@
         public NumberEditor(JSpinner spinner, String decimalFormatPattern) {
             super(spinner);
             if (!(spinner.getModel() instanceof SpinnerNumberModel)) {
-                throw new IllegalArgumentException("model not a SpinnerNumberModel");
+                throw new IllegalArgumentException(Messages.getString("swing.2C","SpinnerNumberModel")); //$NON-NLS-1$ //$NON-NLS-2$
             }
             format = new DecimalFormat(decimalFormatPattern);
             initTextField();
@@ -623,7 +625,7 @@
 
     public void setModel(SpinnerModel model) {
         if (model == null) {
-            throw new IllegalArgumentException("null model");
+            throw new IllegalArgumentException(Messages.getString("swing.2F")); //$NON-NLS-1$
         }
         SpinnerModel oldModel = this.model;
         oldModel.removeChangeListener(changeListener);
@@ -680,7 +682,7 @@
 
     public void setEditor(JComponent editor) {
         if (editor == null) {
-            throw new IllegalArgumentException("null editor");
+            throw new IllegalArgumentException(Messages.getString("swing.30")); //$NON-NLS-1$
         }
         JComponent oldEditor = this.editor;
         if (oldEditor == editor) {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSplitPane.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSplitPane.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSplitPane.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JSplitPane.java Thu Mar  1 05:24:01 2007
@@ -32,6 +32,8 @@
 import javax.accessibility.AccessibleValue;
 import javax.swing.plaf.SplitPaneUI;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class JSplitPane extends JComponent implements Accessible {
     public static final String BOTTOM = "bottom";
     public static final String TOP = "top";
@@ -52,27 +54,27 @@
 
     protected class AccessibleJSplitPane extends AccessibleJComponent implements AccessibleValue {
         public AccessibleStateSet getAccessibleStateSet() {
-            throw new UnsupportedOperationException("Not implemented yet");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
 
         public AccessibleValue getAccessibleValue() {
-            throw new UnsupportedOperationException("Not implemented yet");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
 
         public Number getCurrentAccessibleValue() {
-            throw new UnsupportedOperationException("Not implemented yet");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
 
         public boolean setCurrentAccessibleValue(final Number n) {
-            throw new UnsupportedOperationException("Not implemented yet");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
 
         public Number getMinimumAccessibleValue() {
-            throw new UnsupportedOperationException("Not implemented yet");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
 
         public Number getMaximumAccessibleValue() {
-            throw new UnsupportedOperationException("Not implemented yet");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
 
         public AccessibleRole getAccessibleRole() {
@@ -240,7 +242,7 @@
 
     public void setResizeWeight(final double weight) {
         if (weight < 0 || weight > 1) {
-            throw new IllegalArgumentException("Incorrect resize weight is specified");
+            throw new IllegalArgumentException(Messages.getString("swing.32")); //$NON-NLS-1$
         }
         if (resizeWeight != weight) {
             double oldValue = resizeWeight;
@@ -259,7 +261,7 @@
 
     public void setDividerLocation(final double proportionalLocation) {
         if (proportionalLocation < 0 || proportionalLocation > 1) {
-            throw new IllegalArgumentException("Incorrect proportional location is specified");
+            throw new IllegalArgumentException(Messages.getString("swing.33")); //$NON-NLS-1$
         }
 
         int size;
@@ -375,7 +377,7 @@
 
     private void checkOrientation(final int orientation) {
         if (orientation != HORIZONTAL_SPLIT && orientation != VERTICAL_SPLIT) {
-            throw new IllegalArgumentException("Incorrect orientation is specified");
+            throw new IllegalArgumentException(Messages.getString("swing.1B")); //$NON-NLS-1$
         }
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTabbedPane.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTabbedPane.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTabbedPane.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTabbedPane.java Thu Mar  1 05:24:01 2007
@@ -36,6 +36,8 @@
 import org.apache.harmony.luni.util.NotImplementedException;
 import org.apache.harmony.x.swing.StringConstants;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>JTabbedPane</i>
@@ -546,7 +548,7 @@
     public void setSelectedComponent(Component comp) {
         int index = indexOfComponent(comp);
         if (index == NOT_FOUND) {
-            throw new IllegalArgumentException("Component not found in the tabbed pane");
+            throw new IllegalArgumentException(Messages.getString("swing.34")); //$NON-NLS-1$
         }
         setSelectedIndex(index);
     }
@@ -557,7 +559,7 @@
 
     public void setSelectedIndex(int index) {
         if (index < -1 || index >= getTabCount()) {
-            throw new IndexOutOfBoundsException("index < -1 || index >= tab count");
+            throw new IndexOutOfBoundsException(Messages.getString("swing.35")); //$NON-NLS-1$
         }
         getModel().setSelectedIndex(index);
     }
@@ -568,7 +570,7 @@
 
     public void setTabLayoutPolicy(int tabLayoutPolicy) {
         if (tabLayoutPolicy != WRAP_TAB_LAYOUT && tabLayoutPolicy != SCROLL_TAB_LAYOUT) {
-            throw new IllegalArgumentException("invalid tabLayoutPolicy");
+            throw new IllegalArgumentException(Messages.getString("swing.36")); //$NON-NLS-1$
         }
         int oldValue = this.tabLayoutPolicy;
         this.tabLayoutPolicy = tabLayoutPolicy;
@@ -582,7 +584,7 @@
     public void setTabPlacement(int tabPlacement) {
         if (tabPlacement != TOP && tabPlacement != BOTTOM && tabPlacement != LEFT
                 && tabPlacement != RIGHT) {
-            throw new IllegalArgumentException("invalid tabPlacement");
+            throw new IllegalArgumentException(Messages.getString("swing.37")); //$NON-NLS-1$
         }
         int oldValue = this.tabPlacement;
         this.tabPlacement = tabPlacement;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTable.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTable.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTable.java Thu Mar  1 05:24:01 2007
@@ -78,6 +78,8 @@
 import org.apache.harmony.luni.util.NotImplementedException;
 import org.apache.harmony.x.swing.StringConstants;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>JTable</i>
@@ -857,7 +859,7 @@
 
     public void setRowHeight(int rowHeight) {
         if (rowHeight <= 0) {
-            throw new IllegalArgumentException("Row height must be positive");
+            throw new IllegalArgumentException(Messages.getString("swing.38")); //$NON-NLS-1$
         }
         int oldValue = this.rowHeight;
         this.rowHeight = rowHeight;
@@ -870,7 +872,7 @@
 
     public void setRowHeight(int row, int height) {
         if (height <= 0) {
-            throw new IllegalArgumentException("Row height must be positive");
+            throw new IllegalArgumentException(Messages.getString("swing.38")); //$NON-NLS-1$
         }
         if (rowHeights.size() <= row) {
             rowHeights.setSize(row + 1);
@@ -1193,7 +1195,7 @@
     public TableColumn getColumn(Object identifier) {
         int index = getColumnModel().getColumnIndex(identifier);
         if (index == -1) {
-            throw new IllegalArgumentException("Column does not exist");
+            throw new IllegalArgumentException(Messages.getString("swing.39")); //$NON-NLS-1$
         }
         return getColumnModel().getColumn(index);
     }
@@ -1435,7 +1437,7 @@
 
     public void setModel(TableModel model) {
         if (model == null) {
-            throw new IllegalArgumentException("Model must be not null");
+            throw new IllegalArgumentException(Messages.getString("swing.3A")); //$NON-NLS-1$
         }
         TableModel oldValue = dataModel;
         if (oldValue != null) {
@@ -1457,7 +1459,7 @@
 
     public void setColumnModel(TableColumnModel model) {
         if (model == null) {
-            throw new IllegalArgumentException("Column model must be not null");
+            throw new IllegalArgumentException(Messages.getString("swing.3B")); //$NON-NLS-1$
         }
         TableColumnModel oldValue = columnModel;
         if (oldValue != null) {
@@ -1478,7 +1480,7 @@
 
     public void setSelectionModel(ListSelectionModel model) {
         if (model == null) {
-            throw new IllegalArgumentException("Selection model must be not null");
+            throw new IllegalArgumentException(Messages.getString("swing.17")); //$NON-NLS-1$
         }
         ListSelectionModel oldValue = selectionModel;
         if (oldValue != null) {
@@ -1870,9 +1872,7 @@
 
     private void checkSelectionInterval(int start, int end, int bound) {
         if (start < 0 || end < 0 || start >= bound || end >= bound) {
-            throw new IllegalArgumentException(
-                    "Illegal selection interval is specified. Should be in [0, " + (bound - 1)
-                            + "]");
+            throw new IllegalArgumentException(Messages.getString("swing.31", (bound - 1))); //$NON-NLS-1$
         }
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextArea.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextArea.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextArea.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextArea.java Thu Mar  1 05:24:01 2007
@@ -35,6 +35,8 @@
 
 import org.apache.harmony.x.swing.StringConstants;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class JTextArea extends JTextComponent {
     protected class AccessibleJTextArea extends
             JTextComponent.AccessibleJTextComponent {
@@ -68,10 +70,10 @@
                      final int c) {
         super();
         if (r < 0) {
-            throw new IllegalArgumentException("rows: " + r);
+            throw new IllegalArgumentException(Messages.getString("swing.3C", r)); //$NON-NLS-1$
         }
         if (c < 0) {
-            throw new IllegalArgumentException("columns: " + c);
+            throw new IllegalArgumentException(Messages.getString("swing.3D", c)); //$NON-NLS-1$
         }
         Document document = doc;
         if (document == null) {
@@ -125,10 +127,10 @@
     private int  checkLineCount(final int line) throws BadLocationException {
         int count = getDocument().getDefaultRootElement().getElementCount();
         if (line < 0) {
-            throw new BadLocationException("Negative line", line);
+            throw new BadLocationException(Messages.getString("swing.3E"), line); //$NON-NLS-1$
         }
         if (line >= count) {
-            throw new BadLocationException("No such line", line);
+            throw new BadLocationException(Messages.getString("swing.3F"), line); //$NON-NLS-1$
         }
         return count;
     }
@@ -196,7 +198,7 @@
         Document doc = getDocument();
         int length = doc.getLength();
         if (offset < 0 || offset > length) {
-            throw new BadLocationException("Can't translate offset to line",
+            throw new BadLocationException(Messages.getString("swing.40"), //$NON-NLS-1$
                     offset);
         }
         readLock(doc);
@@ -264,8 +266,7 @@
         if (orientation == SwingConstants.VERTICAL) {
             return rowHeight;
         }
-        throw new IllegalArgumentException("Invalid orientation: "
-                + orientation);
+        throw new IllegalArgumentException(Messages.getString("swing.41", orientation)); //$NON-NLS-1$
     }
 
     public int getTabSize() {
@@ -287,7 +288,7 @@
         }
         int length = doc.getLength();
         if (pos < 0 || pos > length) {
-            throw new IllegalArgumentException("Invalid insert");
+            throw new IllegalArgumentException(Messages.getString("swing.42")); //$NON-NLS-1$
         }
         try {
             doc.insertString(pos, s, null);
@@ -332,10 +333,10 @@
         }
         int length = doc.getLength();
         if (start < 0 || end > length) {
-            throw new IllegalArgumentException("Invalid remove");
+            throw new IllegalArgumentException(Messages.getString("swing.43")); //$NON-NLS-1$
         }
         if (start > end) {
-            throw new IllegalArgumentException("end before start");
+            throw new IllegalArgumentException(Messages.getString("swing.44")); //$NON-NLS-1$
         }
 
         try {
@@ -349,7 +350,7 @@
 
     public void setColumns(final int c) {
         if (c < 0) {
-            throw new IllegalArgumentException("columns less than zero.");
+            throw new IllegalArgumentException(Messages.getString("swing.45")); //$NON-NLS-1$
         }
         columns = c;
         invalidate();
@@ -372,7 +373,7 @@
 
     public void setRows(final int r) {
         if (r < 0) {
-            throw new IllegalArgumentException("rows less than zero.");
+            throw new IllegalArgumentException(Messages.getString("swing.46")); //$NON-NLS-1$
         }
         rows = r;
         invalidate();
@@ -399,4 +400,5 @@
                            old, b);
     }
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextField.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextField.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextField.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextField.java Thu Mar  1 05:24:01 2007
@@ -49,6 +49,8 @@
 import org.apache.harmony.awt.text.PropertyNames;
 import org.apache.harmony.awt.text.TextFieldKit;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * Note: <code>serialVersionUID</code> fields in this class and its inner
  * classes are added as a performance optimization but not as a guarantee of
@@ -200,7 +202,7 @@
     public JTextField(final Document doc, final String text, final int c) {
         super();
         if (c < 0) {
-            throw new IllegalArgumentException("columns less than zero.");
+            throw new IllegalArgumentException(Messages.getString("swing.45")); //$NON-NLS-1$
         }
         Document document = doc;
         if (doc == null) {
@@ -455,7 +457,7 @@
 
     public void setColumns(final int c) {
         if (c < 0) {
-            throw new IllegalArgumentException("columns less than zero.");
+            throw new IllegalArgumentException(Messages.getString("swing.45")); //$NON-NLS-1$
         }
         columns = c;
         invalidate();
@@ -480,7 +482,7 @@
     public void setHorizontalAlignment(final int alignment) {
         if (alignment != LEFT && alignment != RIGHT && alignment != CENTER
                 && alignment != LEADING && alignment != TRAILING) {
-            throw new IllegalArgumentException("horizontalAlignment");
+            throw new IllegalArgumentException("horizontalAlignment"); //$NON-NLS-1$
         }
         int old = horizontalAlignment;
         horizontalAlignment = alignment;
@@ -495,4 +497,4 @@
         getHorizontalVisibility().setValue(scrollOffset);
     }
 
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextPane.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextPane.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextPane.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTextPane.java Thu Mar  1 05:24:01 2007
@@ -41,6 +41,8 @@
 
 import org.apache.harmony.awt.text.TextUtils;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class JTextPane extends JEditorPane implements ImageObserver,
         MenuContainer, Serializable, Accessible, Scrollable {
@@ -63,7 +65,7 @@
         if (doc instanceof StyledDocument) {
             super.setDocument(doc);
         } else {
-            throw new IllegalArgumentException("Model must be StyledDocument.");
+            throw new IllegalArgumentException(Messages.getString("swing.48")); //$NON-NLS-1$
         }
     }
 
@@ -216,7 +218,7 @@
         if (kit instanceof StyledEditorKit) {
             super.setEditorKit(kit);
         } else {
-            throw new IllegalArgumentException("Kit isn't a StyledEditorKit");
+            throw new IllegalArgumentException(Messages.getString("swing.49")); //$NON-NLS-1$
         }
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToggleButton.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToggleButton.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToggleButton.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToggleButton.java Thu Mar  1 05:24:01 2007
@@ -27,6 +27,8 @@
 import javax.accessibility.AccessibleContext;
 import javax.accessibility.AccessibleRole;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class JToggleButton extends AbstractButton implements Accessible {
 
     // TODO implement
@@ -39,7 +41,7 @@
         }
 
         public void itemStateChanged(final ItemEvent e) {
-            throw new UnsupportedOperationException("Not yet implemented");
+            throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
     };
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToolBar.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToolBar.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToolBar.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToolBar.java Thu Mar  1 05:24:01 2007
@@ -33,17 +33,19 @@
 import javax.accessibility.AccessibleStateSet;
 import javax.swing.plaf.ToolBarUI;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class JToolBar extends JComponent implements SwingConstants, Accessible {
     private static final Insets DEFAULT_MARGIN = new Insets(0, 0, 0, 0);
 
     // TODO: implement accessibility
     protected class AccessibleJToolBar extends AccessibleJComponent {
         public AccessibleStateSet getAccessibleStateSet() {
-            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$
         }
     }
 
@@ -275,8 +277,7 @@
 
     private void checkOrientation(final int o) {
         if (o != HORIZONTAL && o != VERTICAL) {
-            throw new IllegalArgumentException(
-                    "orientation must be HORIZONTAL or VERTICAL");
+            throw new IllegalArgumentException(Messages.getString("swing.47")); //$NON-NLS-1$
         }
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToolTip.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToolTip.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToolTip.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JToolTip.java Thu Mar  1 05:24:01 2007
@@ -25,6 +25,8 @@
 import javax.accessibility.AccessibleRole;
 import javax.swing.plaf.ToolTipUI;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 public class JToolTip extends JComponent implements Accessible {
     private static final String COMPONENT = "component";
     private static final String TIP_TEXT = "tiptext";
@@ -33,10 +35,10 @@
 
     protected class AccessibleJToolTip extends AccessibleJComponent {
         public String getAccessibleDescription() {
-            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$
         }
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTree.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTree.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTree.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTree.java Thu Mar  1 05:24:01 2007
@@ -73,6 +73,8 @@
 import javax.swing.tree.TreeSelectionModel;
 import org.apache.harmony.luni.util.NotImplementedException;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 /**
  * <p>
  * <i>JTree</i>
@@ -1007,7 +1009,7 @@
 
             public TreePath nextElement() {
                 if (nextElement == null) {
-                    throw new NoSuchElementException("No next element in enumeration");
+                    throw new NoSuchElementException(Messages.getString("swing.4B")); //$NON-NLS-1$
                 }
                 TreePath currentValue = nextElement;
                 nextElement = getNextExpandedPath();
@@ -1317,11 +1319,10 @@
 
     public TreePath getNextMatch(String prefix, int startingRow, Position.Bias bias) {
         if (prefix == null) {
-            throw new IllegalArgumentException("Prefix must be specified");
+            throw new IllegalArgumentException(Messages.getString("swing.4C")); //$NON-NLS-1$
         }
         if (startingRow < 0 || startingRow >= getRowCount()) {
-            throw new IllegalArgumentException(
-                    "Illegal startingRow is specified. Must be in the valid range");
+            throw new IllegalArgumentException(Messages.getString("swing.2D")); //$NON-NLS-1$
         }
         if (bias == Position.Bias.Forward) {
             int rowCount = getRowCount();
@@ -1440,7 +1441,7 @@
 
             public TreePath nextElement() {
                 if (nextElement == null) {
-                    throw new NoSuchElementException("No next element in enumeration");
+                    throw new NoSuchElementException(Messages.getString("swing.4B")); //$NON-NLS-1$
                 }
                 TreePath currentValue = nextElement;
                 nextElement = getNextDescendPath();

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JViewport.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JViewport.java?view=diff&rev=513311&r1=513310&r2=513311
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JViewport.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JViewport.java Thu Mar  1 05:24:01 2007
@@ -46,6 +46,8 @@
 
 import org.apache.harmony.x.swing.BlitSupport;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
+
 
 public class JViewport extends JComponent implements Accessible {
     private static final long serialVersionUID = -633250949788872287L;
@@ -142,7 +144,7 @@
     @Override
     public final void setBorder(final Border b) {
         if (b != null) {
-            throw new IllegalArgumentException("method is not implemented");
+            throw new IllegalArgumentException(Messages.getString("swing.27")); //$NON-NLS-1$
         }
     }
 
@@ -450,4 +452,4 @@
             removeAll();
         }
     }
-}
\ No newline at end of file
+}



Mime
View raw message