Project

General

Profile

Download (2.44 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2014 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.mvc;
11

    
12
import org.eclipse.swt.SWT;
13
import org.eclipse.swt.widgets.Composite;
14
import org.eclipse.swt.widgets.Label;
15
import org.eclipse.swt.widgets.Text;
16
import org.eclipse.ui.forms.widgets.TableWrapData;
17
import org.eclipse.ui.forms.widgets.TableWrapLayout;
18

    
19
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
20
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
21

    
22
/**
23
 * @author pplitzner
24
 * @date 17.06.2014
25
 *
26
 */
27
public class OriginalLabelDataElement extends AbstractCdmComposite<OriginalLabelDataController>{
28
    private final Text text;
29

    
30
    /**
31
     * @param parent
32
     * @param style
33
     */
34
    public OriginalLabelDataElement(Composite parent, int style) {
35
        super(parent, style);
36
        {
37
            TableWrapLayout tableWrapLayout = new TableWrapLayout();
38
            tableWrapLayout.verticalSpacing = 0;
39
            tableWrapLayout.topMargin = 0;
40
            tableWrapLayout.rightMargin = 0;
41
            tableWrapLayout.leftMargin = 0;
42
            tableWrapLayout.horizontalSpacing = 0;
43
            tableWrapLayout.bottomMargin = 0;
44
            tableWrapLayout.numColumns = 3;
45
            setLayout(tableWrapLayout);
46
        }
47

    
48
        Label lblOriginalLabelData = new Label(this, SWT.NONE);
49
        lblOriginalLabelData.setLayoutData(new TableWrapData(TableWrapData.RIGHT, TableWrapData.TOP, 1, 1));
50
        lblOriginalLabelData.setText("Original Label Data");
51

    
52
        text = new Text(this, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.MULTI);
53
        text.setEditable(false);
54
        text.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
55
        new Label(this, SWT.NONE);
56

    
57
        // TODO Auto-generated constructor stub
58
    }
59

    
60
    /* (non-Javadoc)
61
     * @see eu.etaxonomy.taxeditor.ui.mvc.AbstractCdmComposite#initInternalController(eu.etaxonomy.taxeditor.ui.element.CdmFormFactory, eu.etaxonomy.taxeditor.ui.element.ICdmFormElement)
62
     */
63
    @Override
64
    protected void initInternalController(CdmFormFactory formFactory, ICdmFormElement parentElement) {
65
        controller = new OriginalLabelDataController(formFactory, parentElement, this, SWT.NONE);
66
    }
67

    
68
    public Text getText() {
69
        return text;
70
    }
71
}
(5-5/5)