3 * Copyright (C) 2013 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.ui
.section
.campanula
;
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
;
27 public class FieldObservationGeneralElement
extends Composite
{
28 private final FormToolkit formToolkit
= new FormToolkit(Display
.getDefault());
29 private final Text text
;
30 private final Text text_1
;
31 private final Text text_2
;
32 private final Text text_3
;
33 private final Text text_4
;
34 private final Text text_5
;
35 private final Text text_6
;
36 private final Text text_7
;
39 * Create the composite.
43 public FieldObservationGeneralElement(Composite parent
, int style
) {
45 setBackground(SWTResourceManager
.getColor(SWT
.COLOR_WHITE
));
47 TableWrapLayout tableWrapLayout
= new TableWrapLayout();
48 tableWrapLayout
.numColumns
= 2;
49 setLayout(tableWrapLayout
);
52 Label lblTitleCache
= formToolkit
.createLabel(this, "Title Cache", SWT
.NONE
);
54 text
= formToolkit
.createText(this, "New Text", SWT
.NONE
);
56 text
.setLayoutData(new TableWrapData(TableWrapData
.FILL_GRAB
, TableWrapData
.TOP
, 1, 1));
58 Label lblNewLabel
= new Label(this, SWT
.NONE
);
59 formToolkit
.adapt(lblNewLabel
, true, true);
60 lblNewLabel
.setText("Country");
61 new Label(this, SWT
.NONE
);
63 Label lblLocality
= formToolkit
.createLabel(this, "Locality", SWT
.NONE
);
65 text_1
= formToolkit
.createText(this, "New Text", SWT
.NONE
);
67 text_1
.setLayoutData(new TableWrapData(TableWrapData
.FILL_GRAB
, TableWrapData
.TOP
, 1, 1));
69 Label lblLatitude
= formToolkit
.createLabel(this, "Latitude", SWT
.NONE
);
71 text_2
= formToolkit
.createText(this, "New Text", SWT
.NONE
);
73 text_2
.setLayoutData(new TableWrapData(TableWrapData
.FILL_GRAB
, TableWrapData
.TOP
, 1, 1));
75 Label lblLongitude
= formToolkit
.createLabel(this, "Longitude", SWT
.NONE
);
77 text_3
= formToolkit
.createText(this, "New Text", SWT
.NONE
);
79 text_3
.setLayoutData(new TableWrapData(TableWrapData
.FILL_GRAB
, TableWrapData
.TOP
, 1, 1));
81 Label lblErrorRadiusm
= formToolkit
.createLabel(this, "Error Radius (m)", SWT
.NONE
);
83 text_4
= formToolkit
.createText(this, "New Text", SWT
.NONE
);
85 text_4
.setLayoutData(new TableWrapData(TableWrapData
.FILL_GRAB
, TableWrapData
.TOP
, 1, 1));
87 Label lblReferenceSystem
= formToolkit
.createLabel(this, "Reference System", SWT
.NONE
);
88 new Label(this, SWT
.NONE
);
90 Label lblAbsoluteElevationm
= formToolkit
.createLabel(this, "Absolute Elevation (m)", SWT
.NONE
);
92 text_5
= formToolkit
.createText(this, "New Text", SWT
.NONE
);
94 text_5
.setLayoutData(new TableWrapData(TableWrapData
.FILL_GRAB
, TableWrapData
.TOP
, 1, 1));
96 Label lblDate
= formToolkit
.createLabel(this, "Date", SWT
.NONE
);
97 new Label(this, SWT
.NONE
);
99 Label lblCollector
= formToolkit
.createLabel(this, "Collector", SWT
.NONE
);
101 text_6
= formToolkit
.createText(this, "New Text", SWT
.NONE
);
103 text_6
.setLayoutData(new TableWrapData(TableWrapData
.FILL_GRAB
, TableWrapData
.TOP
, 1, 1));
105 Label lblCollectingNumber
= formToolkit
.createLabel(this, "Collecting Number", SWT
.NONE
);
107 text_7
= formToolkit
.createText(this, "New Text", SWT
.NONE
);
109 text_7
.setLayoutData(new TableWrapData(TableWrapData
.FILL_GRAB
, TableWrapData
.TOP
, 1, 1));
114 protected void checkSubclass() {
115 // Disable the check that prevents subclassing of SWT components