This patch (committed) clears the ARMED and PRESSED states when the model changes
from selected to not selected, to match the behaviour of the reference implementation:
2006-05-16 David Gilbert <[EMAIL PROTECTED]>
* javax/swing/DefaultButtonModel.java
(setSelected): If new SELECTED state is false, clear ARMED and PRESSED
states also.
Regards,
Dave
Index: javax/swing/DefaultButtonModel.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/DefaultButtonModel.java,v
retrieving revision 1.26
diff -u -r1.26 DefaultButtonModel.java
--- javax/swing/DefaultButtonModel.java 19 Oct 2005 15:45:03 -0000 1.26
+++ javax/swing/DefaultButtonModel.java 16 May 2006 15:20:23 -0000
@@ -371,7 +371,7 @@
if (e)
stateMask = stateMask | ENABLED;
else
- stateMask = stateMask & (~ENABLED);
+ stateMask = stateMask & (~ENABLED) & (~ARMED) & (~PRESSED);
// notify interested ChangeListeners
fireStateChanged();