Project: Eclipse_Platform_UI
Bug 215069 [Viewers] Problems with FocusCellOwnerDrawHighlighter
Reported: 2008-01-11 14:02:42 | Status: verified fixed

I have been experimenting with using TreeViewerEditor and related facilities, such as FocusCellOwnerDrawHighlighter. Have noticed a few problems with the current implementation: 1. At least on Windows, the background color for the selection in the tree should alter depending on whether or not the overall tree widget has focus or not. FocusCellOwnerDrawHighlighter does not implement this feedback. 2. If you don't set SWT.FULL_SELECTION when creating the tree, the selection doesn't get painted on any column besides the first one. If this is expected behavior, this should at least be in javadoc. 3. Regardless of whether or not SWT.FULL_SELECTION is used, the selection extent in the first column is not restricted to the text (as it typical on Windows for trees). It goes all the way to the left margin of the tree widget and covers tree controls, icon and the checkbox. This doesn't look particularly good. Following native behavior here would be desirable. The FocusCellOwnerDrawHighlighter also needs javadoc since it's public API.

Files changed in fix:
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/FocusCellOwnerDrawHighlighter.java bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/SWTFocusCellManager.java bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TableViewerRow.java bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewerRow.java bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerCell.java bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerRow.java