Class ECPFocusCellDrawHighlighter
- java.lang.Object
-
- org.eclipse.jface.viewers.FocusCellHighlighter
-
- org.eclipse.emf.ecp.edit.internal.swt.controls.ECPFocusCellDrawHighlighter
-
public class ECPFocusCellDrawHighlighter extends org.eclipse.jface.viewers.FocusCellHighlighterA concrete implementation ofFocusCellHighlighterusing 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 theSWT.FULL_SELECTIONbit setRAP 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.
This class can be subclassed to configure how the coloring of the selected cell.
The focused cell is displayed using the selection colors of the system.- Since:
- 1.2
-
-
Constructor Summary
Constructors Constructor Description ECPFocusCellDrawHighlighter(org.eclipse.jface.viewers.ColumnViewer viewer)Create a new instance which can be passed to a.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfocusCellChanged(org.eclipse.jface.viewers.ViewerCell newCell, org.eclipse.jface.viewers.ViewerCell oldCell)protected org.eclipse.swt.graphics.ColorgetSelectedCellBackgroundColor(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.ColorgetSelectedCellBackgroundColorNoFocus(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.ColorgetSelectedCellForegroundColor(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.ColorgetSelectedCellForegroundColorNoFocus(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 voidinit()protected booleanonlyTextHighlighting(org.eclipse.jface.viewers.ViewerCell cell)Controls whether the whole cell or only the text-area is highlighted.
-
-
-
Method Detail
-
getSelectedCellBackgroundColor
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.- Parameters:
cell- the cell which is colored- Returns:
- the color or
nullto use the default
-
getSelectedCellForegroundColor
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.- Parameters:
cell- the cell which is colored- Returns:
- the color or
nullto use the default
-
getSelectedCellForegroundColorNoFocus
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.- Parameters:
cell- the cell which is colored- Returns:
- the color or
nullto use the same used when control has focus
-
getSelectedCellBackgroundColorNoFocus
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.- Parameters:
cell- the cell which is colored- Returns:
- the color or
nullto use the same used when control has focus
-
onlyTextHighlighting
protected boolean onlyTextHighlighting(org.eclipse.jface.viewers.ViewerCell cell)
Controls whether the whole cell or only the text-area is highlighted.- Parameters:
cell- the cell which is highlighted- Returns:
trueif only the text area should be highlighted
-
init
protected void init()
- Overrides:
initin classorg.eclipse.jface.viewers.FocusCellHighlighter
-
focusCellChanged
protected void focusCellChanged(org.eclipse.jface.viewers.ViewerCell newCell, org.eclipse.jface.viewers.ViewerCell oldCell)- Overrides:
focusCellChangedin classorg.eclipse.jface.viewers.FocusCellHighlighter
-
-