-
Oct 9th, 2006, 03:48 AM
#1
MDI Detecting the Close X on internal Frame
Hi All,
This may be a question for Peter, I am using the MDI DesktopMdiApplicationWindowFactory
is there an official way to detect when the cross "X" button is pressed on an internal frame? At the moment, it seems to simply hide the window, I'd like to be able to detect this, warn the user (if model changed) and DISPOSE of it if confirmed.
Any suggestion would be welcomed!
Many thanks
Benoit
-
Oct 9th, 2006, 08:03 AM
#2
-
Oct 9th, 2006, 08:21 AM
#3
Thanks. It does
But this seems to point to an "issue" in Spring RC.
By issue, I mean the lack of support for this and the inability to pass the event to the view that has the model to detect whether or not it should be removed...
Your solution require a change in Spring RC, in DesktopPageComponentPane from the mdi package I believe. It would be nice if the Component Pane could call a method on the pagecomponent to say "about to close" and have the ability to override it.
I have raised this on JIRA
http://opensource.atlassian.com/proj...browse/RCP-414
Thanks
Benoit
-
Oct 23rd, 2006, 05:44 AM
#4
This has been fixed.
You can override the "boolean canClose()" method in your view, and return true or false. If you return false, the view will stay open.
Peter
Edit/Delete Message
-
Oct 23rd, 2006, 05:44 PM
#5
Perfect! Works great!
Thanks Peter.
Benoit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules