classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: Another minor fix for JSlider


From: David Gilbert
Subject: [cp-patches] FYI: Another minor fix for JSlider
Date: Mon, 18 Jul 2005 23:18:43 +0000
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050426)

I committed this patch:

2005-07-18  David Gilbert  <address@hidden>

        * javax/swing/JSlider.java:
        (JSlider(int)): updated API docs,
        (JSlider(int, int, int)): likewise,
        (JSlider(BoundedRangeModel)): removed code that handles a null
        argument, and updated API docs.

Mauve tests for all the constructors will be committed shortly.

Regards,

Dave Gilbert
Index: javax/swing/JSlider.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JSlider.java,v
retrieving revision 1.14
diff -u -r1.14 JSlider.java
--- javax/swing/JSlider.java    18 Jul 2005 22:06:40 -0000      1.14
+++ javax/swing/JSlider.java    18 Jul 2005 22:12:07 -0000
@@ -124,8 +124,6 @@
   
     /**
      * Creates a new AccessibleJSlider object.
-     *
-     * @param value0 DOCUMENT ME!
      */
     protected AccessibleJSlider()
     {
@@ -256,7 +254,11 @@
    * Creates a new JSlider object with the given orientation and a minimum of
    * 0, a maximum of 100, and a value of 50.
    *
-   * @param orientation The orientation of the slider.
+   * @param orientation The orientation of the slider (address@hidden 
#HORIZONTAL} or
+   *                    address@hidden #VERTICAL}).
+   * 
+   * @throws IllegalArgumentException if <code>orientation</code> is not one of
+   *         the specified values.
    */
   public JSlider(int orientation)
   {
@@ -293,10 +295,14 @@
    * Creates a new JSlider object with the given orientation, minimum,
    * maximum, and value.
    *
-   * @param orientation The orientation of the JSlider.
+   * @param orientation The orientation of the slider (address@hidden 
#HORIZONTAL} or
+   *                    address@hidden #VERTICAL}).
    * @param minimum The minimum value of the JSlider.
    * @param maximum The maximum value of the JSlider.
    * @param value The initial value of the JSlider.
+   * 
+   * @throws IllegalArgumentException if <code>orientation</code> is not one of
+   *         the specified values.
    */
   public JSlider(int orientation, int minimum, int maximum, int value)
   {
@@ -312,14 +318,13 @@
   /**
    * Creates a new horizontal JSlider object with the given model.
    *
-   * @param model The model the slider will be created with.
+   * @param model The model (<code>null</code> not permitted).
+   * 
+   * @throws NullPointerException if <code>model</code> is <code>null</code>.
    */
   public JSlider(BoundedRangeModel model)
   {
-    if (model == null)
-      sliderModel = new DefaultBoundedRangeModel(50, 0, 0, 100);
-    else
-      sliderModel = model;
+    sliderModel = model;
     changeListener = createChangeListener();
     sliderModel.addChangeListener(changeListener);
     updateUI();

reply via email to

[Prev in Thread] Current Thread [Next in Thread]