- completely removed DetailType enum and all its uses
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / name / AuthorshipDetailSection.java
index 7fba074cd955d3b01b3917ce0afeeb8a6d05d765..66c071ced89a6194752dcd6949672531c606bbdd 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.
 */
@@ -18,7 +18,7 @@ import eu.etaxonomy.cdm.model.name.NonViralName;
 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;
 
@@ -46,7 +46,7 @@ public class AuthorshipDetailSection extends AbstractCdmDetailSection<NonViralNa
                        ISelectionProvider selectionProvider, int style) {
                super(cdmFormFactory, conversation, parentElement, selectionProvider, style);
        }
-       
+
        /**
         * {@inheritDoc}
         *
@@ -61,7 +61,8 @@ public class AuthorshipDetailSection extends AbstractCdmDetailSection<NonViralNa
        }
 
        /** {@inheritDoc} */
-       public void setTaxonBase(TaxonBase entity) {
+       @Override
+    public void setTaxonBase(TaxonBase entity) {
                this.taxonBase = entity;
                NonViralName name = (NonViralName) HibernateProxyHelper.deproxy(entity.getName());
                setEntity(name);
@@ -76,12 +77,6 @@ public class AuthorshipDetailSection extends AbstractCdmDetailSection<NonViralNa
        public String getHeading() {
                return "Authorship";
        }
-       
-       /** {@inheritDoc} */
-       @Override
-       protected DetailType getDetailType() {
-               return DetailType.AUTHORSHIP;
-       }
 
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#getTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
@@ -90,5 +85,13 @@ public class AuthorshipDetailSection extends AbstractCdmDetailSection<NonViralNa
        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<NonViralName> createCdmDetailElement(AbstractCdmDetailSection<NonViralName> parentElement, int style) {
+           return formFactory.createAuthorshipDetailElement(parentElement, style);
+       }
+
 }