This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[GUI] Patch: javax.swing.JToggleButton
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Tue, 8 Jun 2004 22:50:41 +0200
- Subject: [GUI] Patch: javax.swing.JToggleButton
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
I commited the attached patch to add a missing constructor and to move
documentation into javadoc.
Michael
2004-06-08 Michael Koch <konqueror@gmx.de>
* javax/swing/JToggleButton.java
(JToggleButton): New constructor.
(getAccessibleContext): Moved documentation into javadoc.
(getUIClassID): Likewise.
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAxiakWSOgCCdjSDsRAgq0AJ0RNAw3CZiSD+6mMiktL1W3DUGxfgCdH23y
N8N8QzB0dKe+8szhMW2FBYc=
=4vcR
-----END PGP SIGNATURE-----
Index: javax/swing/JToggleButton.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JToggleButton.java,v
retrieving revision 1.4.2.1
diff -u -b -B -r1.4.2.1 JToggleButton.java
--- javax/swing/JToggleButton.java 7 Jun 2004 12:41:11 -0000 1.4.2.1
+++ javax/swing/JToggleButton.java 8 Jun 2004 20:48:09 -0000
@@ -86,6 +86,12 @@
this(text, null);
}
+ public JToggleButton(String text, boolean selected)
+ {
+ this(text, null);
+ setSelected(selected);
+ }
+
public JToggleButton(String text, Icon icon)
{
this(text, icon, false);
@@ -100,17 +106,20 @@
model.setSelected(selected);
}
-
-
+ /**
+ * Gets the AccessibleContext associated with this JToggleButton.
+ */
public AccessibleContext getAccessibleContext()
{
- //Gets the AccessibleContext associated with this JToggleButton.
return null;
}
+ /**
+ * Returns a string that specifies the name of the L&F class that renders
+ * this component.
+ */
public String getUIClassID()
{
- //Returns a string that specifies the name of the L&F class that renders this component.
return "ToggleButtonUI";
}