Project

General

Profile

Download (2.55 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.DefinedTermBase;
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 4 Jan 2012
24
 *
25
 */
26
public class DefinedTermDetailSection<T extends DefinedTermBase> extends AbstractCdmDetailSection<T> {
27

    
28
	/**
29
	 * @param formFactory
30
	 * @param definedTermClass
31
	 * @param conversation
32
	 * @param parentElement
33
	 * @param selectionProvider
34
	 * @param style
35
	 */
36
	public DefinedTermDetailSection(CdmFormFactory formFactory,
37
			Class<T> definedTermClass, ConversationHolder conversation, ICdmFormElement parentElement,
38
			ISelectionProvider selectionProvider, int style) {
39
		super(formFactory, definedTermClass, conversation, parentElement, selectionProvider, style);
40
	}
41

    
42
	/* (non-Javadoc)
43
	 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()
44
	 */
45
	@Override
46
	public String getHeading() {
47
		/*String result = null;
48
		result = getEntity() != null ? getEntity().getLabel() : "";
49
		if (result == null){
50
			result = getEntity().getTitleCache();
51
		} */
52
		
53
		return "Defined Term ";//+ result;
54
	}
55

    
56
	//FIXME clean up create element methods
57
	/* (non-Javadoc)
58
	 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElementByType(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, java.lang.Class, int)
59
	 */
60
	@Override
61
	protected AbstractCdmDetailElement createCdmDetailElementByType(AbstractCdmDetailSection<T> parentElement, Class<T> entityClass, int style) {
62
	    return formFactory.createDefinedTermDetailElement(entityClass, parentElement, style);
63
	}
64

    
65
	/* (non-Javadoc)
66
	 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
67
	 */
68
	@Override
69
	protected AbstractCdmDetailElement<T> createCdmDetailElement(AbstractCdmDetailSection<T> parentElement, int style) {
70
	    return null;
71
	}
72

    
73
}
(3-3/18)