Merge branch 'develop' into LibrAlign
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / taxon / TaxonBaseDetailSection.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
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.
8 */
9
10 package eu.etaxonomy.taxeditor.ui.section.taxon;
11
12 import org.eclipse.jface.viewers.ISelectionProvider;
13
14 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
15 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
16 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
17 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
18 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
19 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
20
21 /**
22 * @author n.hoffmann
23 * @created Nov 4, 2009
24 * @version 1.0
25 */
26 public class TaxonBaseDetailSection extends AbstractCdmDetailSection<TaxonBase> {
27
28 public TaxonBaseDetailSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
29 super(cdmFormFactory, conversation, parentElement, selectionProvider, style);
30 }
31
32 /** {@inheritDoc} */
33 @Override
34 public String getHeading() {
35 return getEntity() != null ? getEntity().getClass().getSimpleName() : "TaxonBase";
36 }
37
38 @Override
39 protected AbstractCdmDetailElement<TaxonBase> createCdmDetailElement(AbstractCdmDetailSection<TaxonBase> parentElement, int style) {
40 return formFactory.createTaxonBaseDetailElement(parentElement, style);
41 }
42
43 }