Project

General

Profile

Download (1.21 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.ui.combo.termvocabulary;
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.common.TermVocabulary;
16
import eu.etaxonomy.taxeditor.ui.combo.AbstractComboComposite;
17

    
18
/**
19
 *
20
 * @author pplitzner
21
 * @since Aug 17, 2018
22
 *
23
 */
24
public class TermVocabularyComboViewer extends AbstractComboComposite<TermVocabulary>{
25

    
26
    public TermVocabularyComboViewer(Composite parent, int style) {
27
        super(parent, style);
28
    }
29

    
30
    @Override
31
    public String getElementLabel(TermVocabulary element) {
32
        return element!=null?element.getLabel():"";
33
    }
34

    
35
    @Override
36
    public IStructuredContentProvider getContentProvider() {
37
        return new TermVocabularyComboContentProvider();
38
    }
39

    
40
    @Override
41
    public ILabelProvider getLabelProvider() {
42
        return new TermVocabularyComboLabelProvider();
43
    }
44

    
45
}
(3-3/3)