1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2018 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.taxeditor.bulkeditor.e4;
|
11
|
|
12
|
import org.eclipse.jface.viewers.ColumnViewer;
|
13
|
import org.eclipse.jface.viewers.FocusCellOwnerDrawHighlighter;
|
14
|
import org.eclipse.jface.viewers.ViewerCell;
|
15
|
import org.eclipse.swt.SWT;
|
16
|
import org.eclipse.swt.graphics.Color;
|
17
|
|
18
|
/**
|
19
|
* @author k.luther
|
20
|
* @date 02.03.2018
|
21
|
*
|
22
|
*/
|
23
|
public class BulkEditorFocusCellOwnerDrawHighLighter extends FocusCellOwnerDrawHighlighter {
|
24
|
|
25
|
/**
|
26
|
* @param viewer
|
27
|
*/
|
28
|
public BulkEditorFocusCellOwnerDrawHighLighter(ColumnViewer viewer) {
|
29
|
super(viewer);
|
30
|
|
31
|
}
|
32
|
|
33
|
|
34
|
/**
|
35
|
* The color to use when rendering the background of the selected cell when
|
36
|
* the control has <b>no</b> input focus
|
37
|
*
|
38
|
* @param cell
|
39
|
* the cell which is colored
|
40
|
* @return the color or <code>null</code> to use the same used when
|
41
|
* control has focus
|
42
|
* @since 3.4
|
43
|
*/
|
44
|
@Override
|
45
|
protected Color getSelectedCellBackgroundColorNoFocus(ViewerCell cell) {
|
46
|
return cell.getItem().getDisplay().getSystemColor(
|
47
|
SWT.COLOR_LIST_SELECTION);
|
48
|
}
|
49
|
|
50
|
/**
|
51
|
* The color to use when rendering the foreground (=text) of the selected
|
52
|
* cell when the control has <b>no</b> input focus
|
53
|
*
|
54
|
* @param cell
|
55
|
* the cell which is colored
|
56
|
* @return the color or <code>null</code> to use the same used when
|
57
|
* control has focus
|
58
|
* @since 3.4
|
59
|
*/
|
60
|
@Override
|
61
|
protected Color getSelectedCellForegroundColorNoFocus(ViewerCell cell) {
|
62
|
return cell.getItem().getDisplay().getSystemColor(
|
63
|
SWT.COLOR_LIST_SELECTION_TEXT);
|
64
|
}
|
65
|
|
66
|
|
67
|
|
68
|
}
|