Project

General

Profile

Download (1.8 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2020 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.supplemental;
10

    
11
import org.eclipse.swt.events.SelectionListener;
12

    
13
import eu.etaxonomy.cdm.model.common.SingleSourcedEntityBase;
14
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
15
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
16
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
17
import eu.etaxonomy.taxeditor.ui.element.ISelectableElement;
18
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
19
import eu.etaxonomy.taxeditor.ui.section.reference.OriginalSourceElement;
20

    
21
/**
22
 * @author k.luther
23
 * @since Aug 18, 2020
24
 */
25
public abstract class AbstractSingleSourceElement <T extends SingleSourcedEntityBase>
26
            extends AbstractEntityCollectionElement<T> implements ISelectableElement{
27

    
28
    private OriginalSourceElement singleSourceSection;
29

    
30
    /**
31
     * @param formFactory
32
     * @param section
33
     * @param entity
34
     * @param removeListener
35
     * @param backgroundColor
36
     * @param style
37
     */
38
    public AbstractSingleSourceElement(CdmFormFactory formFactory, AbstractFormSection formElement, T entity, SelectionListener removeListener,
39
            int style) {
40
        super(formFactory,formElement, entity, removeListener, null, style);
41
        // TODO Auto-generated constructor stub
42
    }
43

    
44

    
45

    
46
    @Override
47
    public void setEntity(T entity) {
48
        this.entity = entity;
49

    
50
    }
51

    
52
    @Override
53
    public void createControls(ICdmFormElement formElement, int style) {
54
        singleSourceSection = formFactory.createOriginalSourceElement(formElement, entity);
55
    }
56

    
57

    
58
}
(3-3/21)