2 * Copyright (C) 2018 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.taxeditor
.bulkeditor
.e4
;
11 import org
.eclipse
.nebula
.widgets
.nattable
.data
.IColumnPropertyAccessor
;
13 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
14 import eu
.etaxonomy
.taxeditor
.bulkeditor
.input
.AbstractBulkEditorInput
;
21 public class BulkEditorPropertyAccessor
implements IColumnPropertyAccessor
<CdmBase
> {
23 private AbstractBulkEditorInput input
;
26 public BulkEditorPropertyAccessor(AbstractBulkEditorInput
<CdmBase
> input
) {
32 public Object
getDataValue(CdmBase rowObject
, int columnIndex
) {
34 return input
.getText(rowObject
);
35 }else if(columnIndex
==1){
36 return input
.getTypeText(rowObject
);
42 public void setDataValue(CdmBase rowObject
, int columnIndex
, Object newValue
) {
47 public int getColumnCount() {
52 public String
getColumnProperty(int columnIndex
) {
54 return input
.getName();
55 }else if(columnIndex
==1){
56 return BulkEditorE4
.TYPE_PROPERTY
;
62 public int getColumnIndex(String propertyName
) {
63 if(propertyName
.equals(input
.getName())){
66 else if(propertyName
.equals(BulkEditorE4
.TYPE_PROPERTY
)){