This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [gui][PATCH] JComboBox - mouse drag events
On Tue, 2004-09-28 at 14:15, Tom Tromey wrote:
> >>>>> "Olga" == Olga Rodimina <rodimina@redhat.com> writes:
>
> Olga> + /** direction for scrolling down list of combo box's items */
> Olga> protected static int SCROLL_DOWN = 1;
> Olga> +
> Olga> + /** direction for scrolling up list of combo box's items */
> Olga> protected static int SCROLL_UP = 0;
>
> These should both be `final'.
Here is the patch that fixes this problem.
I will be committing it to java-gui-branch.
* javax/swing/plaf/basic/BasicComboPopup.java
(SCROLL_DOWN): made final.
(SCROLL_UP): made final.
Thanks,
Olga.
Index: javax/swing/plaf/basic/BasicComboPopup.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/plaf/basic/BasicComboPopup.java,v
retrieving revision 1.1.2.3
diff -c -p -u -r1.1.2.3 BasicComboPopup.java
--- javax/swing/plaf/basic/BasicComboPopup.java 28 Sep 2004 18:18:41 -0000 1.1.2.3
+++ javax/swing/plaf/basic/BasicComboPopup.java 28 Sep 2004 18:36:14 -0000
@@ -140,10 +140,10 @@ public class BasicComboPopup extends JPo
protected PropertyChangeListener propertyChangeListener;
/** direction for scrolling down list of combo box's items */
- protected static int SCROLL_DOWN = 1;
+ protected static final int SCROLL_DOWN = 1;
/** direction for scrolling up list of combo box's items */
- protected static int SCROLL_UP = 0;
+ protected static final int SCROLL_UP = 0;
/** Indicates auto scrolling direction */
protected int scrollDirection;