Project

General

Profile

Download (4.44 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.term.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
    private Text textBarcode;
37
    private Text textCatalogNumber;
38

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

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

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

    
56
        Label lblNewLabel_2 = new Label(this, SWT.NONE);
57
        lblNewLabel_2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
58
        lblNewLabel_2.setText("Collection");
59

    
60
        txtCollection = new Text(this, SWT.BORDER);
61
        txtCollection.setEnabled(false);
62
        txtCollection.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
63

    
64
        btnBrowseCollection = new Button(this, SWT.NONE);
65
        btnBrowseCollection.setImage(ImageResources.getImage(ImageResources.BROWSE_ICON));
66

    
67
        Label lblNewLabel = new Label(this, SWT.NONE);
68
        lblNewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
69
        lblNewLabel.setText("Accession Number");
70

    
71
        txtAccNumber = new Text(this, SWT.BORDER);
72
        txtAccNumber.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
73

    
74
        Label lblNewLabel_4 = new Label(this, SWT.NONE);
75
        lblNewLabel_4.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
76
        lblNewLabel_4.setText("Barcode");
77

    
78
        textBarcode = new Text(this, SWT.BORDER);
79
        textBarcode.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
80

    
81
        Label lblNewLabel_5 = new Label(this, SWT.NONE);
82
        lblNewLabel_5.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
83
        lblNewLabel_5.setText("Catalog Number");
84

    
85
        textCatalogNumber = new Text(this, SWT.BORDER);
86
        textCatalogNumber.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
87

    
88
        Label lblNewLabel_1 = new Label(this, SWT.NONE);
89
        lblNewLabel_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
90
        lblNewLabel_1.setText("Type Status");
91

    
92
        comboTypeStatus = new TermUuidComboViewer(this, SWT.NONE);
93
        comboTypeStatus.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
94
        comboTypeStatus.setInput(TermType.SpecimenTypeDesignationStatus);
95

    
96
    }
97

    
98
    @Override
99
    protected void checkSubclass() {
100
        // Disable the check that prevents subclassing of SWT components
101
    }
102

    
103
    public Button getBtnBrowseCollection() {
104
        return btnBrowseCollection;
105
    }
106
    public TermUuidComboViewer getComboTypeStatus() {
107
        return comboTypeStatus;
108
    }
109
    public Text getTxtCollection() {
110
        return txtCollection;
111
    }
112
    public ComboViewer getComboViewerBaseType() {
113
        return comboViewerBaseType;
114
    }
115
    public Text getTxtAccNumber() {
116
        return txtAccNumber;
117
    }
118
    public Text getTextBarcode() {
119
        return textBarcode;
120
    }
121
    public Text getTextCatalogNumber() {
122
        return textCatalogNumber;
123
    }
124
}
(2-2/3)