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 eu.etaxonomy.cdm.model.term.FeatureNode;
|
12
|
import eu.etaxonomy.taxeditor.store.StoreUtil;
|
13
|
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
14
|
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
|
15
|
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
|
16
|
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
|
17
|
|
18
|
/**
|
19
|
*
|
20
|
* @author pplitzner
|
21
|
* @since Dec 21, 2017
|
22
|
*
|
23
|
*/
|
24
|
public class FeatureNodeDetailElement extends AbstractCdmDetailElement<FeatureNode> {
|
25
|
|
26
|
private InapplicableIfEntityCollectionSection sectionInapplicableIf;
|
27
|
private OnlyApplicableIfEntityCollectionSection sectionOnlyApplicableIf;
|
28
|
|
29
|
public FeatureNodeDetailElement(CdmFormFactory formFactory,
|
30
|
ICdmFormElement formElement) {
|
31
|
super(formFactory, formElement);
|
32
|
}
|
33
|
|
34
|
@Override
|
35
|
protected void createControls(ICdmFormElement formElement, FeatureNode entity, int style) {
|
36
|
sectionInapplicableIf = formFactory.createInapplicableIfEntityCollectionSection(getConversationHolder(),
|
37
|
formElement, StoreUtil.getSectionStyle(InapplicableIfEntityCollectionSection.class, getEntity().getClass().getCanonicalName()));
|
38
|
sectionInapplicableIf.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
|
39
|
sectionInapplicableIf.setEntity(getEntity());
|
40
|
sectionOnlyApplicableIf = formFactory.createOnlyApplicableIfEntityCollectionSection(getConversationHolder(),
|
41
|
formElement, StoreUtil.getSectionStyle(OnlyApplicableIfEntityCollectionSection.class, getEntity().getClass().getCanonicalName()));
|
42
|
sectionOnlyApplicableIf.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
|
43
|
sectionOnlyApplicableIf.setEntity(getEntity());
|
44
|
}
|
45
|
|
46
|
@Override
|
47
|
public void handleEvent(Object eventSource) {
|
48
|
}
|
49
|
|
50
|
}
|