2 * Copyright (C) 2019 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.taxeditor
.ui
.section
.name
.type
;
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
;
21 import eu
.etaxonomy
.cdm
.model
.term
.TermType
;
22 import eu
.etaxonomy
.taxeditor
.model
.ImageResources
;
23 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermUuidComboViewer
;
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
;
38 * Create the composite.
42 public CloneTypeWizardComposite(Composite parent
, int style
) {
44 setLayout(new GridLayout(3, false));
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");
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));
54 Label lblNewLabel_2
= new Label(this, SWT
.NONE
);
55 lblNewLabel_2
.setLayoutData(new GridData(SWT
.RIGHT
, SWT
.CENTER
, false, false, 1, 1));
56 lblNewLabel_2
.setText("Collection");
58 txtCollection
= new Text(this, SWT
.BORDER
);
59 txtCollection
.setEnabled(false);
60 txtCollection
.setLayoutData(new GridData(SWT
.FILL
, SWT
.CENTER
, true, false, 1, 1));
62 btnBrowseCollection
= new Button(this, SWT
.NONE
);
63 btnBrowseCollection
.setImage(ImageResources
.getImage(ImageResources
.BROWSE_ICON
));
65 Label lblNewLabel
= new Label(this, SWT
.NONE
);
66 lblNewLabel
.setLayoutData(new GridData(SWT
.RIGHT
, SWT
.CENTER
, false, false, 1, 1));
67 lblNewLabel
.setText("Accession Number");
69 txtAccNumber
= new Text(this, SWT
.BORDER
);
70 txtAccNumber
.setLayoutData(new GridData(SWT
.FILL
, SWT
.CENTER
, true, false, 2, 1));
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");
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
);
83 protected void checkSubclass() {
84 // Disable the check that prevents subclassing of SWT components
87 public Button
getBtnBrowseCollection() {
88 return btnBrowseCollection
;
90 public TermUuidComboViewer
getComboTypeStatus() {
91 return comboTypeStatus
;
93 public Text
getTxtCollection() {
96 public ComboViewer
getComboViewerBaseType() {
97 return comboViewerBaseType
;
99 public Text
getTxtAccNumber() {