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.
10 package eu
.etaxonomy
.taxeditor
.ui
.section
.reference
;
12 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
14 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
15 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
16 import eu
.etaxonomy
.cdm
.model
.name
.TaxonName
;
17 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
18 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
19 import eu
.etaxonomy
.taxeditor
.model
.AbstractUtility
;
20 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
21 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
22 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
23 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
24 import eu
.etaxonomy
.taxeditor
.ui
.section
.ITaxonBaseDetailSection
;
27 * <p>ReferenceBaseDetailSection class.</p>
33 public class ReferenceDetailSection
extends AbstractCdmDetailSection
<Reference
> implements ITaxonBaseDetailSection
{
35 private TaxonBase taxonBase
;
38 * <p>Constructor for ReferenceBaseDetailSection.</p>
40 * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
42 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
43 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
44 * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
46 public ReferenceDetailSection(CdmFormFactory cdmFormFactory
, ConversationHolder conversation
, ICdmFormElement parentElement
,
47 ISelectionProvider selectionProvider
, int style
) {
48 super(cdmFormFactory
, conversation
, parentElement
, selectionProvider
, style
);
53 public void setTaxonBase(TaxonBase entity
) {
54 this.taxonBase
= entity
;
55 TaxonName name
= HibernateProxyHelper
.deproxy(entity
.getName());
57 Reference reference
= (Reference
) HibernateProxyHelper
.deproxy(name
.getNomenclaturalReference());
64 public String
getHeading() {
70 public void refresh() {
72 AbstractUtility
.refreshDetailsViewer();
76 public TaxonBase
getTaxonBase() {
81 protected AbstractCdmDetailElement
<Reference
> createCdmDetailElement(AbstractCdmDetailSection
<Reference
> parentElement
, int style
) {
82 return formFactory
.createReferenceDetailElement(parentElement
, style
, false);