Project

General

Profile

Download (2.16 KB) Statistics
| Branch: | Tag: | Revision:
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.element.CdmFormFactory;
17
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
18
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
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#getHeading()
45
	 */
46
	@Override
47
	public String getHeading() {
48

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

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

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