Project

General

Profile

Download (3.5 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2019 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.name.type;
10

    
11
import org.eclipse.jface.viewers.ComboViewer;
12
import org.eclipse.swt.SWT;
13
import org.eclipse.swt.layout.GridData;
14
import org.eclipse.swt.layout.GridLayout;
15
import org.eclipse.swt.widgets.Button;
16
import org.eclipse.swt.widgets.Combo;
17
import org.eclipse.swt.widgets.Composite;
18
import org.eclipse.swt.widgets.Label;
19
import org.eclipse.swt.widgets.Text;
20

    
21
import eu.etaxonomy.cdm.model.term.TermType;
22
import eu.etaxonomy.taxeditor.model.ImageResources;
23
import eu.etaxonomy.taxeditor.ui.combo.TermUuidComboViewer;
24

    
25
/**
26
 * @author pplitzner
27
 * @since Mar 13, 2019
28
 *
29
 */
30
public class CloneTypeWizardComposite extends Composite {
31
    private Text txtAccNumber;
32
    private Text txtCollection;
33
    private Button btnBrowseCollection;
34
    private TermUuidComboViewer comboTypeStatus;
35
    private ComboViewer comboViewerBaseType;
36

    
37
    /**
38
     * Create the composite.
39
     * @param parent
40
     * @param style
41
     */
42
    public CloneTypeWizardComposite(Composite parent, int style) {
43
        super(parent, style);
44
        setLayout(new GridLayout(3, false));
45

    
46
        Label lblNewLabel_3 = new Label(this, SWT.NONE);
47
        lblNewLabel_3.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
48
        lblNewLabel_3.setText("Base Type");
49

    
50
        comboViewerBaseType = new ComboViewer(this, SWT.NONE);
51
        Combo combo = comboViewerBaseType.getCombo();
52
        combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
53

    
54
        Label lblNewLabel = new Label(this, SWT.NONE);
55
        lblNewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
56
        lblNewLabel.setText("Accession Number");
57

    
58
        txtAccNumber = new Text(this, SWT.BORDER);
59
        txtAccNumber.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
60

    
61
        Label lblNewLabel_2 = new Label(this, SWT.NONE);
62
        lblNewLabel_2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
63
        lblNewLabel_2.setText("Collection");
64

    
65
        txtCollection = new Text(this, SWT.BORDER);
66
        txtCollection.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
67

    
68
        btnBrowseCollection = new Button(this, SWT.NONE);
69
        btnBrowseCollection.setImage(ImageResources.getImage(ImageResources.BROWSE_ICON));
70

    
71
        Label lblNewLabel_1 = new Label(this, SWT.NONE);
72
        lblNewLabel_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
73
        lblNewLabel_1.setText("Type Status");
74

    
75
        comboTypeStatus = new TermUuidComboViewer(this, SWT.NONE);
76
        comboTypeStatus.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
77
        comboTypeStatus.setInput(TermType.SpecimenTypeDesignationStatus);
78

    
79
    }
80

    
81
    @Override
82
    protected void checkSubclass() {
83
        // Disable the check that prevents subclassing of SWT components
84
    }
85

    
86
    public Button getBtnBrowseCollection() {
87
        return btnBrowseCollection;
88
    }
89
    public TermUuidComboViewer getComboTypeStatus() {
90
        return comboTypeStatus;
91
    }
92
    public Text getTxtCollection() {
93
        return txtCollection;
94
    }
95
    public ComboViewer getComboViewerBaseType() {
96
        return comboViewerBaseType;
97
    }
98
    public Text getTxtAccNumber() {
99
        return txtAccNumber;
100
    }
101
}
(2-2/3)