Merge branch 'release/5.0.0' into develop
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / view / webimport / termimport / GfBioTerminologyImportComposite.java
1 /**
2 * Copyright (C) 2018 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.view.webimport.termimport;
10
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;
22
23 import eu.etaxonomy.taxeditor.model.ImageResources;
24
25 /**
26 * @author pplitzner
27 * @since Apr 23, 2018
28 *
29 */
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;
43 private Text txtUri;
44 private Text txtDescription;
45
46 public GfBioTerminologyImportComposite(Composite parent, int style) {
47 super(parent, style);
48 setLayout(new GridLayout(1, false));
49
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));
53
54 txtSearch = new Text(composite, SWT.BORDER);
55 txtSearch.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
56
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));
60
61 btnRemoveTerminology = new Button(composite, SWT.NONE);
62 btnRemoveTerminology.setImage(ImageResources.getImage(ImageResources.TRASH_ICON));
63
64 btnSearch = new Button(composite, SWT.NONE);
65 btnSearch.setText("Search");
66
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));
70
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));
74
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));
78
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");
82
83 txtLabel = new Text(composite_1, SWT.NONE);
84 txtLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
85
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");
89
90 txtUri = new Text(composite_1, SWT.NONE);
91 txtUri.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
92
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");
96
97 txtDescription = new Text(composite_1, SWT.NONE);
98 txtDescription.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
99 }
100 public TreeViewer getTreeTermHierarchy() {
101 return treeTermHierarchy;
102 }
103 public Button getBtnSearch() {
104 return btnSearch;
105 }
106 public Text getTxtSearch() {
107 return txtSearch;
108 }
109 public Button getBtnRemoveTerminology() {
110 return btnRemoveTerminology;
111 }
112 public ComboViewer getComboTerminologies() {
113 return comboTerminologies;
114 }
115 public Text getLblDescription() {
116 return txtDescription;
117 }
118 public Text getLblUri() {
119 return txtUri;
120 }
121 public Text getLblLabel() {
122 return txtLabel;
123 }
124 }