Project

General

Profile

Download (2.18 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.description.DescriptionElementSource;
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<DescriptionElementSource> {
27

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

    
33
    @Override
34
    protected AbstractCdmDetailElement<DescriptionElementSource> createCdmDetailElement(
35
            AbstractCdmDetailSection<DescriptionElementSource> parentElement, int style) {
36

    
37
        return new AdvancedSourceElement(getFormFactory(), parentElement);
38
    }
39

    
40
    @Override
41
    public String getHeading() {
42

    
43
        return Messages.OriginalSourceAdvancedSection_advanced;
44
    }
45
    @Override
46
    protected void createControlsByType(AbstractCdmDetailSection<DescriptionElementSource> formElement, Class<DescriptionElementSource> entityClass, int style) {
47
        super.createControlsByType(formElement, entityClass, style);
48
        int i = this.getTextClientHeightDifference();
49

    
50
        TableWrapLayout layout = new TableWrapLayout();
51
        layout.topMargin = 0;
52
        layout.bottomMargin = 0;
53
        layout.numColumns = DEFAULT_NUM_COLUMNS;
54
        getLayoutComposite().setLayout(layout);
55
//        setLayout(layout);
56
    }
57
}
(4-4/10)