Project

General

Profile

Download (2.31 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.reference;
10

    
11
import org.eclipse.jface.viewers.ISelectionProvider;
12
import org.eclipse.ui.forms.widgets.TableWrapLayout;
13

    
14
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
15
import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
16
import eu.etaxonomy.taxeditor.l10n.Messages;
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
 * @author k.luther
24
 * @since Jul 1, 2020
25
 */
26
public class OriginalSourceAdvancedSection extends AbstractCdmDetailSection<ReferencedEntityBase > {
27

    
28
    /**
29
     * @param formFactory
30
     * @param conversation
31
     * @param parentElement
32
     * @param selectionProvider
33
     * @param style
34
     */
35
    public OriginalSourceAdvancedSection(CdmFormFactory formFactory, ConversationHolder conversation,
36
            ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
37
        super(formFactory, conversation, parentElement, selectionProvider, style);
38

    
39

    
40
    }
41

    
42
    @Override
43
    protected AbstractCdmDetailElement<ReferencedEntityBase > createCdmDetailElement(
44
            AbstractCdmDetailSection<ReferencedEntityBase > parentElement, int style) {
45

    
46
        return new AdvancedSourceElement(getFormFactory(), parentElement);
47
    }
48

    
49
    @Override
50
    public String getHeading() {
51

    
52
        return Messages.OriginalSourceAdvancedSection_advanced;
53
    }
54
    @Override
55
    protected void createControlsByType(AbstractCdmDetailSection<ReferencedEntityBase> formElement, Class<ReferencedEntityBase> entityClass, int style) {
56
        super.createControlsByType(formElement, entityClass, style);
57
        int i = this.getTextClientHeightDifference();
58

    
59
        TableWrapLayout layout = new TableWrapLayout();
60
        layout.topMargin = 0;
61
        layout.bottomMargin = 0;
62
        layout.numColumns = DEFAULT_NUM_COLUMNS;
63
        getLayoutComposite().setLayout(layout);
64
//        setLayout(layout);
65

    
66
    }
67

    
68
}
(4-4/10)