- fixed initial setting of parameters of GatheringEventDescription
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / campanula / detailViews / fieldObservation / GatheringEventDetailsElement.java
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.detailViews.fieldObservation;
11
12 import org.eclipse.swt.SWT;
13 import org.eclipse.swt.widgets.Composite;
14 import org.eclipse.swt.widgets.Display;
15 import org.eclipse.swt.widgets.Label;
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 import org.eclipse.wb.swt.SWTResourceManager;
21
22 /**
23 * @author pplitzner
24 * @date 07.08.2013
25 *
26 */
27 public class GatheringEventDetailsElement extends Composite {
28 private FormToolkit formToolkit = new FormToolkit(Display.getDefault());
29 private Text textElevationError;
30 private Text text_ElevationMinimum;
31 private Text text_ElevationMaximum;
32 private Text text_CollectingMethod;
33 private Text text_DistanceToGround;
34 private Text text_DistanceToWaterSurface;
35 private Text text_GatheringEventDescription;
36
37 /**
38 * Create the composite.
39 * @param parent
40 * @param style
41 */
42 public GatheringEventDetailsElement(Composite parent, int style) {
43 super(parent, style);
44 setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
45 {
46 TableWrapLayout tableWrapLayout = new TableWrapLayout();
47 tableWrapLayout.verticalSpacing = 0;
48 tableWrapLayout.topMargin = 0;
49 tableWrapLayout.rightMargin = 0;
50 tableWrapLayout.leftMargin = 0;
51 tableWrapLayout.horizontalSpacing = 0;
52 tableWrapLayout.bottomMargin = 0;
53 tableWrapLayout.numColumns = 2;
54 setLayout(tableWrapLayout);
55 }
56
57 Label lblElevationError = formToolkit.createLabel(this, "Elevation Error", SWT.NONE);
58
59 textElevationError = formToolkit.createText(this, "New Text", SWT.NONE);
60 textElevationError.setText("");
61 textElevationError.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
62
63 Label lblElevationMinimumm = formToolkit.createLabel(this, "Elevation Minimum (m)", SWT.NONE);
64
65 text_ElevationMinimum = formToolkit.createText(this, "New Text", SWT.NONE);
66 text_ElevationMinimum.setText("");
67 text_ElevationMinimum.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
68
69 Label lblElevationMaximumm = formToolkit.createLabel(this, "Elevation Maximum (m)", SWT.NONE);
70
71 text_ElevationMaximum = formToolkit.createText(this, "New Text", SWT.NONE);
72 text_ElevationMaximum.setText("");
73 text_ElevationMaximum.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
74
75 Label lblCollectingMethod = formToolkit.createLabel(this, "Collecting Method", SWT.NONE);
76
77 text_CollectingMethod = formToolkit.createText(this, "New Text", SWT.NONE);
78 text_CollectingMethod.setText("");
79 text_CollectingMethod.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
80
81 Label lblDistanceToGround = formToolkit.createLabel(this, "Distance To Ground (m)", SWT.NONE);
82
83 text_DistanceToGround = formToolkit.createText(this, "New Text", SWT.NONE);
84 text_DistanceToGround.setText("");
85 text_DistanceToGround.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
86
87 Label lblDistanceToWater = formToolkit.createLabel(this, "Distance To Water Surface (m)", SWT.NONE);
88
89 text_DistanceToWaterSurface = formToolkit.createText(this, "New Text", SWT.NONE);
90 text_DistanceToWaterSurface.setText("");
91 text_DistanceToWaterSurface.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
92
93 Label lblGatheringEventDescription = formToolkit.createLabel(this, "Gathering Event Description", SWT.NONE);
94
95 text_GatheringEventDescription = formToolkit.createText(this, "New Text", SWT.NONE);
96 text_GatheringEventDescription.setText("");
97 text_GatheringEventDescription.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
98
99 }
100
101 @Override
102 protected void checkSubclass() {
103 // Disable the check that prevents subclassing of SWT components
104 }
105
106 public Text getTextElevationError() {
107 return textElevationError;
108 }
109 public Text getText_ElevationMinimum() {
110 return text_ElevationMinimum;
111 }
112 public Text getText_ElevationMaximum() {
113 return text_ElevationMaximum;
114 }
115 public Text getText_CollectingMethod() {
116 return text_CollectingMethod;
117 }
118 public Text getText_DistanceToGround() {
119 return text_DistanceToGround;
120 }
121 public Text getText_DistanceToWaterSurface() {
122 return text_DistanceToWaterSurface;
123 }
124 public Text getText_GatheringEventDescription() {
125 return text_GatheringEventDescription;
126 }
127 }