Search in sources :

Example 1 with OWLAnnotationPropertyIcon

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);
    }
}
Also used : OWLObject(org.semanticweb.owlapi.model.OWLObject) IRI(org.semanticweb.owlapi.model.IRI) OWLAnnotationPropertyIcon(org.protege.editor.owl.ui.renderer.OWLAnnotationPropertyIcon)

Aggregations

OWLAnnotationPropertyIcon (org.protege.editor.owl.ui.renderer.OWLAnnotationPropertyIcon)1 IRI (org.semanticweb.owlapi.model.IRI)1 OWLObject (org.semanticweb.owlapi.model.OWLObject)1