Project

General

Profile

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

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

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

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

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

    
72
}
(3-3/19)