p2izing the editor
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor.prototype1 / src / eu / etaxonomy / taxeditor / prototype1 / model / NameEditorInput.java
1 package eu.etaxonomy.taxeditor.prototype1.model;
2
3 import org.eclipse.jface.resource.ImageDescriptor;
4 import org.eclipse.ui.IEditorInput;
5 import org.eclipse.ui.IPersistableElement;
6 import eu.etaxonomy.cdm.model.name.TaxonName;
7
8 public class NameEditorInput implements IEditorInput {
9
10 private TaxonName taxonname;
11
12 public NameEditorInput (TaxonName taxonname) {
13 this.taxonname = taxonname;
14 }
15
16 public boolean exists() {
17 // TODO Auto-generated method stub
18 return false;
19 }
20
21 public ImageDescriptor getImageDescriptor() {
22 // TODO Auto-generated method stub
23 return null;
24 }
25
26 public String getName() {
27 return taxonname.getName();
28 }
29
30 public IPersistableElement getPersistable() {
31 // TODO Auto-generated method stub
32 return null;
33 }
34
35 public String getToolTipText() {
36 return taxonname.getName();
37 }
38
39 public Object getAdapter(Class adapter) {
40
41 if (adapter == TaxonName.class) {
42 return this.taxonname;
43 }
44
45 return null;
46 }
47
48 }