- set CdmFormFactory.createTermComboElement() to deprecated
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / name / SpecimenTypeDesignationElement.java
index 1376e0ba682c4975ccb47f5a8c814f0e56540aae..8a6a13fdc7915f430784fa0157957e2e92781b54 100644 (file)
@@ -1,9 +1,9 @@
 // $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.
  */
@@ -13,6 +13,7 @@ package eu.etaxonomy.taxeditor.ui.section.name;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
@@ -28,7 +29,7 @@ import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
  * <p>
  * SpecimenTypeDesignationElement class.
  * </p>
- * 
+ *
  * @author n.hoffmann
  * @created May 17, 2010
  * @version 1.0
@@ -44,7 +45,7 @@ public class SpecimenTypeDesignationElement extends
         * <p>
         * Constructor for SpecimenTypeDesignationElement.
         * </p>
-        * 
+        *
         * @param formFactory
         *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
@@ -72,8 +73,7 @@ public class SpecimenTypeDesignationElement extends
                                .createSelectionElement(DerivedUnit.class,
                                                getConversationHolder(), formElement, "Specimen", null,
                                                EntitySelectionElement.ALL, style);
-               combo_typeStatus = formFactory
-                               .createTermComboElement(SpecimenTypeDesignationStatus.class,
+               combo_typeStatus = formFactory.createDefinedTermComboElement(TermType.SpecimenTypeDesignationStatus,
                                                formElement, "Designation Status", null, style);
 
                super.createControls(formElement, style);
@@ -101,8 +101,8 @@ public class SpecimenTypeDesignationElement extends
                else if (eventSource == text_specimenTypeText) {
                        // TODO this is a simple workaround to enter type specimen as text
                        // strings
-                       if (getEntity().getTypeSpecimen() == null) {                            
-                               DerivedUnit typeSpecimen = DerivedUnit.NewInstance(SpecimenOrObservationType.PreservedSpecimen);                                                                        
+                       if (getEntity().getTypeSpecimen() == null) {
+                               DerivedUnit typeSpecimen = DerivedUnit.NewInstance(SpecimenOrObservationType.PreservedSpecimen);
                                getEntity().setTypeSpecimen(typeSpecimen);
                        }
                        getEntity().getTypeSpecimen().setTitleCache(