X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/blobdiff_plain/017f612cde61c39d38b1f1693a8ad6ad59efed8d..d6f9e690e5474c4df3c9e59d2685c6a5988724c1:/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NomenclaturalStatusElement.java diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NomenclaturalStatusElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NomenclaturalStatusElement.java index 438f90da4..555021fa3 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NomenclaturalStatusElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NomenclaturalStatusElement.java @@ -1,23 +1,28 @@ -// $Id$ /** * Copyright (C) 2007 EDIT -* European Distributed Institute of Taxonomy +* European Distributed Institute of Taxonomy * http://www.e-taxonomy.eu -* +* * The contents of this file are subject to the Mozilla Public License Version 1.1 * See LICENSE.TXT at the top of this package for the full license terms. */ package eu.etaxonomy.taxeditor.ui.section.name; +import java.util.Comparator; + import org.eclipse.swt.events.SelectionListener; +import eu.etaxonomy.cdm.api.service.IVocabularyService; +import eu.etaxonomy.cdm.model.common.TermVocabulary; +import eu.etaxonomy.cdm.model.common.VocabularyEnum; import eu.etaxonomy.cdm.model.name.NomenclaturalStatus; import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType; -import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement; +import eu.etaxonomy.taxeditor.store.CdmStore; import eu.etaxonomy.taxeditor.ui.combo.TermComboElement; import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection; import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; +import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; import eu.etaxonomy.taxeditor.ui.element.IEntityElement; import eu.etaxonomy.taxeditor.ui.element.ISelectableElement; import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator; @@ -25,55 +30,44 @@ import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement; import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractReferencedEntityElement; /** - *
NomenclaturalStatusElement class.
- * * @author n.hoffmann * @created Nov 5, 2009 - * @version 1.0 */ public class NomenclaturalStatusElement extends AbstractReferencedEntityElementConstructor for NomenclaturalStatusElement.
- * - * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object. - * @param element a {@link eu.etaxonomy.cdm.model.name.NomenclaturalStatus} object. - * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object. - * @param style a int. - * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object. - */ + private final SelectionArbitrator selectionArbitrator; + public NomenclaturalStatusElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement, NomenclaturalStatus element, SelectionListener removeListener, int style) { super(cdmFormFactory, formElement, element, removeListener, style); selectionArbitrator = cdmFormFactory.createSelectionArbitrator(this); } - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.forms.entitysections.AbstractEntitySetElementComposite#createControls(org.eclipse.swt.widgets.Composite, int) - */ /** {@inheritDoc} */ @Override public void createControls(ICdmFormElement element, int style) { - nomenclaturalStatusTypeCombo = formFactory.createTermComboElement(NomenclaturalStatusType.class, this, "Nomenclatural Status Type", null, style); + TermVocabulary vocabulary = CdmStore.getService(IVocabularyService.class).find(VocabularyEnum.NomenclaturalStatusType.getUuid()); + + Comparator