Re: Save/Discard/Cancel dialog when TopComponent is closed
Paco Barrera <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <CAFS-qL=OGY61i5a2OKGcb=TZX+5rsqouHLyr71dT8Es3sh5sSQ@mail.gmail.com> |
I read it this book, but in this case I don't want to return a CloseOperationState.STATE_OK object. I solve it implementing the actions to execute inside the MultiViewFactory.createUnsafeCloseState when it's needed some alternatives. Thanks for your responses. 2016-04-25 21:56 GMT+02:00 Benno Markiewicz <[email protected] >: > 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_-652852641775122339_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) >>> >> >> >