Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 128469 Details for
Bug 268135
[Viewers] [CellEditors] Table with SWT.MULTI and TableViewerEditor problem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
API to control the background of unselected cells
patch.txt (text/plain), 2.18 KB, created by
Thomas Schindl
on 2009-03-11 18:40:33 EDT
(
hide
)
Description:
API to control the background of unselected cells
Filename:
MIME Type:
Creator:
Thomas Schindl
Created:
2009-03-11 18:40:33 EDT
Size:
2.18 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jface >Index: src/org/eclipse/jface/viewers/FocusCellOwnerDrawHighlighter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface/src/org/eclipse/jface/viewers/FocusCellOwnerDrawHighlighter.java,v >retrieving revision 1.8 >diff -u -r1.8 FocusCellOwnerDrawHighlighter.java >--- src/org/eclipse/jface/viewers/FocusCellOwnerDrawHighlighter.java 24 Mar 2008 19:21:51 -0000 1.8 >+++ src/org/eclipse/jface/viewers/FocusCellOwnerDrawHighlighter.java 11 Mar 2009 22:38:51 -0000 >@@ -85,11 +85,10 @@ > > private void removeSelectionInformation(Event event, ViewerCell cell) { > GC gc = event.gc; >- gc.setBackground(cell.getViewerRow().getBackground( >- cell.getColumnIndex())); >- gc.setForeground(cell.getViewerRow().getForeground( >- cell.getColumnIndex())); >- gc.fillRectangle(cell.getBounds()); >+ gc.setBackground(getUnselectedCellBackgroundColor(cell)); >+ gc.setForeground(getUnselectedCellForegroundColor(cell)); >+ gc.fillRectangle(event.getBounds()); >+ > event.detail &= ~SWT.SELECTED; > } > >@@ -173,6 +172,24 @@ > } > > /** >+ * @param cell >+ * @return n >+ */ >+ protected Color getUnselectedCellBackgroundColor(ViewerCell cell) { >+ return cell.getViewerRow().getBackground( >+ cell.getColumnIndex()); >+ } >+ >+ /** >+ * @param cell >+ * @return n >+ */ >+ protected Color getUnselectedCellForegroundColor(ViewerCell cell) { >+ return cell.getViewerRow().getForeground( >+ cell.getColumnIndex()); >+ } >+ >+ /** > * Controls whether the whole cell or only the text-area is highlighted > * > * @param cell >@@ -194,7 +211,7 @@ > int width = newCell.getColumnIndex() == 0 ? rect.x + rect.width > : rect.width; > // 1 is a fix for Linux-GTK >- newCell.getControl().redraw(x, rect.y - 1, width, rect.height + 1, >+ newCell.getControl().redraw(x, rect.y - 1, width, rect.height + 2, > true); > } > >@@ -204,7 +221,7 @@ > int width = oldCell.getColumnIndex() == 0 ? rect.x + rect.width > : rect.width; > // 1 is a fix for Linux-GTK >- oldCell.getControl().redraw(x, rect.y - 1, width, rect.height + 1, >+ oldCell.getControl().redraw(x, rect.y - 1, width, rect.height + 2, > true); > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 268135
: 128469 |
128470
|
197612
|
211087