3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
;
13 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
15 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
16 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
17 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
18 import eu
.etaxonomy
.taxeditor
.ui
.campanula
.compatibility
.ICdmFormElement
;
19 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
20 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
21 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
22 import eu
.etaxonomy
.taxeditor
.ui
.section
.ITaxonBaseDetailSection
;
25 * <p>TaxonBaseDetailSection class.</p>
28 * @created Nov 4, 2009
31 public class TaxonBaseDetailSection
extends AbstractCdmDetailSection
<TaxonBase
> implements ITaxonBaseDetailSection
{
33 private TaxonBase taxonBase
;
36 * <p>Constructor for TaxonBaseDetailSection.</p>
38 * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
40 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
41 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
42 * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
44 public TaxonBaseDetailSection(CdmFormFactory cdmFormFactory
, ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
45 super(cdmFormFactory
, conversation
, parentElement
, selectionProvider
, style
);
50 * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#setTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
54 public void setTaxonBase(TaxonBase entity
) {
55 this.taxonBase
= entity
;
56 TaxonBase taxonBase
= (TaxonBase
) HibernateProxyHelper
.deproxy(entity
);
62 public String
getHeading() {
63 return getEntity() != null ?
getEntity().getClass().getSimpleName() : "TaxonBase";
67 * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#getTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
70 public TaxonBase
getTaxonBase() {
75 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
78 protected AbstractCdmDetailElement
<TaxonBase
> createCdmDetailElement(AbstractCdmDetailSection
<TaxonBase
> parentElement
, int style
) {
79 return formFactory
.createTaxonBaseDetailElement(parentElement
, style
);