Revision b9f38c00
Added by Katja Luther over 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/VocabularyComboElement.java | ||
---|---|---|
119 | 119 |
|
120 | 120 |
if (vocComparator != null) { |
121 | 121 |
Collections.sort(preferredTerms, vocComparator); |
122 |
}else{ |
|
123 |
Collections.sort(preferredTerms, new Comparator<VOC>() { |
|
124 |
|
|
125 |
@Override |
|
126 |
public int compare(VOC o1, VOC o2) { |
|
127 |
if (o1.equals(o2)){ |
|
128 |
return 0; |
|
129 |
} |
|
130 |
int result = ((TermVocabulary) o1).getTitleCache().compareTo(((TermVocabulary)o2).getTitleCache()); |
|
131 |
|
|
132 |
return result; |
|
133 |
} |
|
134 |
}); |
|
122 | 135 |
} |
123 | 136 |
for (VOC term : preferredTerms) { |
124 | 137 |
String label = getLabel(term); |
Also available in: Unified diff
ref #8749: sort elements of vocabulary combo