Re: Save/Discard/Cancel dialog when TopComponent is closed

Benno Markiewicz <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <CAA_aP4h50gO+5x3yyo4twCa5-hkMePB28u-t645qs3u3+7WSnQ@mail.gmail.com>
You should consider reading the book https://leanpub.com/nbp4beginners

In *7.1.6.4.2 *there is a topic about MultiView. In their working example
https://github.com/walternyland/nbp4beginners/blob/cc6cb21efb68e94a5dfe7430d5f1751281596c33/chapters/ch07/7.1.6.4.2/CarViewer/src/org/carsales/viewer/CarMultiView2.java
 CloseOperationState is used.

With kind regards, markiewb

2016-04-25 12:37 GMT+02:00 Paco Barrera <[email protected]>:

> Well, this is not exactly a TopComponent, but a MultiViewElement and it is
> required to return a CloseOperationState object.
>
> 2016-04-25 12:15 GMT+02:00 Paolo Repele <[email protected]>:
>
>> You need to override the method canClose or close of the TopComponent.
>>
>> On 25 April 2016 at 11:15, Paco Barrera <[email protected]> wrote:
>>
>>> I've implemented my custom Savable class for manage modifications of my
>>> objects and it works right when I close the application.
>>>
>>> I need the same behavior when I close the TopComponent, but I don't know
>>> how to achieve this.
>>>
>>> Can anybody help me?
>>> Thanks in advance.
>>>
>>>
>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Libre
>>> de virus. www.avast.com
>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
>>> <#m_3675922860825036234_m_7030598909200374094_m_-6237004797605006001_m_7144030427174528219_DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>>
>>
>>
>>
>> --
>> Non hai veramente capito qualcosa fino a quando non sei in grado di
>> spiegarlo a tua nonna. (A.Einstein)
>>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.