Project

General

Profile

Download (1.67 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2018 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.taxeditor.bulkeditor.e4;
10

    
11
import org.eclipse.nebula.widgets.nattable.config.AbstractRegistryConfiguration;
12
import org.eclipse.nebula.widgets.nattable.config.CellConfigAttributes;
13
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
14
import org.eclipse.nebula.widgets.nattable.style.CellStyleAttributes;
15
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
16
import org.eclipse.nebula.widgets.nattable.style.Style;
17
import org.eclipse.nebula.widgets.nattable.util.GUIHelper;
18

    
19
/**
20
 * @author pplitzner
21
 * @since Jul 6, 2018
22
 *
23
 */
24
public final class LabelStyleConfiguration extends AbstractRegistryConfiguration {
25
    @Override
26
    public void configureRegistry(IConfigRegistry configRegistry) {
27
        Style cellStyle = new Style();
28
        cellStyle.setAttributeValue(
29
                CellStyleAttributes.BACKGROUND_COLOR,
30
                GUIHelper.COLOR_YELLOW);
31
        configRegistry.registerConfigAttribute(
32
                CellConfigAttributes.CELL_STYLE, cellStyle,
33
                DisplayMode.NORMAL, BulkEditorE4Composite.CANDIDATE_LABEL);
34

    
35
        cellStyle = new Style();
36
        cellStyle.setAttributeValue(
37
                CellStyleAttributes.BACKGROUND_COLOR,
38
                GUIHelper.COLOR_GREEN);
39
        configRegistry.registerConfigAttribute(
40
                CellConfigAttributes.CELL_STYLE, cellStyle,
41
                DisplayMode.NORMAL, BulkEditorE4Composite.TARGET_LABEL);
42

    
43
    }
44
}
(7-7/7)