Project

General

Profile

Download (3.45 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
 * Copyright (C) 2017 EDIT
3
 * European Distributed Institute of Taxonomy
4
 * http://www.e-taxonomy.eu
5
 *
6
 * The contents of this file are subject to the Mozilla Public License Version 1.1
7
 * See LICENSE.TXT at the top of this package for the full license terms.
8
 */
9
package eu.etaxonomy.taxeditor.editor.workingSet;
10

    
11
import org.eclipse.jface.viewers.ComboViewer;
12
import org.eclipse.jface.viewers.TreeViewer;
13
import org.eclipse.swt.SWT;
14
import org.eclipse.swt.layout.FillLayout;
15
import org.eclipse.swt.layout.GridData;
16
import org.eclipse.swt.layout.GridLayout;
17
import org.eclipse.swt.widgets.Combo;
18
import org.eclipse.swt.widgets.Composite;
19
import org.eclipse.swt.widgets.Label;
20
import org.eclipse.swt.widgets.Text;
21
import org.eclipse.swt.widgets.Tree;
22

    
23
import eu.etaxonomy.cdm.model.common.TermType;
24
import eu.etaxonomy.taxeditor.ui.combo.TermUuidComboViewer;
25

    
26
/**
27
 * @author pplitzner
28
 * @since Nov 21, 2017
29
 *
30
 */
31
public class WorkingSetComposite extends Composite {
32
    private Text txt_label;
33

    
34
    public WorkingSetComposite(Composite parent, int style) {
35
        super(parent, style);
36
        setLayout(new GridLayout(3, false));
37

    
38
        Label lblNewLabel = new Label(this, SWT.NONE);
39
        lblNewLabel.setText("Working set label");
40

    
41
        txt_label = new Text(this, SWT.BORDER);
42
        txt_label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
43

    
44
        Label lblNewLabel_1 = new Label(this, SWT.NONE);
45
        lblNewLabel_1.setText("Taxon filter");
46

    
47
        Label lblNewLabel_2 = new Label(this, SWT.NONE);
48
        lblNewLabel_2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
49
        lblNewLabel_2.setText("Rank min");
50

    
51
        TermUuidComboViewer combo = new TermUuidComboViewer(this, SWT.NONE);
52
        combo.setInput(TermType.Rank);
53
        //        Combo combo = new Combo(this, SWT.NONE);
54
        //        combo.setItems(new String[] {"Genus", "Species", "Subspecies"});
55
        combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
56

    
57
        Composite composite = new Composite(this, SWT.NONE);
58
        composite.setLayout(new FillLayout(SWT.HORIZONTAL));
59
        composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 3));
60

    
61
        TreeViewer treeViewer = new TreeViewer(composite, SWT.BORDER);
62
        Tree tree = treeViewer.getTree();
63

    
64
        Label lblNewLabel_3 = new Label(this, SWT.NONE);
65
        lblNewLabel_3.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
66
        lblNewLabel_3.setText("Rank max");
67

    
68
//        Combo combo_1 = new Combo(this, SWT.NONE);
69
        TermUuidComboViewer combo_1 = new TermUuidComboViewer(this, SWT.NONE);
70
//        combo_1.setItems(new String[] {"Genus", "Species", "Subspecies"});
71
        combo_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
72

    
73
        Label lblNewLabel_4 = new Label(this, SWT.NONE);
74
        lblNewLabel_4.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
75
        lblNewLabel_4.setText("Area");
76

    
77
        ComboViewer comboViewer = new ComboViewer(this, SWT.NONE);
78
        Combo combo_2 = comboViewer.getCombo();
79
        combo_2.setItems(new String[] {"Europe", "Northern Europe", "Southern Europe", "Germany"});
80
        combo_2.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
81

    
82
    }
83

    
84
    @Override
85
    protected void checkSubclass() {
86
        // Disable the check that prevents subclassing of SWT components
87
    }
88
    public Text getTxt_label() {
89
        return txt_label;
90
    }
91
}
(1-1/2)