Committing changes to definedtermeditor after merge from branch
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / vocabulary / TermVocabularyDetailSection.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.common.TermVocabulary;
16 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
17 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
18 import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
19 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
20
21 /**
22 * @author l.morris
23 * @date 20 Dec 2011
24 *
25 */
26 public class TermVocabularyDetailSection extends
27 AbstractCdmDetailSection<TermVocabulary> {
28
29 /**
30 * @param formFactory
31 * @param conversation
32 * @param parentElement
33 * @param selectionProvider
34 * @param style
35 */
36 public TermVocabularyDetailSection(CdmFormFactory formFactory,
37 ConversationHolder conversation, ICdmFormElement parentElement,
38 ISelectionProvider selectionProvider, int style) {
39 super(formFactory, conversation, parentElement, selectionProvider, style);
40 // TODO Auto-generated constructor stub
41 }
42
43 /* (non-Javadoc)
44 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getDetailType()
45 */
46 @Override
47 protected DetailType getDetailType() {
48
49 return DetailType.TERM_VOCABULARY;
50 }
51
52 /* (non-Javadoc)
53 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()
54 */
55 @Override
56 public String getHeading() {
57
58 return "Vocabulary: "+ (getEntity() != null ? getEntity().getLabel() : "");
59 }
60
61 /* (non-Javadoc)
62 * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#setSectionTitle()
63 */
64 @Override
65 protected void setSectionTitle() {
66 setText(getHeading());
67 }
68 }