org.eclipse.jface.viewers
Class FocusCellOwnerDrawHighlighter
java.lang.Object
org.eclipse.jface.viewers.FocusCellHighlighter
org.eclipse.jface.viewers.FocusCellOwnerDrawHighlighter
-
public class FocusCellOwnerDrawHighlighter
- extends
FocusCellHighlighter
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.
-
Since:
- 3.3
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
FocusCellOwnerDrawHighlighter
public FocusCellOwnerDrawHighlighter(
ColumnViewer viewer)
- Create a new instance which can be passed to a
TreeViewerFocusCellManager
-
Parameters:
-
viewer
- the viewer
getSelectedCellBackgroundColor
protected
Color getSelectedCellBackgroundColor(
ViewerCell cell)
- The color to use when rendering the background of the selected cell when
the control has the input focus
-
-
Parameters:
-
cell
- the cell which is colored
-
Returns:
- the color or
null
to use the default
getSelectedCellForegroundColor
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
-
-
Parameters:
-
cell
- the cell which is colored
-
Returns:
- the color or
null
to use the default
getSelectedCellForegroundColorNoFocus
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
-
-
Parameters:
-
cell
- the cell which is colored
-
Returns:
- the color or
null
to use the same used when
control has focus -
Since:
- 3.4
getSelectedCellBackgroundColorNoFocus
protected
Color getSelectedCellBackgroundColorNoFocus(
ViewerCell cell)
- The color to use when rendering the background of the selected cell when
the control has no input focus
-
-
Parameters:
-
cell
- the cell which is colored
-
Returns:
- the color or
null
to use the same used when
control has focus -
Since:
- 3.4
onlyTextHighlighting
protected boolean onlyTextHighlighting(
ViewerCell cell)
- Controls whether the whole cell or only the text-area is highlighted
-
-
Parameters:
-
cell
- the cell which is highlighted
-
Returns:
-
true
if only the text area should be highlighted -
Since:
- 3.4
focusCellChanged
protected void focusCellChanged(
ViewerCell newCell,
ViewerCell oldCell)
-
Description copied from class:
FocusCellHighlighter
- Called by the framework when the focus cell has changed. Subclasses may
extend.
The default implementation for this method calls
focusCellChanged(ViewerCell). Subclasses should override this method
rather than
FocusCellHighlighter.focusCellChanged(ViewerCell)
.
-
-
Overrides:
-
focusCellChanged
in class
FocusCellHighlighter
-
-
Parameters:
-
newCell
- the new focus cell or null
if no new cell
receives the focus -
oldCell
- the old focus cell or null
if no cell has been
focused before
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.