1
|
/**
|
2
|
*
|
3
|
*/
|
4
|
package eu.etaxonomy.taxeditor.editor.key.polytomous;
|
5
|
|
6
|
import org.eclipse.jface.viewers.IBaseLabelProvider;
|
7
|
import org.eclipse.jface.viewers.IContentProvider;
|
8
|
|
9
|
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
|
10
|
import eu.etaxonomy.cdm.model.description.PolytomousKey;
|
11
|
import eu.etaxonomy.taxeditor.editor.key.AbstractGraphKeyEditor;
|
12
|
import eu.etaxonomy.taxeditor.editor.key.KeyEditor;
|
13
|
|
14
|
/**
|
15
|
* @author n.hoffmann
|
16
|
*
|
17
|
*/
|
18
|
public class PolytomousKeyGraphEditor extends
|
19
|
AbstractGraphKeyEditor<PolytomousKey> implements
|
20
|
IPolytomousKeyEditorPage {
|
21
|
|
22
|
public static final String ID = "eu.etaxonomy.taxeditor.editor.key.polytomous.graph"; //$NON-NLS-1$
|
23
|
private final KeyEditor editor;
|
24
|
|
25
|
/**
|
26
|
* @param keyEditor
|
27
|
*/
|
28
|
public PolytomousKeyGraphEditor(KeyEditor editor) {
|
29
|
this.editor = editor;
|
30
|
}
|
31
|
|
32
|
@Override
|
33
|
public ConversationHolder getConversationHolder() {
|
34
|
return ((PolytomousKeyEditorInput) getEditorInput())
|
35
|
.getConversationHolder();
|
36
|
}
|
37
|
|
38
|
@Override
|
39
|
public PolytomousKey getKey() {
|
40
|
return ((PolytomousKeyEditorInput) getEditorInput()).getKey();
|
41
|
}
|
42
|
|
43
|
@Override
|
44
|
protected IBaseLabelProvider getLabelProvider() {
|
45
|
return new PolytomousKeyLabelProvider();
|
46
|
}
|
47
|
|
48
|
@Override
|
49
|
protected IContentProvider getContentProvider() {
|
50
|
return new PolytomousKeyGraphContentProvider();
|
51
|
}
|
52
|
}
|