Project

General

Profile

Download (2.15 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2009 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.vocabulary;
10

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

    
13
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
14
import eu.etaxonomy.cdm.model.term.TermVocabulary;
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 l.morris
22
 * @date 20 Dec 2011
23
 *
24
 */
25
public class TermVocabularyDetailSection extends
26
		AbstractCdmDetailSection<TermVocabulary> {
27

    
28
	/**
29
	 * @param formFactory
30
	 * @param conversation
31
	 * @param parentElement
32
	 * @param selectionProvider
33
	 * @param style
34
	 */
35
	public TermVocabularyDetailSection(CdmFormFactory formFactory,
36
			ConversationHolder conversation, ICdmFormElement parentElement,
37
			ISelectionProvider selectionProvider, int style) {
38
		super(formFactory, conversation, parentElement, selectionProvider, style);
39
		// TODO Auto-generated constructor stub
40
	}
41

    
42
	/* (non-Javadoc)
43
	 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()
44
	 */
45
	@Override
46
	public String getHeading() {
47

    
48
		return "Vocabulary: "+ (getEntity() != null ? getEntity().getLabel() : "");
49
	}
50

    
51
	/* (non-Javadoc)
52
	 * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#setSectionTitle()
53
	 */
54
	@Override
55
	protected void setSectionTitle() {
56
		setText(getHeading());
57
	}
58

    
59
	/* (non-Javadoc)
60
	 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
61
	 */
62
	@Override
63
	protected AbstractCdmDetailElement<TermVocabulary> createCdmDetailElement(AbstractCdmDetailSection<TermVocabulary> parentElement, int style) {
64
	    return formFactory.createTermVocabularyDetailElement(parentElement);
65
	}
66
}
(19-19/19)