Project

General

Profile

Download (1.96 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2019 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.view.search.term;
11

    
12
import org.eclipse.swt.SWT;
13
import org.eclipse.swt.custom.ScrolledComposite;
14
import org.eclipse.swt.layout.GridData;
15
import org.eclipse.swt.layout.GridLayout;
16
import org.eclipse.swt.widgets.Composite;
17
import org.eclipse.swt.widgets.Text;
18

    
19
/**
20
 * @author pplitzner
21
 * @date 22.01.2019
22
 *
23
 */
24
public class TermSearchComposite extends Composite {
25
    private Text text;
26

    
27
    /**
28
     * Create the composite.
29
     * @param parent
30
     * @param style
31
     */
32
    public TermSearchComposite(Composite parent, int style) {
33
        super(parent, style);
34
        setLayout(new GridLayout(2, false));
35

    
36
        Composite filterComposite = new Composite(this, SWT.NONE);
37
        filterComposite.setLayout(new GridLayout(1, false));
38
        filterComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
39
        filterComposite.setBounds(0, 0, 64, 64);
40

    
41
        text = new Text(filterComposite, SWT.BORDER);
42
        text.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));
43

    
44
        ScrolledComposite scrolledComposite = new ScrolledComposite(filterComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
45
        scrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
46
        scrolledComposite.setExpandHorizontal(true);
47
        scrolledComposite.setExpandVertical(true);
48

    
49
        Composite searchResultComposite = new Composite(this, SWT.NONE);
50
        searchResultComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
51
        searchResultComposite.setBounds(0, 0, 64, 64);
52

    
53
    }
54

    
55
    @Override
56
    protected void checkSubclass() {
57
        // Disable the check that prevents subclassing of SWT components
58
    }
59
}
    (1-1/1)