2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.taxeditor
.ui
.section
.name
;
11 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
13 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
14 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
15 import eu
.etaxonomy
.cdm
.model
.name
.TaxonName
;
16 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
18 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
19 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
20 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
21 import eu
.etaxonomy
.taxeditor
.ui
.section
.ITaxonBaseDetailSection
;
25 * @created Jan 5, 2011
27 public class HybridDetailSection
28 extends AbstractCdmDetailSection
<TaxonName
>
29 implements ITaxonBaseDetailSection
{
31 private TaxonBase
<?
> taxonBase
;
33 public HybridDetailSection(CdmFormFactory formFactory
,
34 ConversationHolder conversation
, ICdmFormElement parentElement
,
35 ISelectionProvider selectionProvider
, int style
) {
36 super(formFactory
, conversation
, parentElement
, selectionProvider
, style
);
40 public void setTaxonBase(TaxonBase taxon
) {
42 TaxonName name
= HibernateProxyHelper
.deproxy(taxon
.getName());
47 public TaxonBase
getTaxonBase() {
52 public String
getHeading() {
57 protected void setSectionTitle() {
58 setText(getHeading());
62 protected AbstractCdmDetailElement
createCdmDetailElement(
63 AbstractCdmDetailSection
<TaxonName
> parentElement
, int style
) {
65 return formFactory
.createHybridDetailElement(parentElement
);
68 public void updateContent() {
69 ((AbstractCdmDetailElement
)this.detailElement
).setEntity(getEntity());