// $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.
*/
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
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;
* @version 1.0
*/
public class ReferenceDetailSection extends AbstractCdmDetailSection<Reference> implements ITaxonBaseDetailSection{
-
+
private TaxonBase 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;
NonViralName name = (NonViralName) HibernateProxyHelper.deproxy(entity.getName());
-
+
Reference reference = (Reference) HibernateProxyHelper.deproxy(name.getNomenclaturalReference());
-
+
setEntity(reference);
}
return "Reference";
}
- /** {@inheritDoc} */
- @Override
- protected DetailType getDetailType() {
- return DetailType.REFERENCEBASE;
- }
-
/** {@inheritDoc} */
@Override
public void refresh() {
super.refresh();
- StoreUtil.refreshDetailsViewer();
+ AbstractUtility.refreshDetailsViewer();
}
/* (non-Javadoc)
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<Reference> createCdmDetailElement(AbstractCdmDetailSection<Reference> parentElement, int style) {
+ return formFactory.createReferenceDetailElement(parentElement, style);
+ }
+
}