- increased version number
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / campanula / detailViews / fieldObservation / FieldObservationDetailsElement.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 15.08.2013
25 *
26 */
27 public class FieldObservationDetailsElement extends Composite {
28 private final FormToolkit formToolkit = new FormToolkit(Display.getDefault());
29 private Text text_ecology;
30 private Text text_plantDescription;
31 private Text text_FieldNotes;
32 private Text text_IndividualCount;
33
34 /**
35 * Create the composite.
36 * @param parent
37 * @param style
38 */
39 public FieldObservationDetailsElement(Composite parent, int style) {
40 super(parent, style);
41 setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
42 {
43 TableWrapLayout tableWrapLayout = new TableWrapLayout();
44 tableWrapLayout.numColumns = 2;
45 tableWrapLayout.verticalSpacing = 0;
46 tableWrapLayout.topMargin = 0;
47 tableWrapLayout.rightMargin = 0;
48 tableWrapLayout.leftMargin = 0;
49 tableWrapLayout.horizontalSpacing = 0;
50 tableWrapLayout.bottomMargin = 0;
51 setLayout(tableWrapLayout);
52 }
53
54 Label lblEcology = formToolkit.createLabel(this, "Ecology", SWT.NONE);
55
56 text_ecology = formToolkit.createText(this, "New Text", SWT.NONE);
57 text_ecology.setText("");
58 text_ecology.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
59
60 Label lblPlantDescription = formToolkit.createLabel(this, "Plant Description", SWT.NONE);
61
62 text_plantDescription = formToolkit.createText(this, "New Text", SWT.NONE);
63 text_plantDescription.setText("");
64 text_plantDescription.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
65
66 Label lblFieldNotes = formToolkit.createLabel(this, "Field Notes", SWT.NONE);
67
68 text_FieldNotes = formToolkit.createText(this, "New Text", SWT.NONE);
69 text_FieldNotes.setText("");
70 text_FieldNotes.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
71
72 Label lblIndividualCount = formToolkit.createLabel(this, "Individual Count", SWT.NONE);
73
74 text_IndividualCount = formToolkit.createText(this, "New Text", SWT.NONE);
75 text_IndividualCount.setText("");
76 text_IndividualCount.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
77
78 }
79
80 @Override
81 protected void checkSubclass() {
82 // Disable the check that prevents subclassing of SWT components
83 }
84
85 public Text getText_ecology() {
86 return text_ecology;
87 }
88 public Text getText_plantDescription() {
89 return text_plantDescription;
90 }
91 public Text getText_FieldNotes() {
92 return text_FieldNotes;
93 }
94 public Text getText_IndividualCount() {
95 return text_IndividualCount;
96 }
97 }