Project

General

Profile

Download (1 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2009 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.editor.definedterm;
10

    
11
import java.util.Collection;
12

    
13
import org.eclipse.jface.viewers.ITreeContentProvider;
14

    
15
import eu.etaxonomy.cdm.model.term.TermVocabulary;
16

    
17
/**
18
 *
19
 * @author pplitzner
20
 * @since Nov 12, 2018
21
 *
22
 */
23
public class RootElementsOnlyTreeContentProvider implements ITreeContentProvider {
24

    
25
    @Override
26
    public Object[] getElements(Object inputElement) {
27
        return ((Collection<TermVocabulary>)inputElement).toArray();
28
    }
29

    
30
    @Override
31
    public Object[] getChildren(Object parentElement) {
32
        return new Object[0];
33
    }
34

    
35
    @Override
36
    public Object getParent(Object element) {
37
        return null;
38
    }
39

    
40
    @Override
41
    public boolean hasChildren(Object element) {
42
        return false;
43
    }
44

    
45
}
(2-2/6)