2 * Copyright (C) 2018 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
.view
.webimport
.termimport
;
11 import org
.eclipse
.jface
.viewers
.ComboViewer
;
12 import org
.eclipse
.jface
.viewers
.TreeViewer
;
13 import org
.eclipse
.swt
.SWT
;
14 import org
.eclipse
.swt
.layout
.GridData
;
15 import org
.eclipse
.swt
.layout
.GridLayout
;
16 import org
.eclipse
.swt
.widgets
.Button
;
17 import org
.eclipse
.swt
.widgets
.Combo
;
18 import org
.eclipse
.swt
.widgets
.Composite
;
19 import org
.eclipse
.swt
.widgets
.Label
;
20 import org
.eclipse
.swt
.widgets
.Text
;
21 import org
.eclipse
.swt
.widgets
.Tree
;
23 import eu
.etaxonomy
.taxeditor
.model
.ImageResources
;
30 public class GfBioTerminologyImportComposite
extends Composite
{
31 private TreeViewer treeTermHierarchy
;
32 private Text txtSearch
;
33 private Button btnSearch
;
34 private Composite composite
;
35 private Button btnRemoveTerminology
;
36 private ComboViewer comboTerminologies
;
37 private Composite composite_1
;
38 private Composite composite_2
;
39 private Label lblNewLabel
;
40 private Label lblNewLabel_1
;
41 private Label lblNewLabel_2
;
42 private Text txtLabel
;
44 private Text txtDescription
;
46 public GfBioTerminologyImportComposite(Composite parent
, int style
) {
48 setLayout(new GridLayout(1, false));
50 composite
= new Composite(this, SWT
.NONE
);
51 composite
.setLayoutData(new GridData(SWT
.FILL
, SWT
.FILL
, true, false, 1, 1));
52 composite
.setLayout(new GridLayout(4, false));
54 txtSearch
= new Text(composite
, SWT
.BORDER
);
55 txtSearch
.setLayoutData(new GridData(SWT
.FILL
, SWT
.CENTER
, true, false, 1, 1));
57 comboTerminologies
= new ComboViewer(composite
, SWT
.NONE
);
58 Combo combo
= comboTerminologies
.getCombo();
59 combo
.setLayoutData(new GridData(SWT
.FILL
, SWT
.CENTER
, true, false, 1, 1));
61 btnRemoveTerminology
= new Button(composite
, SWT
.NONE
);
62 btnRemoveTerminology
.setImage(ImageResources
.getImage(ImageResources
.TRASH_ICON
));
64 btnSearch
= new Button(composite
, SWT
.NONE
);
65 btnSearch
.setText("Search");
67 composite_2
= new Composite(this, SWT
.NONE
);
68 composite_2
.setLayout(new GridLayout(2, false));
69 composite_2
.setLayoutData(new GridData(SWT
.FILL
, SWT
.FILL
, true, true, 1, 1));
71 treeTermHierarchy
= new TreeViewer(composite_2
, SWT
.BORDER
);
72 Tree tree
= treeTermHierarchy
.getTree();
73 tree
.setLayoutData(new GridData(SWT
.FILL
, SWT
.FILL
, true, true, 1, 1));
75 composite_1
= new Composite(composite_2
, SWT
.NONE
);
76 composite_1
.setLayoutData(new GridData(SWT
.FILL
, SWT
.FILL
, true, true, 1, 1));
77 composite_1
.setLayout(new GridLayout(2, false));
79 lblNewLabel
= new Label(composite_1
, SWT
.NONE
);
80 lblNewLabel
.setLayoutData(new GridData(SWT
.RIGHT
, SWT
.CENTER
, false, false, 1, 1));
81 lblNewLabel
.setText("Label");
83 txtLabel
= new Text(composite_1
, SWT
.NONE
);
84 txtLabel
.setLayoutData(new GridData(SWT
.FILL
, SWT
.CENTER
, true, false, 1, 1));
86 lblNewLabel_1
= new Label(composite_1
, SWT
.NONE
);
87 lblNewLabel_1
.setLayoutData(new GridData(SWT
.RIGHT
, SWT
.CENTER
, false, false, 1, 1));
88 lblNewLabel_1
.setText("URI");
90 txtUri
= new Text(composite_1
, SWT
.NONE
);
91 txtUri
.setLayoutData(new GridData(SWT
.FILL
, SWT
.CENTER
, true, false, 1, 1));
93 lblNewLabel_2
= new Label(composite_1
, SWT
.NONE
);
94 lblNewLabel_2
.setLayoutData(new GridData(SWT
.RIGHT
, SWT
.CENTER
, false, false, 1, 1));
95 lblNewLabel_2
.setText("Description");
97 txtDescription
= new Text(composite_1
, SWT
.NONE
);
98 txtDescription
.setLayoutData(new GridData(SWT
.FILL
, SWT
.CENTER
, true, false, 1, 1));
100 public TreeViewer
getTreeTermHierarchy() {
101 return treeTermHierarchy
;
103 public Button
getBtnSearch() {
106 public Text
getTxtSearch() {
109 public Button
getBtnRemoveTerminology() {
110 return btnRemoveTerminology
;
112 public ComboViewer
getComboTerminologies() {
113 return comboTerminologies
;
115 public Text
getLblDescription() {
116 return txtDescription
;
118 public Text
getLblUri() {
121 public Text
getLblLabel() {