Project

General

Profile

Download (1.52 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.feature;
10

    
11
import org.apache.commons.lang3.StringUtils;
12
import org.eclipse.jface.viewers.ISelectionProvider;
13

    
14
import eu.etaxonomy.cdm.model.term.TermNode;
15
import eu.etaxonomy.cdm.persistence.dto.TermNodeDto;
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 pplitzner
23
 * @since Dec 21, 2017
24
 */
25
public class TermNodeDetailSection extends AbstractCdmDetailSection<TermNodeDto> {
26

    
27
	public TermNodeDetailSection(CdmFormFactory formFactory,
28
	        ICdmFormElement parentElement,
29
			ISelectionProvider selectionProvider, int style) {
30
		super(formFactory, parentElement, selectionProvider, style);
31
	}
32

    
33
	@Override
34
	public String getHeading() {
35
	    String[] r = TermNode.class.getSimpleName().split("(?=\\p{Upper})");
36
        String header = StringUtils.join(r," ");
37
		return header;
38
	}
39

    
40
    @Override
41
    protected AbstractCdmDetailElement<TermNodeDto> createCdmDetailElement(AbstractCdmDetailSection<TermNodeDto> parentElement,
42
            int style) {
43
        return formFactory.createFeatureNodeDetailElement(parentElement, style);
44
    }
45
}
(24-24/28)