From 935523a8c58efced1c0845bd60e08e2acb9e5aee Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 2 May 2012 01:20:46 +0200 Subject: NEWT API Change 'WindowClosingProtocol': Use 'enum WindowClosingMode' instead of static final int values. --- src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 5 +++-- src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/jogl') 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); } -- cgit v1.2.3