This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 42593

Summary: New SPI to handle closing of MultiView components
Product: platform Reporter: Milos Kleint <mkleint>
Component: Window SystemAssignee: apireviews <apireviews>
Status: CLOSED FIXED    
Severity: blocker Keywords: API, API_REVIEW_FAST
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 41190    
Attachments: api diffs

Description Milos Kleint 2004-04-29 06:51:03 UTC
New SPI addition is required to correctly handle
closing of MutiView components.
The current TopComponent canClose() semantics
assumes that the component will resolve the state
and show a dialog to the user if the in unsafe state.
New SPI was added to delegate correctly to the
inner elements.
1. Each MVElement is asked about it's state. (it
returns an instance of CloseOperationState newly
added class)
2. if everything is ok, the component can be
closed, if not resolution handling delegated to an
instance of CloseOperationHandler. Any ui is shown
there.

The CloseOperationHandler is passed to the
multiview component at creation time in the
factory. the state object instances are also
created by the factory.
Comment 1 Milos Kleint 2004-04-29 06:54:07 UTC
Created attachment 14610 [details]
api diffs
Comment 2 Jaroslav Tulach 2004-04-29 07:44:10 UTC
the string constant in COS should not be there. The factory method
could be in COS or at least linked from COS javadoc otherwise people
will not find it.
Comment 3 Milos Kleint 2004-04-29 08:21:09 UTC
done.
Comment 4 Milos Kleint 2004-05-04 10:09:44 UTC
done.
Comment 5 Marian Mirilovic 2005-12-20 15:49:01 UTC
This issue was solved long time ago. Because nobody has reopened it neither
added comments, we are verifying/closing it now. 
If you are still able to reproduce the problem, please reopen. Thanks in advance.