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.ui.combo.term;
|
10
|
|
11
|
import org.eclipse.jface.viewers.ILabelProvider;
|
12
|
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
13
|
import org.eclipse.swt.widgets.Composite;
|
14
|
|
15
|
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
|
16
|
import eu.etaxonomy.taxeditor.ui.combo.AbstractComboComposite;
|
17
|
|
18
|
/**
|
19
|
* @author pplitzner
|
20
|
* @since Nov 24, 2017
|
21
|
*
|
22
|
*/
|
23
|
public class TermUuidComboViewer extends AbstractComboComposite<DefinedTermBase>{
|
24
|
|
25
|
public TermUuidComboViewer(Composite parent, int style) {
|
26
|
super(parent, style);
|
27
|
}
|
28
|
|
29
|
@Override
|
30
|
public String getElementLabel(DefinedTermBase element) {
|
31
|
return element!=null?element.getLabel():"";
|
32
|
}
|
33
|
|
34
|
@Override
|
35
|
public IStructuredContentProvider getContentProvider() {
|
36
|
return new TermUuidContentProvider();
|
37
|
}
|
38
|
|
39
|
@Override
|
40
|
public ILabelProvider getLabelProvider() {
|
41
|
return new TermUuidLabelProvider();
|
42
|
}
|
43
|
|
44
|
}
|