Notified if a tab is renamed.

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

Notified if a tab is renamed.

Postby Andy Tipton » Thu Dec 13, 2007 10:27 am

Afternoon,

I have a mouse listener on the tab panel that pops up a menu, however, when a MouseEvent is fired, I want to know if the tab was renamed. Can I get that attribute?

Thank you,
artipton
Andy Tipton
 
Posts: 65
Joined: Wed Dec 05, 2007 2:41 pm

Postby JIDE Support » Thu Dec 13, 2007 10:32 am

Are you saying you want to know if a tab is renamed because of the tab editing feature provided by JideTabbedPane?

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby Andy Tipton » Thu Dec 13, 2007 11:33 am

Yes, that is correct. I need to know if it is renamed so I can set the object 'dirty' and know that it needs saved by the GUI.
Andy Tipton
 
Posts: 65
Joined: Wed Dec 05, 2007 2:41 pm

Postby JIDE Support » Thu Dec 13, 2007 11:35 am

We called setTitleAt method on JTabbedPane when title is changed. So I guess you can listen to property change on "indexForTitle" for it.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby Andy Tipton » Thu Dec 13, 2007 1:37 pm

I added a PropertyChangeListener, but no matter what action I perform (add/remove a tab or rename the tab) it is always the same property: "preferredSize". When you mention "indexForTitle" I assume you mean listen to this property... Is that correct?
Andy Tipton
 
Posts: 65
Joined: Wed Dec 05, 2007 2:41 pm

Postby JIDE Support » Thu Dec 13, 2007 1:48 pm

You put a breakpoint at JTabbedPane#setTitleAt and see if it gets called when tab editing stops. This is an event fired by JTabbedPane, not by us.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby Andy Tipton » Thu Dec 13, 2007 2:13 pm

Ah, ok... My mistake. I assumed I needed to put the listener on 'JideTabbedPaneUI'. It seems to bw working now...

Thank you again for your help... Not only is the product great, but you have great support to back it up.
Andy Tipton
 
Posts: 65
Joined: Wed Dec 05, 2007 2:41 pm


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 12 guests

cron