c8242850facfffeac967494cbf1daec615d4d100
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / vocabulary / NamedAreaDetailSection.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.NamedArea;
16 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
17 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
18 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
19 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
20
21 /**
22 * @author l.morris
23 * @date 20 Dec 2011
24 *
25 */
26 public class NamedAreaDetailSection extends AbstractCdmDetailSection<NamedArea> {
27
28 /**
29 * @param formFactory
30 * @param conversation
31 * @param parentElement
32 * @param selectionProvider
33 * @param style
34 */
35 public NamedAreaDetailSection(CdmFormFactory formFactory,
36 ConversationHolder conversation, ICdmFormElement parentElement,
37 ISelectionProvider selectionProvider, int style) {
38 super(formFactory, conversation, parentElement, selectionProvider, style);
39
40 }
41
42 /* (non-Javadoc)
43 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getDetailType()
44 */
45 @Override
46 protected DetailType getDetailType() {
47
48 return DetailType.NAMED_AREA;
49 }
50
51 /* (non-Javadoc)
52 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()
53 */
54 @Override
55 public String getHeading() {
56
57 return "Defined Term: "+ (getEntity() != null ? getEntity().getLabel() : "");
58 }
59
60 }