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
.forms
.CdmFormFactory
;
19 import eu
.etaxonomy
.taxeditor
.ui
.forms
.CdmFormFactory
.DetailType
;
20 import eu
.etaxonomy
.taxeditor
.ui
.forms
.ICdmFormElement
;
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.forms.ICdmFormElement} object.
40 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.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)
53 public void setTaxonBase(TaxonBase entity
) {
54 this.taxonBase
= entity
;
55 TaxonBase taxonBase
= (TaxonBase
) HibernateProxyHelper
.deproxy(entity
);
61 public String
getHeading() {
62 return getEntity() != null ?
getEntity().getClass().getSimpleName() : "TaxonBase";
67 protected DetailType
getDetailType() {
68 return DetailType
.TAXONBASE
;
72 * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#getTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
75 public TaxonBase
getTaxonBase() {