Bug 444 - Disable automated termination of NewtCanvasAWT on window close
Summary: Disable automated termination of NewtCanvasAWT on window close
Status: VERIFIED FIXED
Alias: None
Product: Newt
Classification: JogAmp
Component: awt (show other bugs)
Version: 1
Hardware: All all
: P4 normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2010-12-13 16:05 CET by Martin Karing
Modified: 2015-09-27 03:14 CEST (History)
0 users

See Also:
Type: FEATURE
SCM Refs:
2cbab63bd6c230d31b8ae6f1d794ad49bf23bb53
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Karing 2010-12-13 16:05:11 CET
The NewtCanvasAWT is automatically destroyed when the parent AWT frame fires a windowClosing event. This is in general a good behavior, yet in some cases a special when something like a "Really close?" window is implemented there must not be a event dispatched that destroys the context.

It should be possible to choose if that destruction event is dispatched automatically or not.
Comment 1 Sven Gothel 2010-12-19 06:57:35 CET
JOGL/NEWT: Introduce WindowClosingProtocol (solves Bug/Request 444)

Similar to JFrame's closing behavior,

the following components window closing follow the new WindowClosingProtocol:
   - GLCanvas
   - GLJPanel
   - NEWT Window, GLWindow
   - NEWT NewtCanvasAWT

The implementation obeys either
 1) the user value set by this interface,
 2) an underlying toolkit set user value (JFrame, ..)
 3) or it's default, eg. {@link #DO_NOTHING_ON_CLOSE DO_NOTHING_ON_CLOSE} within an AWT environment.

If none of the above determines the operation,
this protocol default behavior {@link #DISPOSE_ON_CLOSE DISPOSE_ON_CLOSE} shall be used.