Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 237134 - [Table] TableItem#setBackground() overrides the selection color
Summary: [Table] TableItem#setBackground() overrides the selection color
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.2 M3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-13 14:26 EDT by Hugo Ferreira CLA
Modified: 2008-10-24 03:08 EDT (History)
2 users (show)

See Also:


Attachments
Reproduced Problem (33.27 KB, image/jpeg)
2008-06-13 14:26 EDT, Hugo Ferreira CLA
no flags Details
Proposed patch for version 1.1 RC4. (1.09 KB, patch)
2008-06-20 10:03 EDT, Hugo Ferreira CLA
jkrause: iplog+
Details | Diff
Bugfix (2.19 KB, patch)
2008-06-25 09:25 EDT, Rüdiger Herrmann CLA
no flags Details | Diff
Reproduces the cell coloring problem, (6.69 KB, application/octet-stream)
2008-07-01 04:35 EDT, Hugo Ferreira CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Ferreira CLA 2008-06-13 14:26:31 EDT
Created attachment 104903 [details]
Reproduced Problem

When you set the background color on a TableItem, that color overrides the row selection color. In attach is a screen shoot with the problem visible. Can provide a sample code if needed.
Comment 1 Hugo Ferreira CLA 2008-06-20 10:03:27 EDT
Created attachment 105496 [details]
Proposed patch for version 1.1 RC4.
Comment 2 Rüdiger Herrmann CLA 2008-06-25 09:25:48 EDT
Created attachment 105805 [details]
Bugfix

Altered version of the previous patch:
- the actual problem was that _isItemSelected() always returned false as it was called with wrong parameters - fixed this
- left out the passage below
  // Fix for bug when a colored cell propagates to all cell to end of table
  Don't exactly understand what this code is meant to solve. Could you explain some more?
Comment 3 Rüdiger Herrmann CLA 2008-06-26 17:12:20 EDT
Committed the third patch to CVS HEAD.
I think this solves the issue described here. Hugo, can you confirm this thus I could close this bug?
Comment 4 Hugo Ferreira CLA 2008-07-01 04:34:50 EDT
Yes the problem seems to be solved in the CVS HEAD. Regarding the other problem, it's like this: Using a table color provider, if you set a color on the first cell, the cells on all the other columns will also be colored. I will attach a snippet reproducing this, but maybe filling a new bug is the most correct thing.
Comment 5 Hugo Ferreira CLA 2008-07-01 04:35:31 EDT
Created attachment 106216 [details]
Reproduces the cell coloring problem,
Comment 6 Rüdiger Herrmann CLA 2008-07-01 05:23:01 EDT
(In reply to comment #4)
> Yes the problem seems to be solved in the CVS HEAD. Regarding the other problem,
> it's like this: Using a table color provider, if you set a color on the first
> cell, the cells on all the other columns will also be colored. I will attach a
> snippet reproducing this, 
> but maybe filling a new bug is the most correct thing.

Yes, an new bug would help to keep the overview. I would like to ask you to 'transfer' the second issue to a new bug. Also I think the table widget itself is the error source. The snippet could be shortened and therefore would read easier if it would directly manipulate the tables' background color
Comment 7 Rüdiger Herrmann CLA 2008-07-03 06:15:21 EDT
Closing this since the initially raise issue is fixed.
Please use distinct bugs to report distinct problems.
Comment 8 Hugo Ferreira CLA 2008-09-17 07:20:02 EDT
The problem seems to be occurring again in the latest CVS Head as well as in the RC1 build.
Comment 9 Rüdiger Herrmann CLA 2008-10-23 09:50:34 EDT
(In reply to comment #4)
> [...] Using a table color provider, if you set a color on the first
> cell, the cells on all the other columns will also be colored. I will attach a
> snippet reproducing this, but maybe filling a new bug is the most correct thing.
Opened a spearate bug:
  251842: [Table] TableItem#setBackground( 0 ,Color) affects whole row
  https://bugs.eclipse.org/bugs/show_bug.cgi?id=251842
Comment 10 Rüdiger Herrmann CLA 2008-10-24 03:08:27 EDT
If the selection was set programmatically, everything worked OK. However changing the selection via user interaction, an eventually set background color was not overridden.
Changes are in CVS HEAD