merge-update from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / vocabulary / NamedAreaLevelDetailSection.java
1 // $Id$
2 /**
3 * Copyright (C) 2009 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
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.
9 */
10 package eu.etaxonomy.taxeditor.ui.section.vocabulary;
11
12 import org.eclipse.jface.viewers.ISelectionProvider;
13
14 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
15 import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
16 import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
17 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
18 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
19 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
20
21 /**
22 * @author l.morris
23 * @date 4 Jan 2012
24 *
25 */
26 public class NamedAreaLevelDetailSection extends AbstractCdmDetailSection<NamedAreaLevel> {
27
28 /**
29 * @param formFactory
30 * @param parentElement
31 * @param style
32 */
33 public NamedAreaLevelDetailSection(CdmFormFactory formFactory,
34 ConversationHolder conversation, ICdmFormElement parentElement,
35 ISelectionProvider selectionProvider, int style) {
36 super(formFactory, conversation, parentElement, selectionProvider, style);
37 }
38
39 /* (non-Javadoc)
40 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()
41 */
42 @Override
43 public String getHeading() {
44 return "Defined Term: "+ (getEntity() != null ? getEntity().getLabel() : "");
45 }
46
47 /* (non-Javadoc)
48 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
49 */
50 @Override
51 protected AbstractCdmDetailElement<NamedAreaLevel> createCdmDetailElement(AbstractCdmDetailSection<NamedAreaLevel> parentElement, int style) {
52 return formFactory.createNamedAreaLevelElement(parentElement);
53 }
54
55 }