Revision e87aebf1
Added by Patrick Plitzner over 10 years ago
- converted Point element (used for coordinates)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/FieldObservationGeneralElement.java | ||
---|---|---|
1 | 1 |
// $Id$ |
2 | 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 |
*/ |
|
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 | 10 |
package eu.etaxonomy.taxeditor.ui.campanula; |
11 | 11 |
|
12 | 12 |
import org.eclipse.swt.SWT; |
... | ... | |
27 | 27 |
public class FieldObservationGeneralElement extends Composite { |
28 | 28 |
private final FormToolkit formToolkit = new FormToolkit(Display.getDefault()); |
29 | 29 |
private final Text textLocality; |
30 |
private final Text textLatitude; |
|
31 |
private final Text textLongitude; |
|
32 |
private final Text textErrorRadius; |
|
33 | 30 |
private final Text textElevation; |
34 | 31 |
private final Text textCollectingNumber; |
35 | 32 |
private EntitySelectionField countrySelectionField; |
36 | 33 |
private EntitySelectionField collectorSelectionField; |
37 | 34 |
private ToggleableTextField toggleableTextField; |
35 |
private PointField pointField; |
|
38 | 36 |
|
39 | 37 |
/** |
40 | 38 |
* Create the composite. |
39 |
* |
|
41 | 40 |
* @param parent |
42 | 41 |
* @param style |
43 | 42 |
*/ |
... | ... | |
76 | 75 |
|
77 | 76 |
Label lblLatitude = formToolkit.createLabel(this, "Latitude", SWT.NONE); |
78 | 77 |
|
79 |
textLatitude = formToolkit.createText(this, "New Text", SWT.NONE); |
|
80 |
textLatitude.setText(""); |
|
81 |
textLatitude.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1)); |
|
78 |
pointField = new PointField(this, SWT.NONE); |
|
79 |
TableWrapLayout twl_pointField = (TableWrapLayout) pointField.getLayout(); |
|
80 |
twl_pointField.verticalSpacing = 0; |
|
81 |
twl_pointField.topMargin = 0; |
|
82 |
twl_pointField.rightMargin = 0; |
|
83 |
twl_pointField.leftMargin = 0; |
|
84 |
twl_pointField.horizontalSpacing = 0; |
|
85 |
twl_pointField.bottomMargin = 0; |
|
86 |
pointField.setLayoutData(new TableWrapData(TableWrapData.LEFT, TableWrapData.TOP, 6, 1)); |
|
87 |
formToolkit.adapt(pointField); |
|
88 |
formToolkit.paintBordersFor(pointField); |
|
89 |
new Label(this, SWT.NONE); |
|
82 | 90 |
|
83 | 91 |
Label lblLongitude = formToolkit.createLabel(this, "Longitude", SWT.NONE); |
84 |
|
|
85 |
textLongitude = formToolkit.createText(this, "New Text", SWT.NONE); |
|
86 |
textLongitude.setText(""); |
|
87 |
textLongitude.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1)); |
|
92 |
new Label(this, SWT.NONE); |
|
88 | 93 |
|
89 | 94 |
Label lblErrorRadiusm = formToolkit.createLabel(this, "Error Radius (m)", SWT.NONE); |
90 | 95 |
|
91 |
textErrorRadius = formToolkit.createText(this, "New Text", SWT.NONE); |
|
92 |
textErrorRadius.setText(""); |
|
93 |
textErrorRadius.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1)); |
|
94 |
|
|
95 | 96 |
Label lblReferenceSystem = formToolkit.createLabel(this, "Reference System", SWT.NONE); |
96 |
new Label(this, SWT.NONE); |
|
97 | 97 |
|
98 | 98 |
Label lblAbsoluteElevationm = formToolkit.createLabel(this, "Absolute Elevation (m)", SWT.NONE); |
99 | 99 |
|
... | ... | |
111 | 111 |
formToolkit.adapt(collectorSelectionField); |
112 | 112 |
formToolkit.paintBordersFor(collectorSelectionField); |
113 | 113 |
|
114 |
|
|
115 | 114 |
Label lblCollectingNumber = formToolkit.createLabel(this, "Collecting Number", SWT.NONE); |
116 | 115 |
|
117 | 116 |
textCollectingNumber = formToolkit.createText(this, "New Text", SWT.NONE); |
... | ... | |
124 | 123 |
protected void checkSubclass() { |
125 | 124 |
// Disable the check that prevents subclassing of SWT components |
126 | 125 |
} |
126 |
|
|
127 | 127 |
public EntitySelectionField getCountrySelectionField() { |
128 | 128 |
return countrySelectionField; |
129 | 129 |
} |
130 |
|
|
130 | 131 |
public EntitySelectionField getCollectorSelectionField() { |
131 | 132 |
return collectorSelectionField; |
132 | 133 |
} |
134 |
|
|
133 | 135 |
public Text getTextElevation() { |
134 | 136 |
return textElevation; |
135 | 137 |
} |
138 |
|
|
136 | 139 |
public Text getTextLocality() { |
137 | 140 |
return textLocality; |
138 | 141 |
} |
139 |
public Text getTextLatitude() { |
|
140 |
return textLatitude; |
|
141 |
} |
|
142 |
public Text getTextLongitude() { |
|
143 |
return textLongitude; |
|
144 |
} |
|
145 |
public Text getTextErrorRadius() { |
|
146 |
return textErrorRadius; |
|
147 |
} |
|
142 |
|
|
148 | 143 |
public Text getTextCollectingNumber() { |
149 | 144 |
return textCollectingNumber; |
150 | 145 |
} |
146 |
|
|
151 | 147 |
public ToggleableTextField getToggleableTextField() { |
152 | 148 |
return toggleableTextField; |
153 | 149 |
} |
150 |
|
|
151 |
public PointField getPointField() { |
|
152 |
return pointField; |
|
153 |
} |
|
154 | 154 |
} |
Also available in: Unified diff