This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 154533 - Table cells in non-tree column somtimes paint incorrectly
Summary: Table cells in non-tree column somtimes paint incorrectly
Status: RESOLVED INCOMPLETE
Alias: None
Product: platform
Classification: Unclassified
Component: Outline&TreeTable (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-03 22:03 UTC by joel_carranza
Modified: 2009-11-11 07:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description joel_carranza 2008-12-03 22:03:56 UTC
Sometimes the outline component paints itself incorrectly. All cells beyond the first column paint themselves as
highlighted even when they are not (in actuality a single row is highlighted). I have found that the correct selection
state is being passed to the cell renderer. Problem appears to be with the default renderer
(DefaultOutlineCellRenderer), in particular when used in conjunction with RenderDataProvider.

Calls to setForeground/setBackground in DefaultTableCellRenderer are implemented in DefaultTableCellRenderer, which in
addition to setting the foreground and background, also changes the default foreground and background color for when the
cell is not selected. If this instance is reused for both the tree column (which always sets fg/bg) and the non-tree
columns (which never sets fg/bg), you can run into painting problems as described above.

Solution is to set default renderer to DefaultOutlineCellRenderer for the tree column ONLY. Let other cells be painted
by DefaultTreeCellRenderer
Comment 1 Jiri Rechtacek 2009-11-11 07:38:39 UTC
I'm not able to reproduce it on my Gtk configuration, I'm going to change to
WORKSFORME eventually. Could you attach you test-case or code snippet
demonstrating the problem? Thanks