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.READ_ONLY);
|
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.setEnabled(false);
|
67
|
txtCollection.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
|
68
|
|
69
|
btnBrowseCollection = new Button(this, SWT.NONE);
|
70
|
btnBrowseCollection.setImage(ImageResources.getImage(ImageResources.BROWSE_ICON));
|
71
|
|
72
|
Label lblNewLabel_1 = new Label(this, SWT.NONE);
|
73
|
lblNewLabel_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
|
74
|
lblNewLabel_1.setText("Type Status");
|
75
|
|
76
|
comboTypeStatus = new TermUuidComboViewer(this, SWT.NONE);
|
77
|
comboTypeStatus.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
|
78
|
comboTypeStatus.setInput(TermType.SpecimenTypeDesignationStatus);
|
79
|
|
80
|
}
|
81
|
|
82
|
@Override
|
83
|
protected void checkSubclass() {
|
84
|
// Disable the check that prevents subclassing of SWT components
|
85
|
}
|
86
|
|
87
|
public Button getBtnBrowseCollection() {
|
88
|
return btnBrowseCollection;
|
89
|
}
|
90
|
public TermUuidComboViewer getComboTypeStatus() {
|
91
|
return comboTypeStatus;
|
92
|
}
|
93
|
public Text getTxtCollection() {
|
94
|
return txtCollection;
|
95
|
}
|
96
|
public ComboViewer getComboViewerBaseType() {
|
97
|
return comboViewerBaseType;
|
98
|
}
|
99
|
public Text getTxtAccNumber() {
|
100
|
return txtAccNumber;
|
101
|
}
|
102
|
}
|