Project

General

Profile

Download (1.46 KB) Statistics
| Branch: | Tag: | Revision:
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
package eu.etaxonomy.taxeditor.ui.section.taxon;
10

    
11
import org.eclipse.jface.viewers.ISelectionProvider;
12

    
13
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
14
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
15
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
16
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
17
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
18
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
19

    
20
/**
21
 * @author n.hoffmann
22
 * @created Nov 4, 2009
23
 */
24
public class TaxonBaseDetailSection extends AbstractCdmDetailSection<TaxonBase<?>> {
25

    
26
	public TaxonBaseDetailSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
27
		super(cdmFormFactory, conversation, parentElement, selectionProvider, style);
28
	}
29

    
30
	@Override
31
	public String getHeading() {
32
		return getEntity() != null ? getEntity().getClass().getSimpleName() : "Taxon or Synonym";
33
	}
34

    
35
	@Override
36
	protected AbstractCdmDetailElement<TaxonBase<?>> createCdmDetailElement(AbstractCdmDetailSection<TaxonBase<?>> parentElement, int style) {
37
	    return formFactory.createTaxonBaseDetailElement(parentElement, style);
38
	}
39
}
(4-4/10)