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] Disable "delete class" item from menu

Tania Tudorache tudorache at stanford.edu
Fri Mar 21 11:23:38 PDT 2008


It should work.

If you send me the code, I can look at it.

Tania

robber82 at email.it wrote:
> Thanks, but It don't works :-(
> regards
>
> --------- Original Message --------
> Da: "User support for Core Protege and the Protege-Frames editor" 
> <protege-discussion at lists.stanford.edu>
> To: "User support for Core Protege and the Protege-Frames editor" 
> <protege-discussion at lists.stanford.edu>
> Oggetto: Re: [protege-discussion] Disable "delete class" item from menu
> Data: 20/03/08 21:21
>
>
>
> In MyClsesPanel class, override the method
>
> protected void updateDeleteActionState() {
> _deleteAction.setAllowed(false);
> }
>
> This will take care both of the delete button and the delete action from
> the context menu.
>
> Tania
>
>
>
> robber82 at email.it <mailto:robber82 at email.it> wrote:
> > Thank s, I would also disable or delete the "delete class" item in
> > "popup menu", not only in headers button. Can you help me?
> >
> > --------- Original Message --------
> > Da: "User support for Core Protege and the Protege-Frames editor"
> > <protege-discussion at lists.stanford.edu>
> > To: "User support for Core Protege and the Protege-Frames editor"
> > <protege-discussion at lists.stanford.edu>
> > Oggetto: Re: [protege-discussion] Disable "delete class" item from menu
> > Data: 18/03/08 22:27
> >
> >
> >
> > I don't recommend that you modify the code of the ClsesTab. Instead, I
> > suggest that you build your own Tab widget and that you reuse all the
> > components from the classes tab. In this way you can customize the UI
> > and the behavior of the tab in any way you like.
> >
> > You can start by subclassi ng edu.stanford.smi.protege.widget.ClsesTab,
> > e.g. let's say you call your class MyClsesTab. Then, you need to
> > override the method createClsesPanel() which creates the panel that
> > holds the classes tree and all the create and delete buttons. This
> > method should return a ClsesPanel.
> >
> > To remove or disable to delete button, subclass ClsesPanel, say
> > MyClsesPanel. The constructor of MyClsesPanel, should look like:
> >
> > public MyClsesPanel(Project project) {
> > super(project);
> > //this will remove the button with index 3 (the delete button)
> > _labeledComponent.removeHeaderButton(3);
> > }
> >
> > Going back to the MyClsesTab, the createClsesPanel() method should look
> > like:
> >
> > protected ClsesPanel createClsesPanel() {
> > MyClsesPanel panel = new MyClsesPanel(getProject());
> > panel.addSelectionListener(new SelectionListener() {
> > public v oid selectionChanged(SelectionEvent event) {
> > transmitSelection();
> > }
> > });
> > return panel;
> > }
> >
> > That's it. So, all you need to do is to override 2 methods the way that
> > I have described. You can also add more customization to your tab. To
> > enable your tab, go to Project ->Configure and select "MyClsesTab".
> >
> > We have more documentation on building plugins here:
> >
> > http://protege.stanford.edu/doc/dev.html
> >
> > Tania
> >
> >
> > robber82 at email.it <mailto:robber82 at email.it> 
> <mailto:robber82 at email.it> wrote:
> > >
> > > Hi, How can I disable or delete the "delete class " item from menu in
> > > "subclass Explorer"?
> > > Can you help me?
> > > Which class must I modify?
> > > regards* >
> > > ----
> > > Email.it, the professional e-mail, gratis per te: clicca qui
> > > <http://www.email.it/cgi-bin/start?sid=3>
> > >
> > > Sponsor:
> > > Scopri le tue passioni con Leonardo.it!
> > > Clicca qui 
> <http://adv.email.it/cgi-bin/foclick.cgi?mid=7614&d=20080317>
> > >
> > >
> > > ----
> > > Email.it, the professional e-mail, gratis per te: clicca qui
> > > <http://www.email.it/cgi-bin/start?sid=3>
> > >
> > > Sponsor:
> > > Scopri le tue passioni con Leonardo.it!
> > > Clicca qui 
> <http://adv.email.it/cgi-bin/foclick.cgi?mid=7613&d=20080317>
> > >
> > > 
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > protege-discussion mailing list
> > > protege-discussion at lists.stanford.edu 
> <mailto:protege-discussion at lists.stanford.edu>
> > <mailto:protege-discussion at lists.stanford.edu>
> > > https://mailman.stanford.edu/mailman/listinfo/protege-discussion
> > >
> > > Instructions for unsubscribing:
> > http://protege.stanford.edu/doc/faq.html#01a.03
> > >
> >
> > _______________________________________________
> > protege-discussion mailing list
> > protege-discussion at lists.stanford.edu 
> <mailto:protege-discussion at lists.stanford.edu>
> > <mailto:protege-discussion at lists.stanford.edu>
> > https://mailman.stanford.edu/mailman/listinfo/protege-discussion
> >
> > Instructions for unsubscribing:
> > http://protege.stanford.edu/doc/faq.html#01a.03
> > **
> > *
> >
> > *----
> > Email.it, the professional e-mail, gratis per te: clicca qui
> > <http://www.email.it/cgi-bin/start?sid=3>
> >
> > Sponsor:
> > Scopri le tue passioni con Leonardo.it!
> > Clicca qui <http://adv.email.it/cgi-bin/foclick.cgi?mid=7615&d=20080320>
> > *
> >
> > ** > *
> > ------------------------------------------------------------------------
> > *
> > _______________________________________________
> > protege-discussion mailing list
> > protege-discussion at lists.stanford.edu 
> <mailto:protege-discussion at lists.stanford.edu>
> > https://mailman.stanford.edu/mailman/listinfo/protege-discussion
> >
> > Instructions for unsubscribing: 
> http://protege.stanford.edu/doc/faq.html#01a.03
> > *
>
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu 
> <mailto:protege-discussion at lists.stanford.edu>
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: 
> http://protege.stanford.edu/doc/faq.html#01a.03
> **
> *
>
> *----
> Email.it, the professional e-mail, gratis per te: clicca qui 
> <http://www.email.it/cgi-bin/start?sid=3>
>
> Sponsor:
> Scopri le tue passioni con Leonardo.it!
> Clicca qui <http://adv.email.it/cgi-bin/foclick.cgi?mid=7653&d=20080321>
> *
>
> *
> *
> ------------------------------------------------------------------------
> *
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
> *




More information about the protege-discussion mailing list