merge-update from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / campanula / detailViews / specimen / SpecimenDetailsElement.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.specimen;
11
12 import org.eclipse.swt.SWT;
13 import org.eclipse.swt.widgets.Combo;
14 import org.eclipse.swt.widgets.Composite;
15 import org.eclipse.swt.widgets.Display;
16 import org.eclipse.swt.widgets.Label;
17 import org.eclipse.swt.widgets.Text;
18 import org.eclipse.ui.forms.widgets.FormToolkit;
19 import org.eclipse.ui.forms.widgets.TableWrapData;
20 import org.eclipse.ui.forms.widgets.TableWrapLayout;
21 import org.eclipse.wb.swt.SWTResourceManager;
22
23 /**
24 * @author pplitzner
25 * @date 29.08.2013
26 *
27 */
28 public class SpecimenDetailsElement extends Composite {
29 private final FormToolkit formToolkit = new FormToolkit(Display.getDefault());
30 private Text text_IndividualEcology;
31 private Text text_PlantDesriptionDetails;
32 private Text text_IndividualFieldNotes;
33 private Combo comboLiveStage;
34 private Combo combo_Sex;
35
36 /**
37 * Create the composite.
38 * @param parent
39 * @param style
40 */
41 public SpecimenDetailsElement(Composite parent, int style) {
42 super(parent, style);
43 setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
44 {
45 TableWrapLayout tableWrapLayout = new TableWrapLayout();
46 tableWrapLayout.numColumns = 2;
47 setLayout(tableWrapLayout);
48 }
49
50 Label lblNewLabel = formToolkit.createLabel(this, "Individual Ecology", SWT.NONE);
51
52 text_IndividualEcology = formToolkit.createText(this, "New Text", SWT.NONE);
53 text_IndividualEcology.setText("");
54 text_IndividualEcology.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
55
56 Label lblPlantDescriptionDetails = formToolkit.createLabel(this, "Plant Description Details", SWT.NONE);
57
58 text_PlantDesriptionDetails = formToolkit.createText(this, "New Text", SWT.NONE);
59 text_PlantDesriptionDetails.setText("");
60 text_PlantDesriptionDetails.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
61
62 Label lblIndividualFieldNotes = formToolkit.createLabel(this, "Individual Field Notes", SWT.NONE);
63
64 text_IndividualFieldNotes = formToolkit.createText(this, "New Text", SWT.NONE);
65 text_IndividualFieldNotes.setText("");
66 text_IndividualFieldNotes.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
67
68 Label lblLiveStage = formToolkit.createLabel(this, "Live Stage", SWT.NONE);
69
70 comboLiveStage = new Combo(this, SWT.NONE);
71 comboLiveStage.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
72 formToolkit.adapt(comboLiveStage);
73 formToolkit.paintBordersFor(comboLiveStage);
74
75 Label lblSex = formToolkit.createLabel(this, "Sex", SWT.NONE);
76
77 combo_Sex = new Combo(this, SWT.NONE);
78 combo_Sex.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
79 formToolkit.adapt(combo_Sex);
80 formToolkit.paintBordersFor(combo_Sex);
81
82 }
83
84 @Override
85 protected void checkSubclass() {
86 // Disable the check that prevents subclassing of SWT components
87 }
88
89 public Text getText_IndividualEcology() {
90 return text_IndividualEcology;
91 }
92 public Text getText_PlantDesriptionDetails() {
93 return text_PlantDesriptionDetails;
94 }
95 public Text getText_IndividualFieldNotes() {
96 return text_IndividualFieldNotes;
97 }
98 public Combo getComboLiveStage() {
99 return comboLiveStage;
100 }
101 public Combo getCombo_Sex() {
102 return combo_Sex;
103 }
104 }