Project

General

Profile

Download (1.96 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
 * Copyright (C) 2007 EDIT
4
 * European Distributed Institute of Taxonomy 
5
 * http://www.e-taxonomy.eu
6
 * 
7
 * The contents of this file are subject to the Mozilla Public License Version 1.1
8
 * See LICENSE.TXT at the top of this package for the full license terms.
9
 */
10

    
11
package eu.etaxonomy.taxeditor.singlesource.editor.key.polytomous;
12

    
13
import org.apache.log4j.Logger;
14
import org.eclipse.jface.viewers.CellLabelProvider;
15
import org.eclipse.jface.viewers.ILabelProviderListener;
16
import org.eclipse.jface.viewers.ViewerCell;
17

    
18
import eu.etaxonomy.taxeditor.singlesource.ImplementationLoader;
19
import eu.etaxonomy.taxeditor.singlesource.editor.view.concept.ConceptLabelProviderFacade;
20

    
21
/**
22
 * @author n.hoffmann
23
 * @created Apr 18, 2011
24
 * @version 1.0
25
 */
26
public abstract class PolytomousKeyListLabelProviderFacade extends CellLabelProvider {
27
	private static final Logger logger = Logger.getLogger(PolytomousKeyListLabelProviderFacade.class);
28
	
29
	private final static PolytomousKeyListLabelProviderFacade IMPL;
30
	static {
31
		IMPL = (PolytomousKeyListLabelProviderFacade)ImplementationLoader.newInstance(PolytomousKeyListLabelProviderFacade.class) ;
32
	}
33
	
34
	public static PolytomousKeyListLabelProviderFacade getInstance () {
35
		return (PolytomousKeyListLabelProviderFacade)IMPL.getInstanceInternal();
36
	}
37

    
38
	protected abstract Object getInstanceInternal();
39
	/* (non-Javadoc)
40
	 * @see eu.etaxonomy.taxeditor.singlesource.editor.key.polytomous.IPolytomousKeyListLabelProvider#update(org.eclipse.jface.viewers.ViewerCell)
41
	 */
42
	@Override
43
	public void update(ViewerCell cell) {
44
		IMPL.update(cell);
45
	}
46

    
47
	@Override
48
	public void addListener(ILabelProviderListener listener) {
49
		IMPL.addListener(listener);
50
	}
51

    
52
	@Override
53
	public void dispose() {
54
		IMPL.dispose();
55
	}
56

    
57
	@Override
58
	public boolean isLabelProperty(Object element, String property) {
59
		return IMPL.isLabelProperty(element, property);
60
	}
61

    
62
	@Override
63
	public void removeListener(ILabelProviderListener listener) {
64
		IMPL.removeListener(listener);
65
	}
66
}
    (1-1/1)