|
Eclipse Platform Release 3.4 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.viewers.FocusCellHighlighter
org.eclipse.jface.viewers.FocusCellOwnerDrawHighlighter
A concrete implementation of FocusCellHighlighter
using by setting
the control into owner draw mode and highlighting the currently selected
cell. To make the use this class you should create the control with the
SWT.FULL_SELECTION
bit set
This class can be subclassed to configure how the coloring of the selected
cell.
Constructor Summary | |
FocusCellOwnerDrawHighlighter(ColumnViewer viewer)
Create a new instance which can be passed to a TreeViewerFocusCellManager |
Method Summary | |
protected void |
focusCellChanged(ViewerCell newCell,
ViewerCell oldCell)
Called by the framework when the focus cell has changed. |
protected Color |
getSelectedCellBackgroundColor(ViewerCell cell)
The color to use when rendering the background of the selected cell when the control has the input focus |
protected Color |
getSelectedCellBackgroundColorNoFocus(ViewerCell cell)
The color to use when rendering the background of the selected cell when the control has no input focus |
protected Color |
getSelectedCellForegroundColor(ViewerCell cell)
The color to use when rendering the foreground (=text) of the selected cell when the control has the input focus |
protected Color |
getSelectedCellForegroundColorNoFocus(ViewerCell cell)
The color to use when rendering the foreground (=text) of the selected cell when the control has no input focus |
protected boolean |
onlyTextHighlighting(ViewerCell cell)
Controls whether the whole cell or only the text-area is highlighted |
Methods inherited from class org.eclipse.jface.viewers.FocusCellHighlighter |
focusCellChanged, getFocusCell, init |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FocusCellOwnerDrawHighlighter(ColumnViewer viewer)
TreeViewerFocusCellManager
viewer
- the viewerMethod Detail |
protected Color getSelectedCellBackgroundColor(ViewerCell cell)
cell
- the cell which is colored
null
to use the defaultprotected Color getSelectedCellForegroundColor(ViewerCell cell)
cell
- the cell which is colored
null
to use the defaultprotected Color getSelectedCellForegroundColorNoFocus(ViewerCell cell)
cell
- the cell which is colored
null
to use the same used when
control has focusprotected Color getSelectedCellBackgroundColorNoFocus(ViewerCell cell)
cell
- the cell which is colored
null
to use the same used when
control has focusprotected boolean onlyTextHighlighting(ViewerCell cell)
cell
- the cell which is highlighted
true
if only the text area should be highlightedprotected void focusCellChanged(ViewerCell newCell, ViewerCell oldCell)
FocusCellHighlighter
The default implementation for this method calls
focusCellChanged(ViewerCell). Subclasses should override this method
rather than FocusCellHighlighter.focusCellChanged(ViewerCell)
.
focusCellChanged
in class FocusCellHighlighter
newCell
- the new focus cell or null
if no new cell
receives the focusoldCell
- the old focus cell or null
if no cell has been
focused before
|
Eclipse Platform Release 3.4 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.