Project

General

Profile

« Previous | Next » 

Revision 6b3711bc

Added by Patrick Plitzner about 6 years ago

ref #7095 Overhauled categorical data cell editor

  • encapsulated data fetching and storing in RowWrapper
  • simplified data accesion by caching States in RowWrapper

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/matrix/categorical/CategoricalDataDisplayConverter.java
8 8
*/
9 9
package eu.etaxonomy.taxeditor.editor.workingSet.matrix.categorical;
10 10

  
11
import java.util.Collection;
12

  
11 13
import org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter;
12 14

  
13 15
import eu.etaxonomy.cdm.model.description.CategoricalData;
......
32 34
        else if(canonicalValue instanceof State){
33 35
            return ((State) canonicalValue).getLabel();
34 36
        }
37
        else if (canonicalValue instanceof Collection) {
38
            // Collection.toString() will add [ and ] around
39
            // the values in the Collection
40
            // So by removing the leading and ending
41
            // character, we remove the brackets
42
            String result = canonicalValue.toString();
43
            result = result.substring(1, result.length() - 1);
44
            return result;
45
        }
35 46
        else if(canonicalValue!=null){
36 47
            return canonicalValue.toString();
37 48
        }

Also available in: Unified diff