Project

General

Profile

« Previous | Next » 

Revision a559c7f6

Added by Katja Luther about 5 years ago

ref #7854: correct handling when first entry is none-term and add rank display in distribution editor

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/FilterRowConfiguration.java
20 20
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
21 21

  
22 22
import eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix.supplementalInfo.SupplementalInfoDisplayConverter;
23
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
23 24

  
24 25
/**
25 26
 * @author k.luther
......
60 61
                    DisplayMode.NORMAL,
61 62
                    FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 1);
62 63

  
64
            if (PreferencesUtil.isShowRankInChecklistEditor()){
65
                configRegistry.registerConfigAttribute(
66
                        EditConfigAttributes.CELL_EDITOR,
67
                        new FilterRowTextCellEditor(),
68
                        DisplayMode.NORMAL,
69
                        FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 2);
70

  
71
                configRegistry.registerConfigAttribute(
72
                        FilterRowConfigAttributes.TEXT_MATCHING_MODE,
73
                        TextMatchingMode.CONTAINS,
74
                        DisplayMode.NORMAL,
75
                        FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 2);
76

  
77
                configRegistry.registerConfigAttribute(
78
                        CellConfigAttributes.DISPLAY_CONVERTER,
79
                        new SupplementalInfoDisplayConverter(),
80
                        DisplayMode.NORMAL,
81
                        FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 2);
82
            }
63 83

  
64 84
            // Register a combo box editor to be displayed in the filter row
65 85
            // cell when a value is selected from the combo, the object is
66 86
            // converted to a string using the converter (registered below)
67 87
            StatusComboBoxDataProvider dataProvider;
68
            for (int i = 1; i <= editor.areas.size(); ++i) {
88
            int start = 1;
89
            if (PreferencesUtil.isShowRankInChecklistEditor()){
90
                start = 2;
91
            }
92

  
93
            for (int i = start; i < editor.areas.size()+start; ++i) {
69 94
                dataProvider = new StatusComboBoxDataProvider(editor);
70 95
                ComboBoxCellEditor cellEditor = new ComboBoxCellEditor(dataProvider, dataProvider.getMaxVisibleItems());
71 96
                cellEditor.setFreeEdit(true);

Also available in: Unified diff