diff options
author | Sven Gothel <[email protected]> | 2012-05-02 01:20:46 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-05-02 01:20:46 +0200 |
commit | 935523a8c58efced1c0845bd60e08e2acb9e5aee (patch) | |
tree | 3719897e3c2804abff130e299858df7c09f84588 /src/jogl | |
parent | 969567663c08597c2c2effe6128f4810ec252513 (diff) |
NEWT API Change 'WindowClosingProtocol': Use 'enum WindowClosingMode' instead of static final int values.
Diffstat (limited to 'src/jogl')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 5 | ||||
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index ea191810e..a8d3c03a8 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -66,6 +66,7 @@ import javax.media.nativewindow.AbstractGraphicsScreen; import javax.media.nativewindow.GraphicsConfigurationFactory; import javax.media.nativewindow.NativeSurface; import javax.media.nativewindow.NativeWindowFactory; +import javax.media.nativewindow.WindowClosingProtocol.WindowClosingMode; import javax.media.opengl.GL; import javax.media.opengl.GLAnimatorControl; @@ -386,11 +387,11 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing return ( null != drawable ) ? drawable.isRealized() : false; } - public int getDefaultCloseOperation() { + public WindowClosingMode getDefaultCloseOperation() { return awtWindowClosingProtocol.getDefaultCloseOperation(); } - public int setDefaultCloseOperation(int op) { + public WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) { return awtWindowClosingProtocol.setDefaultCloseOperation(op); } diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index 5ca81a4b9..db3f189cb 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -60,6 +60,7 @@ import javax.swing.JPanel; import javax.media.nativewindow.WindowClosingProtocol; import javax.media.nativewindow.AbstractGraphicsDevice; import javax.media.nativewindow.NativeSurface; +import javax.media.nativewindow.WindowClosingProtocol.WindowClosingMode; import javax.media.opengl.DefaultGLCapabilitiesChooser; import javax.media.opengl.GL; @@ -596,11 +597,11 @@ public void reshape(int x, int y, int width, int height) { awtWindowClosingProtocol.addClosingListenerOneShot(); } - public int getDefaultCloseOperation() { + public WindowClosingMode getDefaultCloseOperation() { return awtWindowClosingProtocol.getDefaultCloseOperation(); } - public int setDefaultCloseOperation(int op) { + public WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) { return awtWindowClosingProtocol.setDefaultCloseOperation(op); } |