- completely removed DetailType enum and all its uses
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / reference / NomenclaturalReferenceDetailSection.java
index d9a824f9cd0184a61da1d7d9b202a5a295f9be67..33cd1e7b9a856e4f6a77afc8ca726dea2c40ea40 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.
 */
@@ -19,7 +19,7 @@ import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
@@ -48,12 +48,6 @@ public class NomenclaturalReferenceDetailSection extends
                        ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
                super(cdmFormFactory, conversation, parentElement, selectionProvider, style);
        }
-       
-       /** {@inheritDoc} */
-       @Override
-       protected DetailType getDetailType() {
-               return DetailType.NOMENCLATURALREFERENCE;
-       }
 
        /** {@inheritDoc} */
        @Override
@@ -62,12 +56,13 @@ public class NomenclaturalReferenceDetailSection extends
        }
 
        /** {@inheritDoc} */
-       public void setTaxonBase(TaxonBase entity) {
+       @Override
+    public void setTaxonBase(TaxonBase entity) {
                this.taxonBase = entity;
                TaxonNameBase name = (TaxonNameBase) HibernateProxyHelper.deproxy(entity.getName());
                setEntity(name);
        }
-       
+
        /** {@inheritDoc} */
        @Override
        protected void setSectionTitle() {
@@ -76,7 +71,7 @@ public class NomenclaturalReferenceDetailSection extends
                        INomenclaturalReference reference = getEntity().getNomenclaturalReference();
                        String nomenclaturalCitation = reference.getNomenclaturalCitation(getEntity().getNomenclaturalMicroReference());
                        title = ": " + nomenclaturalCitation;
-               }       
+               }
                this.setText(getHeading() + title);
        }
 
@@ -87,4 +82,12 @@ public class NomenclaturalReferenceDetailSection extends
        public TaxonBase getTaxonBase() {
                return taxonBase;
        }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
+        */
+       @Override
+       protected AbstractCdmDetailElement<TaxonNameBase> createCdmDetailElement(AbstractCdmDetailSection<TaxonNameBase> parentElement, int style) {
+           return formFactory.createNomenclaturalReferenceDetailElement(parentElement, style);
+       }
 }