change color of frames

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

change color of frames

lord_krotos
Hi!Is possible to change the color of frames visualized in the OwlClassesTab,or other tabs, using protege Api? I'm developing a tool for mapping ontologies and when a mapp is effettuated I need to change the color of the frames mapped to remember the user to not mapp that frames one more time.

lord_krotos

P.S Excuse for my bad english
Reply | Threaded
Open this post in threaded view
|

Re: change color of frames

Tania Tudorache
Hi Silvia,

I answered your email on the protege discussion list. The answer applies
also to OWL ontologies.

You can take a look at how the FrameRenderer is overriden in
edu.stanford.smi.protegex.owl.ui.matrix.NameMatrixColumn for a table
cell renderer:

  public TableCellRenderer getCellRenderer() {
        return new FrameRenderer() {
            public void load(Object value) {
                if (value instanceof RDFResource) {
                    RDFResource instance = (RDFResource) value;
                    setGrayedText(false);
                    addIcon(ProtegeUI.getIcon(instance));
                    addText(instance.getLocalName());
                }
                else {
                    super.load(value);
                }
            }
        };
    }

You can customize the icons, the "graying out" and the text of the class.

Tania


lord_krotos wrote:

>Hi!Is possible to change the color of frames visualized in the
>OwlClassesTab,or other tabs, using protege Api? I'm developing a tool for
>mapping ontologies and when a mapp is effettuated I need to change the color
>of the frames mapped to remember the user to not mapp that frames one more
>time.
>
>lord_krotos
>
>P.S Excuse for my bad english
>--
>View this message in context: http://www.nabble.com/change-color-of-frames-t1325028.html#a3535744
>Sent from the Protege - OWL forum at Nabble.com.
>
>-------------------------------------------------------------------------
>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>
>  
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html