4 package eu
.etaxonomy
.taxeditor
.editor
.view
.concept
.graph
;
6 import org
.eclipse
.draw2d
.IFigure
;
7 import org
.eclipse
.draw2d
.Label
;
8 import org
.eclipse
.jface
.viewers
.LabelProvider
;
9 import org
.eclipse
.swt
.graphics
.Color
;
10 import org
.eclipse
.zest
.core
.viewers
.IEntityStyleProvider
;
12 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
13 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
14 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationship
;
15 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
21 public class ConceptGraphLabelProvider
extends LabelProvider
implements
22 IEntityStyleProvider
{
27 public String
getText(Object element
) {
28 if(element
instanceof Taxon
){
29 return ((Taxon
)element
).getTitleCache();
30 } else if( element
instanceof TaxonRelationship
) {
31 return ((TaxonRelationship
)element
).getType().getRepresentation(Language
.getLanguageFromUuid(Language
.uuidEnglish
)).getAbbreviatedLabel();
33 return "TODO"; //$NON-NLS-1$
37 public Color
getNodeHighlightColor(Object entity
) {
38 // TODO Auto-generated method stub
43 public Color
getBorderColor(Object entity
) {
44 // TODO Auto-generated method stub
49 public Color
getBorderHighlightColor(Object entity
) {
50 // TODO Auto-generated method stub
55 public int getBorderWidth(Object entity
) {
56 // TODO Auto-generated method stub
61 public Color
getBackgroundColour(Object entity
) {
62 // TODO Auto-generated method stub
67 public Color
getForegroundColour(Object entity
) {
68 // TODO Auto-generated method stub
73 public IFigure
getTooltip(Object element
) {
74 if( element
instanceof TaxonRelationship
) {
75 return new Label(((TaxonRelationship
)element
).getType().getRepresentation(CdmStore
.getDefaultLanguage()).getLabel());
81 public boolean fisheyeNode(Object entity
) {
82 // TODO Auto-generated method stub