Further testing some apps, I overlooked something really trivial. I have
changed this patch completely. The problem was not the border, but the
background color of the actual cell renderer (label) maybe set
differently than that of the table. I fixed this.
2005-11-03 Lillian Angel <[EMAIL PROTECTED]>
* javax/swing/table/DefaultTableCellRenderer.java
(getTableCellRendererComponent): Fixed so that the label is
painted with the correct background color. Does not depend on
type of border. Removed this code.
On Thu, 2005-11-03 at 14:38 -0500, Lillian Angel wrote:
> If another class overrides getTableCellRendererComponent and sets the
> border to be an empty border, the cell should be painted as if it
> doesn't have focus at all times
>
> 2005-11-03 Lillian Angel <[EMAIL PROTECTED]>
>
> * javax/swing/table/DefaultTableCellRenderer.java
> (getTableCellRendererComponent): Should only draw focus if the
> border is not an empty border.
>
> _______________________________________________
> Classpath-patches mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/classpath-patches
Index: javax/swing/table/DefaultTableCellRenderer.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/table/DefaultTableCellRenderer.java,v
retrieving revision 1.17
diff -u -r1.17 DefaultTableCellRenderer.java
--- javax/swing/table/DefaultTableCellRenderer.java 3 Nov 2005 19:39:05 -0000 1.17
+++ javax/swing/table/DefaultTableCellRenderer.java 3 Nov 2005 20:26:23 -0000
@@ -148,18 +148,14 @@
setBackground(table.getBackground());
setForeground(table.getForeground());
}
-
- Border b = UIManager.getBorder("Table.focusCellHighlightBorder");
- if (!(b instanceof EmptyBorder))
- {
+
if (hasFocus)
{
- setBackground(table.getBackground());
- setBorder(b);
+ setBackground(getBackground());
+ setBorder(UIManager.getBorder("Table.focusCellHighlightBorder"));
}
else
setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
- }
setEnabled(table.isEnabled());
setFont(table.getFont());
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches