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
.reference
;
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
.name
.NonViralName
;
18 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
19 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
20 import eu
.etaxonomy
.taxeditor
.store
.StoreUtil
;
21 import eu
.etaxonomy
.taxeditor
.ui
.campanula
.compatibility
.ICdmFormElement
;
22 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
23 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
24 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
25 import eu
.etaxonomy
.taxeditor
.ui
.section
.ITaxonBaseDetailSection
;
28 * <p>ReferenceBaseDetailSection class.</p>
34 public class ReferenceDetailSection
extends AbstractCdmDetailSection
<Reference
> implements ITaxonBaseDetailSection
{
36 private TaxonBase taxonBase
;
39 * <p>Constructor for ReferenceBaseDetailSection.</p>
41 * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
43 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
44 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
45 * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
47 public ReferenceDetailSection(CdmFormFactory cdmFormFactory
, ConversationHolder conversation
, ICdmFormElement parentElement
,
48 ISelectionProvider selectionProvider
, int style
) {
49 super(cdmFormFactory
, conversation
, parentElement
, selectionProvider
, style
);
54 * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#setTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
58 public void setTaxonBase(TaxonBase entity
) {
59 this.taxonBase
= entity
;
60 NonViralName name
= (NonViralName
) HibernateProxyHelper
.deproxy(entity
.getName());
62 Reference reference
= (Reference
) HibernateProxyHelper
.deproxy(name
.getNomenclaturalReference());
69 * @see eu.etaxonomy.taxeditor.forms.section.cdmdetail.AbstractCdmDetailSection#getHeading()
73 public String
getHeading() {
79 public void refresh() {
81 StoreUtil
.refreshDetailsViewer();
85 * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#getTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
88 public TaxonBase
getTaxonBase() {
93 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
96 protected AbstractCdmDetailElement
<Reference
> createCdmDetailElement(AbstractCdmDetailSection
<Reference
> parentElement
, int style
) {
97 return formFactory
.createReferenceDetailElement(parentElement
, style
);