- completely removed DetailType enum and all its uses
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / taxon / TaxonBaseDetailSection.java
index 8ba2e34493164cfece42ac545f70b434259a599c..e0a5d92eb6cfed6cc58c454d04f405c70ccd7cc7 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.
 */
@@ -17,7 +17,7 @@ import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 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;
 
@@ -50,9 +50,10 @@ public class TaxonBaseDetailSection extends AbstractCdmDetailSection<TaxonBase>
         * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#setTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
         */
        /** {@inheritDoc} */
-       public void setTaxonBase(TaxonBase entity) {
+       @Override
+    public void setTaxonBase(TaxonBase entity) {
                this.taxonBase = entity;
-               TaxonBase taxonBase = (TaxonBase) HibernateProxyHelper.deproxy(entity); 
+               TaxonBase taxonBase = (TaxonBase) HibernateProxyHelper.deproxy(entity);
                setEntity(taxonBase);
        }
 
@@ -62,12 +63,6 @@ public class TaxonBaseDetailSection extends AbstractCdmDetailSection<TaxonBase>
                return getEntity() != null ? getEntity().getClass().getSimpleName() : "TaxonBase";
        }
 
-       /** {@inheritDoc} */
-       @Override
-       protected DetailType getDetailType() {
-               return DetailType.TAXONBASE;
-       }
-       
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#getTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
         */
@@ -76,4 +71,12 @@ public class TaxonBaseDetailSection extends AbstractCdmDetailSection<TaxonBase>
                return taxonBase;
        }
 
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
+        */
+       @Override
+       protected AbstractCdmDetailElement<TaxonBase> createCdmDetailElement(AbstractCdmDetailSection<TaxonBase> parentElement, int style) {
+           return formFactory.createTaxonBaseDetailElement(parentElement, style);
+       }
+
 }