1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2013 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.taxeditor.ui.campanula.basicFields;
|
11
|
|
12
|
import org.eclipse.swt.SWT;
|
13
|
import org.eclipse.swt.widgets.Combo;
|
14
|
import org.eclipse.swt.widgets.Composite;
|
15
|
import org.eclipse.swt.widgets.Display;
|
16
|
import org.eclipse.swt.widgets.Text;
|
17
|
import org.eclipse.ui.forms.widgets.FormToolkit;
|
18
|
import org.eclipse.ui.forms.widgets.TableWrapData;
|
19
|
import org.eclipse.ui.forms.widgets.TableWrapLayout;
|
20
|
|
21
|
/**
|
22
|
* @author pplitzner
|
23
|
* @date 15.08.2013
|
24
|
*
|
25
|
*/
|
26
|
public class PointField extends Composite {
|
27
|
private final FormToolkit formToolkit = new FormToolkit(Display.getDefault());
|
28
|
private Text text_latitude;
|
29
|
private Text text_latitudeParsed;
|
30
|
private Text text_longitude;
|
31
|
private Text text_longitudeParsed;
|
32
|
private Text number_errorRadius;
|
33
|
private Combo combo_referenceSystem;
|
34
|
|
35
|
/**
|
36
|
* Create the composite.
|
37
|
* @param parent
|
38
|
* @param style
|
39
|
*/
|
40
|
public PointField(Composite parent, int style) {
|
41
|
super(parent, style);
|
42
|
{
|
43
|
setLayout(new TableWrapLayout());
|
44
|
}
|
45
|
|
46
|
text_latitude = formToolkit.createText(this, "New Text", SWT.NONE);
|
47
|
text_latitude.setText("");
|
48
|
text_latitude.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
|
49
|
|
50
|
text_latitudeParsed = formToolkit.createText(this, "New Text", SWT.NONE);
|
51
|
text_latitudeParsed.setEnabled(false);
|
52
|
text_latitudeParsed.setText("");
|
53
|
text_latitudeParsed.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
|
54
|
|
55
|
text_longitude = formToolkit.createText(this, "New Text", SWT.NONE);
|
56
|
text_longitude.setText("");
|
57
|
text_longitude.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
|
58
|
|
59
|
text_longitudeParsed = formToolkit.createText(this, "New Text", SWT.NONE);
|
60
|
text_longitudeParsed.setEnabled(false);
|
61
|
text_longitudeParsed.setText("");
|
62
|
text_longitudeParsed.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
|
63
|
|
64
|
number_errorRadius = formToolkit.createText(this, "New Text", SWT.NONE);
|
65
|
number_errorRadius.setText("");
|
66
|
number_errorRadius.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
|
67
|
|
68
|
combo_referenceSystem = new Combo(this, SWT.READ_ONLY);
|
69
|
combo_referenceSystem.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
|
70
|
formToolkit.adapt(combo_referenceSystem);
|
71
|
formToolkit.paintBordersFor(combo_referenceSystem);
|
72
|
|
73
|
}
|
74
|
|
75
|
@Override
|
76
|
protected void checkSubclass() {
|
77
|
// Disable the check that prevents subclassing of SWT components
|
78
|
}
|
79
|
|
80
|
public Text getText_latitude() {
|
81
|
return text_latitude;
|
82
|
}
|
83
|
public Text getText_latitudeParsed() {
|
84
|
return text_latitudeParsed;
|
85
|
}
|
86
|
public Text getText_longitude() {
|
87
|
return text_longitude;
|
88
|
}
|
89
|
public Text getText_longitudeParsed() {
|
90
|
return text_longitudeParsed;
|
91
|
}
|
92
|
public Text getNumber_errorRadius() {
|
93
|
return number_errorRadius;
|
94
|
}
|
95
|
public Combo getCombo_referenceSystem() {
|
96
|
return combo_referenceSystem;
|
97
|
}
|
98
|
}
|