Project

General

Profile

« Previous | Next » 

Revision 736e7cfa

Added by Andreas Müller over 10 years ago

fixing ordering in enums and remove dash #3752, #3736

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/OccurrenceCreator.java
12 12

  
13 13
import java.util.Arrays;
14 14
import java.util.HashMap;
15
import java.util.LinkedHashMap;
15 16
import java.util.Map;
16 17

  
17 18
import org.apache.log4j.Logger;
......
74 75
	 */
75 76
	@Override
76 77
	public Map<Object, String> getKeyLabelPairs() {
77
	    Map<Object, String> keyLabelPairs = new HashMap<Object, String>();
78
	    Map<Object, String> keyLabelPairs = new LinkedHashMap<Object, String>();
78 79
	    keyLabelPairs.putAll(AbstractUtility.orderTerms(Arrays.asList(SpecimenOrObservationType.values())));
79 80
	    return keyLabelPairs;
80 81
	}
81 82

  
82 83
	@Override
83 84
	public boolean savesEntity() {
84
		// TODO Auto-generated method stub
85 85
		return true;
86 86
	}
87 87

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
954 954
        Comparator<T> comparator = new Comparator<T>() {
955 955
            @Override
956 956
            public int compare(T t1, T t2) {
957
                return t1.getKey().compareTo(t2.getKey());
957
                return t1.getMessage().compareTo(t2.getMessage());
958 958
            }
959 959
        };
960 960
        Map<T, String> result = new LinkedHashMap<T, String>();
......
984 984
            T root = entry.getKey();
985 985
            result.put(root, root.getMessage());
986 986
            for(T child:entry.getValue()){
987
                result.put(child, " - " + child.getMessage());
987
                result.put(child, "  " + child.getMessage());
988 988
            }
989 989
        }
990 990
        return result;

Also available in: Unified diff