1 |
9767c1ad
|
Patrick Plitzner
|
/**
|
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.grid.data.DefaultColumnHeaderDataProvider;
|
12 |
|
|
import org.eclipse.nebula.widgets.nattable.layer.LabelStack;
|
13 |
|
|
import org.eclipse.nebula.widgets.nattable.layer.cell.IConfigLabelAccumulator;
|
14 |
|
|
|
15 |
|
|
import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
|
16 |
|
|
|
17 |
|
|
/**
|
18 |
|
|
* @author pplitzner
|
19 |
|
|
* @since Jul 6, 2018
|
20 |
|
|
*
|
21 |
|
|
*/
|
22 |
|
|
public class BulkEditorConfigLabelAccumulatorHeader implements IConfigLabelAccumulator {
|
23 |
|
|
|
24 |
|
|
public static final String BOOLEAN_COLUMN = "boolean_column";
|
25 |
|
|
public static final String CACHE_COLUMN = "cache_column";
|
26 |
|
|
|
27 |
|
|
private AbstractBulkEditorInput input;
|
28 |
|
|
private DefaultColumnHeaderDataProvider colHeaderDataProvider;
|
29 |
|
|
|
30 |
|
|
public BulkEditorConfigLabelAccumulatorHeader(DefaultColumnHeaderDataProvider colHeaderDataProvider,
|
31 |
|
|
AbstractBulkEditorInput input) {
|
32 |
|
|
this.colHeaderDataProvider = colHeaderDataProvider;
|
33 |
|
|
this.input = input;
|
34 |
|
|
}
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
@Override
|
38 |
|
|
public void accumulateConfigLabels(LabelStack configLabels, int columnPosition, int rowPosition) {
|
39 |
|
|
if(input.isCacheProperty(colHeaderDataProvider.getColumnHeaderLabel(columnPosition))){
|
40 |
|
|
configLabels.addLabel(CACHE_COLUMN);
|
41 |
|
|
}
|
42 |
|
|
}
|
43 |
|
|
}
|