summaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-05-02 01:20:46 +0200
committerSven Gothel <[email protected]>2012-05-02 01:20:46 +0200
commit935523a8c58efced1c0845bd60e08e2acb9e5aee (patch)
tree3719897e3c2804abff130e299858df7c09f84588 /src/test/com
parent969567663c08597c2c2effe6128f4810ec252513 (diff)
NEWT API Change 'WindowClosingProtocol': Use 'enum WindowClosingMode' instead of static final int values.
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java16
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java14
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java8
3 files changed, 19 insertions, 19 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java
index 63fcfa97f..d63f0d2a7 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java
@@ -36,7 +36,7 @@ import java.awt.Frame;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
-import javax.media.nativewindow.WindowClosingProtocol;
+import javax.media.nativewindow.WindowClosingProtocol.WindowClosingMode;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLProfile;
@@ -71,8 +71,8 @@ public class TestWindowClosingProtocol01AWT extends UITestCase {
//
// close with op: DO_NOTHING_ON_CLOSE -> NOP (default)
//
- int op = glCanvas.getDefaultCloseOperation();
- Assert.assertEquals(WindowClosingProtocol.DO_NOTHING_ON_CLOSE, op);
+ WindowClosingMode op = glCanvas.getDefaultCloseOperation();
+ Assert.assertEquals(WindowClosingMode.DO_NOTHING_ON_CLOSE, op);
Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, false)); // nop
Thread.sleep(100);
@@ -84,9 +84,9 @@ public class TestWindowClosingProtocol01AWT extends UITestCase {
//
// close with op (GLCanvas): DISPOSE_ON_CLOSE -> dispose
//
- glCanvas.setDefaultCloseOperation(WindowClosingProtocol.DISPOSE_ON_CLOSE);
+ glCanvas.setDefaultCloseOperation(WindowClosingMode.DISPOSE_ON_CLOSE);
op = glCanvas.getDefaultCloseOperation();
- Assert.assertEquals(WindowClosingProtocol.DISPOSE_ON_CLOSE, op);
+ Assert.assertEquals(WindowClosingMode.DISPOSE_ON_CLOSE, op);
Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, false)); // no frame close
Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, false));
@@ -123,8 +123,8 @@ public class TestWindowClosingProtocol01AWT extends UITestCase {
// close with op: DO_NOTHING_ON_CLOSE -> NOP / HIDE (default)
//
Assert.assertEquals(JFrame.HIDE_ON_CLOSE, frame.getDefaultCloseOperation());
- int op = glCanvas.getDefaultCloseOperation();
- Assert.assertEquals(WindowClosingProtocol.DO_NOTHING_ON_CLOSE, op);
+ WindowClosingMode op = glCanvas.getDefaultCloseOperation();
+ Assert.assertEquals(WindowClosingMode.DO_NOTHING_ON_CLOSE, op);
Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, false)); // nop
Thread.sleep(100);
@@ -145,7 +145,7 @@ public class TestWindowClosingProtocol01AWT extends UITestCase {
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
Assert.assertEquals(JFrame.DISPOSE_ON_CLOSE, frame.getDefaultCloseOperation());
op = glCanvas.getDefaultCloseOperation();
- Assert.assertEquals(WindowClosingProtocol.DISPOSE_ON_CLOSE, op);
+ Assert.assertEquals(WindowClosingMode.DISPOSE_ON_CLOSE, op);
Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, true));
Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, false));
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java
index b20e81805..1657fcbe9 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java
@@ -33,7 +33,7 @@ import java.lang.reflect.InvocationTargetException;
import org.junit.Test;
import org.junit.Assert;
-import javax.media.nativewindow.WindowClosingProtocol;
+import javax.media.nativewindow.WindowClosingProtocol.WindowClosingMode;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLProfile;
@@ -60,15 +60,15 @@ public class TestWindowClosingProtocol02NEWT extends UITestCase {
Assert.assertEquals(true, glWindow.isVisible());
// CHECK DEFAULT ..
- int op = glWindow.getDefaultCloseOperation();
- Assert.assertEquals(WindowClosingProtocol.DISPOSE_ON_CLOSE, op);
+ WindowClosingMode op = glWindow.getDefaultCloseOperation();
+ Assert.assertEquals(WindowClosingMode.DISPOSE_ON_CLOSE, op);
//
// close with op: DO_NOTHING_ON_CLOSE -> NOP
//
- glWindow.setDefaultCloseOperation(WindowClosingProtocol.DO_NOTHING_ON_CLOSE);
+ glWindow.setDefaultCloseOperation(WindowClosingMode.DO_NOTHING_ON_CLOSE);
op = glWindow.getDefaultCloseOperation();
- Assert.assertEquals(WindowClosingProtocol.DO_NOTHING_ON_CLOSE, op);
+ Assert.assertEquals(WindowClosingMode.DO_NOTHING_ON_CLOSE, op);
Assert.assertEquals(true, AWTRobotUtil.closeWindow(glWindow, false)); // nop
Assert.assertEquals(true, glWindow.isNativeValid());
@@ -78,9 +78,9 @@ public class TestWindowClosingProtocol02NEWT extends UITestCase {
//
// close with op (GLCanvas): DISPOSE_ON_CLOSE -> dispose
//
- glWindow.setDefaultCloseOperation(WindowClosingProtocol.DISPOSE_ON_CLOSE);
+ glWindow.setDefaultCloseOperation(WindowClosingMode.DISPOSE_ON_CLOSE);
op = glWindow.getDefaultCloseOperation();
- Assert.assertEquals(WindowClosingProtocol.DISPOSE_ON_CLOSE, op);
+ Assert.assertEquals(WindowClosingMode.DISPOSE_ON_CLOSE, op);
Assert.assertEquals(true, AWTRobotUtil.closeWindow(glWindow, true));
Assert.assertEquals(false, glWindow.isNativeValid());
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java
index 3b1acce6a..65068e9e8 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java
@@ -37,7 +37,7 @@ import java.lang.reflect.InvocationTargetException;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
-import javax.media.nativewindow.WindowClosingProtocol;
+import javax.media.nativewindow.WindowClosingProtocol.WindowClosingMode;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLProfile;
@@ -82,8 +82,8 @@ public class TestWindowClosingProtocol03NewtAWT extends UITestCase {
// close with op: DO_NOTHING_ON_CLOSE -> NOP / HIDE (default)
//
Assert.assertEquals(JFrame.HIDE_ON_CLOSE, frame.getDefaultCloseOperation());
- int op = newtCanvas.getDefaultCloseOperation();
- Assert.assertEquals(WindowClosingProtocol.DO_NOTHING_ON_CLOSE, op);
+ WindowClosingMode op = newtCanvas.getDefaultCloseOperation();
+ Assert.assertEquals(WindowClosingMode.DO_NOTHING_ON_CLOSE, op);
Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, false));
Assert.assertEquals(true, frame.isDisplayable());
@@ -108,7 +108,7 @@ public class TestWindowClosingProtocol03NewtAWT extends UITestCase {
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
Assert.assertEquals(JFrame.DISPOSE_ON_CLOSE, frame.getDefaultCloseOperation());
op = newtCanvas.getDefaultCloseOperation();
- Assert.assertEquals(WindowClosingProtocol.DISPOSE_ON_CLOSE, op);
+ Assert.assertEquals(WindowClosingMode.DISPOSE_ON_CLOSE, op);
Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, true));
Assert.assertEquals(false, frame.isDisplayable());