*/
public DistributionEditor(Composite parent, DistributionEditorPart part) {
super(parent, SWT.NULL);
+ isShowRank = PreferencesUtil.getBooleanValue(EditorPreferencePredicate.ShowRankInDistributionEditor.getKey());
this.part = part;
this.setLayout(new GridLayout());
GridLayoutFactory.fillDefaults().applyTo(parent);
natTable = new NatTable(parent, false);
parent.pack();
-
-// // natTable = new NatTable(parent, viewportLayer);
-// natTable = new NatTable(parent, false);
Composite bottomComposite = new Composite(parent, SWT.NONE);
GridLayoutFactory.fillDefaults().applyTo(bottomComposite);
createStatusBar(bottomComposite);
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
import eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix.supplementalInfo.SupplementalInfoDisplayConverter;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
/**
* @author k.luther
DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 1);
+ if (PreferencesUtil.isShowRankInChecklistEditor()){
+ configRegistry.registerConfigAttribute(
+ EditConfigAttributes.CELL_EDITOR,
+ new FilterRowTextCellEditor(),
+ DisplayMode.NORMAL,
+ FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 2);
+
+ configRegistry.registerConfigAttribute(
+ FilterRowConfigAttributes.TEXT_MATCHING_MODE,
+ TextMatchingMode.CONTAINS,
+ DisplayMode.NORMAL,
+ FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 2);
+
+ configRegistry.registerConfigAttribute(
+ CellConfigAttributes.DISPLAY_CONVERTER,
+ new SupplementalInfoDisplayConverter(),
+ DisplayMode.NORMAL,
+ FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 2);
+ }
// Register a combo box editor to be displayed in the filter row
// cell when a value is selected from the combo, the object is
// converted to a string using the converter (registered below)
StatusComboBoxDataProvider dataProvider;
- for (int i = 1; i <= editor.areas.size(); ++i) {
+ int start = 1;
+ if (PreferencesUtil.isShowRankInChecklistEditor()){
+ start = 2;
+ }
+
+ for (int i = start; i < editor.areas.size()+start; ++i) {
dataProvider = new StatusComboBoxDataProvider(editor);
ComboBoxCellEditor cellEditor = new ComboBoxCellEditor(dataProvider, dataProvider.getMaxVisibleItems());
cellEditor.setFreeEdit(true);
List<DefinedTermBase> inputAll = new ArrayList<>();
PresenceAbsenceTerm noneTerm = PresenceAbsenceTerm.NewInstance();
noneTerm.setTitleCache(" - ", true);
- noneTerm.addRepresentation(Representation.NewInstance(" - ", "", "", CdmStore.getDefaultLanguage()));
+ noneTerm.addRepresentation(Representation.NewInstance(" - ", " ", " ", CdmStore.getDefaultLanguage()));
inputAll.add(noneTerm);
String statusString = PreferencesUtil.getStringValue(PreferencePredicate.AvailableDistributionStatus.getKey());
String [] statusArray = statusString.split(";");