public class ECPFocusCellDrawHighlighter
extends org.eclipse.jface.viewers.FocusCellHighlighter
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
RAP specific: despite its name that was taken as-is from JFace/RCP to ease single-sourcing, this
class does not use custom drawing to highlight the focused cell.
The focused cell is displayed using the selection colors of the system.
Constructor and Description |
---|
ECPFocusCellDrawHighlighter(org.eclipse.jface.viewers.ColumnViewer viewer)
Create a new instance which can be passed to a.
|
Modifier and Type | Method and Description |
---|---|
protected void |
focusCellChanged(org.eclipse.jface.viewers.ViewerCell newCell,
org.eclipse.jface.viewers.ViewerCell oldCell) |
protected org.eclipse.swt.graphics.Color |
getSelectedCellBackgroundColor(org.eclipse.jface.viewers.ViewerCell cell)
The color to use when rendering the background of the selected cell when
the control has the input focus.
|
protected org.eclipse.swt.graphics.Color |
getSelectedCellBackgroundColorNoFocus(org.eclipse.jface.viewers.ViewerCell cell)
The color to use when rendering the background of the selected cell when
the control has no input focus.
|
protected org.eclipse.swt.graphics.Color |
getSelectedCellForegroundColor(org.eclipse.jface.viewers.ViewerCell cell)
The color to use when rendering the foreground (=text) of the selected
cell when the control has the input focus.
|
protected org.eclipse.swt.graphics.Color |
getSelectedCellForegroundColorNoFocus(org.eclipse.jface.viewers.ViewerCell cell)
The color to use when rendering the foreground (=text) of the selected
cell when the control has no input focus.
|
protected void |
init() |
protected boolean |
onlyTextHighlighting(org.eclipse.jface.viewers.ViewerCell cell)
Controls whether the whole cell or only the text-area is highlighted.
|
public ECPFocusCellDrawHighlighter(org.eclipse.jface.viewers.ColumnViewer viewer)
viewer
- the viewerprotected org.eclipse.swt.graphics.Color getSelectedCellBackgroundColor(org.eclipse.jface.viewers.ViewerCell cell)
cell
- the cell which is colorednull
to use the defaultprotected org.eclipse.swt.graphics.Color getSelectedCellForegroundColor(org.eclipse.jface.viewers.ViewerCell cell)
cell
- the cell which is colorednull
to use the defaultprotected org.eclipse.swt.graphics.Color getSelectedCellForegroundColorNoFocus(org.eclipse.jface.viewers.ViewerCell cell)
cell
- the cell which is colorednull
to use the same used when
control has focusprotected org.eclipse.swt.graphics.Color getSelectedCellBackgroundColorNoFocus(org.eclipse.jface.viewers.ViewerCell cell)
cell
- the cell which is colorednull
to use the same used when
control has focusprotected boolean onlyTextHighlighting(org.eclipse.jface.viewers.ViewerCell cell)
cell
- the cell which is highlightedtrue
if only the text area should be highlightedprotected void init()
init
in class org.eclipse.jface.viewers.FocusCellHighlighter
protected void focusCellChanged(org.eclipse.jface.viewers.ViewerCell newCell, org.eclipse.jface.viewers.ViewerCell oldCell)
focusCellChanged
in class org.eclipse.jface.viewers.FocusCellHighlighter
Copyright © 2018. All rights reserved.