Project

General

Profile

Download (4.81 KB) Statistics
| Branch: | Tag: | Revision:
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.section.campanula;
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 final FormToolkit formToolkit = new FormToolkit(Display.getDefault());
29
    private final Text textElevationError;
30
    private final Text text_ElevationMinimum;
31
    private final Text text_ElevationMaximum;
32
    private final Text text_CollectingMethod;
33
    private final Text text_DistanceToGround;
34
    private final Text text_DistanceToWaterSurface;
35
    private final 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.numColumns = 2;
48
            setLayout(tableWrapLayout);
49
        }
50

    
51
        Label lblElevationError = formToolkit.createLabel(this, "Elevation Error", SWT.NONE);
52

    
53
        textElevationError = formToolkit.createText(this, "New Text", SWT.NONE);
54
        textElevationError.setText("");
55
        textElevationError.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
56

    
57
        Label lblElevationMinimumm = formToolkit.createLabel(this, "Elevation Minimum (m)", SWT.NONE);
58

    
59
        text_ElevationMinimum = formToolkit.createText(this, "New Text", SWT.NONE);
60
        text_ElevationMinimum.setText("");
61
        text_ElevationMinimum.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
62

    
63
        Label lblElevationMaximumm = formToolkit.createLabel(this, "Elevation Maximum (m)", SWT.NONE);
64

    
65
        text_ElevationMaximum = formToolkit.createText(this, "New Text", SWT.NONE);
66
        text_ElevationMaximum.setText("");
67
        text_ElevationMaximum.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
68

    
69
        Label lblCollectingMethod = formToolkit.createLabel(this, "Collecting Method", SWT.NONE);
70

    
71
        text_CollectingMethod = formToolkit.createText(this, "New Text", SWT.NONE);
72
        text_CollectingMethod.setText("");
73
        text_CollectingMethod.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
74

    
75
        Label lblDistanceToGround = formToolkit.createLabel(this, "Distance To Ground (m)", SWT.NONE);
76

    
77
        text_DistanceToGround = formToolkit.createText(this, "New Text", SWT.NONE);
78
        text_DistanceToGround.setText("");
79
        text_DistanceToGround.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
80

    
81
        Label lblDistanceToWater = formToolkit.createLabel(this, "Distance To Water Surface (m)", SWT.NONE);
82

    
83
        text_DistanceToWaterSurface = formToolkit.createText(this, "New Text", SWT.NONE);
84
        text_DistanceToWaterSurface.setText("");
85
        text_DistanceToWaterSurface.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
86

    
87
        Label lblGatheringEventDescription = formToolkit.createLabel(this, "Gathering Event Description", SWT.NONE);
88

    
89
        text_GatheringEventDescription = formToolkit.createText(this, "New Text", SWT.NONE);
90
        text_GatheringEventDescription.setText("");
91
        text_GatheringEventDescription.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
92

    
93
    }
94

    
95
    @Override
96
    protected void checkSubclass() {
97
        // Disable the check that prevents subclassing of SWT components
98
    }
99

    
100
    public Text getTextElevationError() {
101
        return textElevationError;
102
    }
103
    public Text getText_ElevationMinimum() {
104
        return text_ElevationMinimum;
105
    }
106
    public Text getText_ElevationMaximum() {
107
        return text_ElevationMaximum;
108
    }
109
    public Text getText_CollectingMethod() {
110
        return text_CollectingMethod;
111
    }
112
    public Text getText_DistanceToGround() {
113
        return text_DistanceToGround;
114
    }
115
    public Text getText_DistanceToWaterSurface() {
116
        return text_DistanceToWaterSurface;
117
    }
118
    public Text getText_GatheringEventDescription() {
119
        return text_GatheringEventDescription;
120
    }
121
}
(3-3/5)