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
.taxon
;
11 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
13 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
14 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
15 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
16 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
17 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
18 import eu
.etaxonomy
.taxeditor
.ui
.section
.ITaxonBaseDetailSection
;
22 * @created Nov 4, 2009
24 public class TaxonBaseDetailSection
extends AbstractCdmDetailSection
<TaxonBase
<?
>> implements ITaxonBaseDetailSection
{
26 public TaxonBaseDetailSection(CdmFormFactory cdmFormFactory
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
27 super(cdmFormFactory
, parentElement
, selectionProvider
, style
);
31 public String
getHeading() {
32 return getEntity() != null ?
getEntity().getClass().getSimpleName() : "Taxon or Synonym";
36 protected AbstractCdmDetailElement
<TaxonBase
<?
>> createCdmDetailElement(AbstractCdmDetailSection
<TaxonBase
<?
>> parentElement
, int style
) {
37 return formFactory
.createTaxonBaseDetailElement(parentElement
, style
);
41 public void setTaxonBase(TaxonBase
<?
> taxon
) {
42 this.setEntity(taxon
);
47 public void setTaxonBaseWithoutUpdate(TaxonBase
<?
> taxon
) {
48 setEntityWithoutUpdate(taxon
);
53 public TaxonBase
<?
> getTaxonBase() {