Project

General

Profile

Download (1.8 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

    
18
import eu.etaxonomy.taxeditor.model.ColorResources;
19
import eu.etaxonomy.taxeditor.preference.Resources;
20

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

    
37
        cellStyle = new Style();
38
        cellStyle.setAttributeValue(
39
                CellStyleAttributes.BACKGROUND_COLOR,
40
                ColorResources.getColor(Resources.COLOR_BULK_EDITOR_TARGET));
41
        configRegistry.registerConfigAttribute(
42
                CellConfigAttributes.CELL_STYLE, cellStyle,
43
                DisplayMode.NORMAL, BulkEditorE4Composite.TARGET_LABEL);
44

    
45
    }
46
}
(4-4/7)