Project

General

Profile

« Previous | Next » 

Revision 079534a2

Added by Patrick Plitzner over 5 years ago

ref #7502 Show boolean properties in checkboxes

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorConfigLabelAccumulator.java
10 10

  
11 11
import org.eclipse.nebula.widgets.nattable.NatTable;
12 12
import org.eclipse.nebula.widgets.nattable.data.ListDataProvider;
13
import org.eclipse.nebula.widgets.nattable.grid.data.DefaultColumnHeaderDataProvider;
13 14
import org.eclipse.nebula.widgets.nattable.layer.LabelStack;
14 15
import org.eclipse.nebula.widgets.nattable.layer.cell.IConfigLabelAccumulator;
15 16

  
......
22 23
 *
23 24
 */
24 25
public class BulkEditorConfigLabelAccumulator implements IConfigLabelAccumulator {
26

  
27
    public static final String BOOLEAN_COLUMN = "boolean_column";
28

  
25 29
    private ListDataProvider<CdmBase> dataProvider;
26 30
    private AbstractBulkEditorInput input;
27 31
    private NatTable natTable;
32
    private DefaultColumnHeaderDataProvider colHeaderDataProvider;
28 33

  
29 34
    public BulkEditorConfigLabelAccumulator(NatTable natTable, ListDataProvider<CdmBase> dataProvider,
30
            AbstractBulkEditorInput input) {
35
            DefaultColumnHeaderDataProvider colHeaderDataProvider, AbstractBulkEditorInput input) {
31 36
        super();
32 37
        this.dataProvider = dataProvider;
38
        this.colHeaderDataProvider = colHeaderDataProvider;
33 39
        this.input = input;
34 40
        this.natTable = natTable;
35 41
    }
......
40 46
        if(rowPosition<0){
41 47
            return;
42 48
        }
49
        if(input.isBooleanProperty(colHeaderDataProvider.getColumnHeaderLabel(columnPosition))){
50
            configLabels.addLabel(BOOLEAN_COLUMN);
51
        }
43 52
        CdmBase rowObject = dataProvider.getRowObject(rowPosition);
44 53
        if(input.getMergeCandidates().contains(rowObject)){
45 54
            configLabels.addLabel(BulkEditorE4Composite.LABEL_CANDIDATE);

Also available in: Unified diff