Revision 54cc3ca6
Added by Katja Luther over 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NomenclaturalStatusElement.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.taxeditor.ui.section.name; |
11 | 11 |
|
12 |
import java.util.Comparator; |
|
13 |
|
|
12 | 14 |
import org.eclipse.swt.events.SelectionListener; |
13 | 15 |
|
14 | 16 |
import eu.etaxonomy.cdm.api.service.IVocabularyService; |
... | ... | |
49 | 51 |
@Override |
50 | 52 |
public void createControls(ICdmFormElement element, int style) { |
51 | 53 |
TermVocabulary vocabulary = CdmStore.getService(IVocabularyService.class).find(VocabularyEnum.NomenclaturalStatusType.getUuid()); |
52 |
nomenclaturalStatusTypeCombo = formFactory.createDefinedTermComboElement(vocabulary, this, "Status", null,false, style, true); |
|
54 |
|
|
55 |
Comparator<NomenclaturalStatusType> termComparator= (NomenclaturalStatusType t1, NomenclaturalStatusType t2) -> t1.getLabel().compareTo(t2.getLabel()); |
|
56 |
nomenclaturalStatusTypeCombo = formFactory.createDefinedTermComboElement(vocabulary, this, "Status", null,true, style, true); |
|
57 |
nomenclaturalStatusTypeCombo.setTermComparator(termComparator); |
|
53 | 58 |
ruleConsideredText = formFactory.createTextWithLabelElement(this, "Rule Considered", "", style); |
54 | 59 |
|
55 | 60 |
super.createControls(element, style); |
... | ... | |
60 | 65 |
@Override |
61 | 66 |
public void setEntity(NomenclaturalStatus entity) { |
62 | 67 |
super.setEntity(entity); |
63 |
if (entity.getType() != null){ |
|
64 |
nomenclaturalStatusTypeCombo.setSelection(entity.getType()); |
|
65 |
} |
|
68 |
// if (entity.getType() != null){
|
|
69 |
// nomenclaturalStatusTypeCombo.setSelection(entity.getType());
|
|
70 |
// }
|
|
66 | 71 |
ruleConsideredText.setText(entity.getRuleConsidered()); |
67 | 72 |
} |
68 | 73 |
|
Also available in: Unified diff
ref #6559: order misapplied names, pro parte synonyms and invalid designations