use of org.protege.editor.owl.ui.renderer.OWLAnnotationPropertyIcon in project protege-client by protegeproject.
the class OwlCellRenderer method getIcon.
@Override
protected Icon getIcon(Object object) {
if (object instanceof IRI) {
setHighlightKeywords(false);
IRI ontIri = editorKit.getOWLModelManager().getActiveOntology().getOntologyID().getOntologyIRI().get();
if (!object.equals(ontIri)) {
// IRI of OWLAnnotationSubject
return new OWLAnnotationPropertyIcon();
} else {
// IRI of ontology
return OWLIcons.getIcon(GuiUtils.ONTOLOGY_ICON_FILENAME);
}
} else if (object instanceof String) {
setHighlightKeywords(false);
return GuiUtils.getIcon(GuiUtils.STRING_ICON_FILENAME, 13, 13);
} else {
return editorKit.getWorkspace().getOWLIconProvider().getIcon((OWLObject) object);
}
}
Aggregations