[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: fixed JProgressBar constructors
From: |
David Gilbert |
Subject: |
[cp-patches] FYI: fixed JProgressBar constructors |
Date: |
Thu, 07 Jul 2005 12:39:51 +0000 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050426) |
The parameters in the JProgressBar(int, int, int) were in the wrong
order. I committed this patch to fix the problem:
2005-07-07 David Gilbert <address@hidden>
* javax/swing/JProgressBar.java
(JProgressBar(int, int, int)): fix order of parameters,
(JProgressBar()): reorder arguments in call to other constructor,
(JProgressBar(int): likewise,
(JProgressBar(int, int): likewise.
Corresponding tests will be in Mauve shortly.
Regards,
Dave Gilbert
Index: javax/swing/JProgressBar.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JProgressBar.java,v
retrieving revision 1.11
diff -u -r1.11 JProgressBar.java
--- javax/swing/JProgressBar.java 2 Jul 2005 20:32:48 -0000 1.11
+++ javax/swing/JProgressBar.java 7 Jul 2005 11:30:24 -0000
@@ -88,8 +88,6 @@
/**
* Constructor AccessibleJProgressBar
- *
- * @param component TODO
*/
protected AccessibleJProgressBar()
{
@@ -200,7 +198,7 @@
*/
public JProgressBar()
{
- this(0, 100, HORIZONTAL);
+ this(HORIZONTAL, 0, 100);
}
/**
@@ -208,10 +206,13 @@
* a maximum of 100, and the given orientation.
*
* @param orientation The orientation of the JProgressBar.
+ *
+ * @throws IllegalArgumentException if <code>orientation</code> is not either
+ * address@hidden #HORIZONTAL} or address@hidden #VERTICAL}.
*/
public JProgressBar(int orientation)
{
- this(0, 100, orientation);
+ this(orientation, 0, 100);
}
/**
@@ -223,7 +224,7 @@
*/
public JProgressBar(int minimum, int maximum)
{
- this(minimum, maximum, HORIZONTAL);
+ this(HORIZONTAL, minimum, maximum);
}
/**
@@ -233,8 +234,11 @@
* @param minimum The minimum of the JProgressBar.
* @param maximum The maximum of the JProgressBar.
* @param orientation The orientation of the JProgressBar.
+ *
+ * @throws IllegalArgumentException if <code>orientation</code> is not either
+ * address@hidden #HORIZONTAL} or address@hidden #VERTICAL}.
*/
- public JProgressBar(int minimum, int maximum, int orientation)
+ public JProgressBar(int orientation, int minimum, int maximum)
{
model = new DefaultBoundedRangeModel(minimum, 0, minimum, maximum);
if (orientation != HORIZONTAL && orientation != VERTICAL)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: fixed JProgressBar constructors,
David Gilbert <=