1
|
/**
|
2
|
* Copyright (C) 2019 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.view.search.facet.term;
|
10
|
|
11
|
import org.eclipse.jface.layout.GridDataFactory;
|
12
|
import org.eclipse.swt.SWT;
|
13
|
import org.eclipse.swt.layout.GridData;
|
14
|
import org.eclipse.swt.layout.GridLayout;
|
15
|
import org.eclipse.swt.widgets.Composite;
|
16
|
import org.eclipse.swt.widgets.Label;
|
17
|
|
18
|
/**
|
19
|
* @author pplitzner
|
20
|
* @since Jan 23, 2019
|
21
|
*
|
22
|
*/
|
23
|
public class TermSearchResultComposite extends Composite {
|
24
|
|
25
|
/**
|
26
|
* Create the composite.
|
27
|
* @param result
|
28
|
* @param parent
|
29
|
* @param style
|
30
|
*/
|
31
|
public TermSearchResultComposite(TermSearchResult result, Composite parent, int style) {
|
32
|
super(parent, style);
|
33
|
setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
|
34
|
setLayout(new GridLayout());
|
35
|
Label label = new Label(parent, SWT.NONE);
|
36
|
label.setText(result.getContent().getRepresentation_L10n());
|
37
|
GridDataFactory.fillDefaults().applyTo(label);
|
38
|
}
|
39
|
|
40
|
@Override
|
41
|
protected void checkSubclass() {
|
42
|
// Disable the check that prevents subclassing of SWT components
|
43
|
}
|
44
|
|
45
|
}
|