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
How it is possible to change the color of a frame or insert a little icon or sign near it?I have loaded the KnowledgeBase in a ClsesPanel and I Know the name of the frame selected.

Silvia

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

Re: change color of frames

Tania Tudorache

Silvia,

it is possible to change the display of all frames in Protege. All
rendering of frames (classes, slots, facets, instances) is controlled by
the
edu.stanford.smi.protege.ui.FrameRenderer

You can create your own FrameRenderer by extending the default one. In
order to attach the renderer to a tree for example, you call (like in
du.stanford.smi.protege.ui.SubclassPane):

getTree().setCellRenderer(FrameRenderer.createInstance());

If you extend the renderer, you can only override the "load" methods.
For example, for chaning the display of classes you override the
"loadCls" method.

Tania

lord_krotos wrote:

>How it is possible to change the color of a frame or insert a little icon or
>sign near it?I have loaded the KnowledgeBase in a ClsesPanel and I Know the
>name of the frame selected.
>
>Silvia
>
>P.S
>excuse my bad english.
>--
>View this message in context: http://www.nabble.com/change-color-of-frames-t1318932.html#a3517472
>Sent from the Protege - General 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