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.api.conversation.ConversationHolder;
|
15
|
import eu.etaxonomy.cdm.model.term.TermNode;
|
16
|
import eu.etaxonomy.cdm.persistence.dto.TermNodeDto;
|
17
|
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
18
|
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
|
19
|
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
|
20
|
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
|
21
|
|
22
|
/**
|
23
|
*
|
24
|
* @author pplitzner
|
25
|
* @since Dec 21, 2017
|
26
|
*
|
27
|
*/
|
28
|
public class TermNodeDetailSection extends AbstractCdmDetailSection<TermNodeDto> {
|
29
|
|
30
|
public TermNodeDetailSection(CdmFormFactory formFactory,
|
31
|
ConversationHolder conversation, ICdmFormElement parentElement,
|
32
|
ISelectionProvider selectionProvider, int style) {
|
33
|
super(formFactory, conversation, parentElement, selectionProvider, style);
|
34
|
}
|
35
|
|
36
|
@Override
|
37
|
public String getHeading() {
|
38
|
String[] r = TermNode.class.getSimpleName().split("(?=\\p{Upper})");
|
39
|
String header = StringUtils.join(r," ");
|
40
|
return header;
|
41
|
}
|
42
|
|
43
|
/**
|
44
|
* {@inheritDoc}
|
45
|
*/
|
46
|
@Override
|
47
|
protected AbstractCdmDetailElement<TermNodeDto> createCdmDetailElement(AbstractCdmDetailSection<TermNodeDto> parentElement,
|
48
|
int style) {
|
49
|
return formFactory.createFeatureNodeDetailElement(parentElement, style);
|
50
|
}
|
51
|
|
52
|
}
|