classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI: javax.swing.JToggleButton fixlet


From: Roman Kennke
Subject: [cp-patches] FYI: javax.swing.JToggleButton fixlet
Date: Tue, 26 Apr 2005 12:12:01 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204

Hi,

I committed the attached patch. This removes a horizontalAlignment setting in the constructor, this was simply wrong as an easy testcase shows. And it adds setActionCommand("") to the constructor, this is the default for JToggleButtons (and Buttons in general, I will fix this soon).

2005-04-26  Roman Kennke  <address@hidden>

       * javax/swing/JToggleButton.java
       (JToggleButton): Removed horizontalAlignment setting, this
       was wrong. Added setting of an actionCommand, ToggleButtons
       have "" as default actionCommand.


/Roman

Index: javax/swing/JToggleButton.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JToggleButton.java,v
retrieving revision 1.16
diff -u -r1.16 JToggleButton.java
--- javax/swing/JToggleButton.java      19 Feb 2005 09:33:48 -0000      1.16
+++ javax/swing/JToggleButton.java      26 Apr 2005 10:06:47 -0000
@@ -243,9 +243,9 @@
   {
     super(text, icon);
 
-    horizontalAlignment = LEADING;
     setModel(new ToggleButtonModel()); 
     model.setSelected(selected);
+    model.setActionCommand("");
   }
 
   /**

reply via email to

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