This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[GUI] Patch: javax.swing.AbstractButton


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I commited the attached patch to be able to create a diabled icon if 
none was explicitely set.


Michael


2004-06-08  Michael Koch  <konqueror@gmx.de>

	* javax/swing/AbstractButton.java
	(getDisabledIcon): Create disabled icon if none exists yet.


- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD4DBQFAxiLGWSOgCCdjSDsRArsUAJiAfJED17Sd6A5x5q+wOvfw4mmtAJ0cv2DR
M1NjB9RvnjyzzlgLLunzGA==
=zlzt
-----END PGP SIGNATURE-----
Index: javax/swing/AbstractButton.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/AbstractButton.java,v
retrieving revision 1.5.2.4
diff -u -b -B -r1.5.2.4 AbstractButton.java
--- javax/swing/AbstractButton.java	8 Jun 2004 09:28:42 -0000	1.5.2.4
+++ javax/swing/AbstractButton.java	8 Jun 2004 20:31:40 -0000
@@ -1207,6 +1207,10 @@
    */
   public Icon getDisabledIcon()
   {
+    if (disabled_icon == null
+	&& default_icon instanceof ImageIcon)
+      disabled_icon = new ImageIcon(GrayFilter.createDisabledImage(((ImageIcon) default_icon).getImage()));
+      
     return disabled_icon;
   }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]