Jogamp
JOGL/NEWT: Introduce WindowClosingProtocol (solves Bug/Request 444)
authorSven Gothel <sgothel@jausoft.com>
Sun, 19 Dec 2010 13:54:08 +0000 (14:54 +0100)
committerSven Gothel <sgothel@jausoft.com>
Sun, 19 Dec 2010 13:54:08 +0000 (14:54 +0100)
commit2cbab63bd6c230d31b8ae6f1d794ad49bf23bb53
tree9da105f466b81424ae089e59e4bd67fce7c32d54
parent2323c30c23b6f9eb7d7ccf94e6cdcbcb3d2f34a6
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.
21 files changed:
make/build-test.xml
make/scripts/tests.sh
src/jogl/classes/com/jogamp/opengl/impl/awt/AWTUtil.java
src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
src/nativewindow/classes/com/jogamp/nativewindow/impl/awt/AWTMisc.java [new file with mode: 0644]
src/nativewindow/classes/com/jogamp/nativewindow/impl/jawt/JAWTUtil.java
src/nativewindow/classes/javax/media/nativewindow/WindowClosingProtocol.java [new file with mode: 0644]
src/nativewindow/classes/javax/media/nativewindow/awt/AWTWindowClosingProtocol.java [new file with mode: 0644]
src/newt/classes/com/jogamp/newt/Window.java
src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
src/newt/classes/com/jogamp/newt/impl/WindowImpl.java
src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
src/test/com/jogamp/newt/impl/WindowImplAccess.java [new file with mode: 0644]
src/test/com/jogamp/opengl/test/junit/newt/TestCloseNewtAWT.java
src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java
src/test/com/jogamp/opengl/test/junit/newt/TestRemoteWindow01NEWT.java
src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java [new file with mode: 0644]
src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java [new file with mode: 0644]
src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java [new file with mode: 0644]
src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
http://JogAmp.org git info: FAQ, tutorial and man pages.