[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: fix for javax.swing.plaf.basic.BasicTableUI
From: |
Roman Kennke |
Subject: |
[cp-patches] FYI: fix for javax.swing.plaf.basic.BasicTableUI |
Date: |
Fri, 03 Jun 2005 11:33:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204 |
In BasicTableUI.uninstallDefaults() the properties of the JTable should
not be set to null. This breaks apps that run fine with the JDK. See:
https://savannah.gnu.org/bugs/?func=detailitem&item_id=11917
This is fixed hereby, not sure if that is 100% perfect. Look at the
in-code comment for some more info.
005-06-03 Roman Kennke <address@hidden>
* javax/swing/plaf/basic/BasicTableUI.java
(uninstallDefault): Don't set properties to null, this corrupts
component state.
/Roman
Index: BasicTableUI.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTableUI.java,v
retrieving revision 1.5
diff -u -r1.5 BasicTableUI.java
--- BasicTableUI.java 7 Jan 2005 18:32:49 -0000 1.5
+++ BasicTableUI.java 3 Jun 2005 09:30:26 -0000
@@ -209,12 +209,22 @@
protected void uninstallDefaults()
{
- table.setFont(null);
- table.setGridColor(null);
- table.setForeground(null);
- table.setBackground(null);
- table.setSelectionForeground(null);
- table.setSelectionBackground(null);
+ // TODO: this method used to do the following which is not
+ // quite right (at least it breaks apps that run fine with the
+ // JDK):
+ //
+ // table.setFont(null);
+ // table.setGridColor(null);
+ // table.setForeground(null);
+ // table.setBackground(null);
+ // table.setSelectionForeground(null);
+ // table.setSelectionBackground(null);
+ //
+ // This would leave the component in a corrupt state, which is
+ // not acceptable. A possible solution would be to have component
+ // level defaults installed, that get overridden by the UI defaults
+ // and get restored in this method. I am not quite sure about this
+ // though. / Roman Kennke
}
protected void uninstallKeyboardActions()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: fix for javax.swing.plaf.basic.BasicTableUI,
Roman Kennke <=