Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] Updating slot widgets

Tania Tudorache tudorache at
Fri Oct 12 12:06:58 PDT 2007


When you say that the buttons of the slot widget should be changed when 
doing something in the main window, you mean the buttons of all slot 
widgets attached to any class in the ontology, or only the buttons of 
the slot widget of the current class?

I would do the logic for the update the other way round: the slot widget 
can have a listener on the checkbox in the main window and change the 
buttons when the checkbox is selected/deselected. At initialization of 
the slot widget you can read the value of the checkbox and initialize 
the buttons accordingly. In the dispose method of the slot widget, do 
not forget to detach the listener to the checkbox, otherwise you may 
cause a memory leak.


daniel.goergen at wrote:
> Hi!
> I am developing a slot widget whose buttons should change when a 
> checkbox in the main windows menu gets clicked.
> After clicking the checkbox I run the following:
>       Collection<Cls> clses = p.getKnowledgeBase().getClses();         
>       *for* (Cls cls : clses)
>         {
>                  p.postFormChangeEvent(cls);
>         }
> where p is the Project
> This takes kinda long if you have many classes but without doing that 
> I have to change the class back and again to achieve the change of the 
> buttons in the instance form.
> Maybe it would be nicer only to update the currently viewed instances 
> if there is a way to do that.
> Another problem is that after calling the code above the widget 
> buttons change in the instances tab but not in the forms tab.
> Anybody has an idea why this happens?
> Mit freundlichen Grüßen
> Kind regards,
> i. A. Daniel Goergen
> Therapy Manager
> --
> Woermannkehre 1    
> 12359 Berlin, Germany    
> Tel.: +49 (0) 30 68905-2418
> Fax: +49 (0) 30 68905-2940  
> Mail: daniel.goergen at
> *********************************************************************************
> Woermannkehre 1, 12359 Berlin, Germany
> Sitz der Gesellschaft: Berlin, Registergericht: Berlin HRA 6501
> Vertreten durch ihre Komplementaerin:
> BIOTRONIK Mess- und Therapiegeraete GmbH
> Sitz der Gesellschaft: Berlin, Registergericht: Berlin HRB 2918
> Geschaeftsfuehrer: Dr. Max Schaldach, Christoph Boehmer, Dr. Werner 
> Braun, Dr. Lothar Krings
> *********************************************************************************
> This email and the information it contains including attachments are 
> confidential and meant
> only for use by the intended recipient(s); disclosure or copying is 
> strictly prohibited. If you are
> not addressed, but in the possession of this email, please notify the 
> sender immediately.
> ------------------------------------------------------------------------
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at
> Instructions for unsubscribing: 

More information about the protege-discussion mailing list