Project

General

Profile

« Previous | Next » 

Revision 23fa8987

Added by Patrick Plitzner about 5 years ago

ref #8011 Add search button to term search

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/SearchComposite.java
13 13
import org.eclipse.swt.custom.ScrolledComposite;
14 14
import org.eclipse.swt.layout.GridData;
15 15
import org.eclipse.swt.layout.GridLayout;
16
import org.eclipse.swt.widgets.Button;
16 17
import org.eclipse.swt.widgets.Composite;
17 18
import org.eclipse.swt.widgets.Text;
18 19

  
20
import eu.etaxonomy.taxeditor.model.ImageResources;
21

  
19 22
/**
20 23
 * @author pplitzner
21 24
 * @date 22.01.2019
......
27 30
    private Composite filterListComposite;
28 31
    private Composite searchResultComposite;
29 32
    private ScrolledComposite resultScrolledComposite;
33
    private Composite composite;
34
    private Button btnSearchButton;
30 35

  
31 36
    /**
32 37
     * Create the composite.
......
43 48
        gd_filterComposite.widthHint = 170;
44 49
        filterComposite.setLayoutData(gd_filterComposite);
45 50

  
46
        txtSearch = new Text(filterComposite, SWT.BORDER);
51
        composite = new Composite(filterComposite, SWT.NONE);
52
        composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
53
        composite.setLayout(new GridLayout(2, false));
54

  
55
        txtSearch = new Text(composite, SWT.BORDER);
47 56
        txtSearch.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
48 57

  
58
        btnSearchButton = new Button(composite, SWT.NONE);
59
        btnSearchButton.setImage(ImageResources.getImage(ImageResources.SEARCH_ICON));
60

  
49 61
        filterScrolledComposite = new ScrolledComposite(filterComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
50 62
        filterScrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
51 63
        filterScrolledComposite.setExpandHorizontal(true);
......
116 128
    public Composite getSearchResultComposite() {
117 129
        return searchResultComposite;
118 130
    }
131
    public Button getBtnSearchButton() {
132
        return btnSearchButton;
133
    }
119 134
}

Also available in: Unified diff