summaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-05-27 00:05:17 +0200
committerSven Gothel <[email protected]>2014-05-27 00:05:17 +0200
commitd149c554b453c86a880a4f0595bb8e340c80d041 (patch)
tree4b8cea3fdc7953a61aaf1f6987dfc429dac2a3cd /src/test/com/jogamp/opengl
parent8093767535b00f785fe89513ce43b02c97e267a5 (diff)
Bug 741 HiDPI: [Core API Change] Bring back get[Width|Height]() in NativeWindow, i.e. getWindow[Width|Height]() -> get[Width|Height]()
We have distinguished pixel- and window units in commit f9a00b91dcd146c72a50237b62270f33bd0da98e and introduced NativeWindow.getWindow[Width|Height]() and NativeSurface.getSurface[Width|Height](). To have a unique naming scheme, we could rename all method using 'Window', but for simplicity and since there will be no 'semantic override' just use the simple version.
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01dNEWT.java8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java4
4 files changed, 14 insertions, 14 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java
index 082a900a0..02ea610d8 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java
@@ -80,8 +80,8 @@ public class TestWindows01NEWT extends UITestCase {
Assert.assertEquals(true,screen.isNativeValid());
Assert.assertEquals(true,window.isVisible());
Assert.assertEquals(true,window.isNativeValid());
- Assert.assertEquals(width, window.getWindowWidth());
- Assert.assertEquals(height, window.getWindowHeight());
+ Assert.assertEquals(width, window.getWidth());
+ Assert.assertEquals(height, window.getHeight());
/** we don't sync on position - unreliable test
Point p0 = window.getLocationOnScreen(null);
@@ -152,8 +152,8 @@ public class TestWindows01NEWT extends UITestCase {
window.setVisible(true);
Assert.assertEquals(true,window.isNativeValid());
Assert.assertEquals(true,window.isVisible());
- Assert.assertEquals(width, window.getWindowWidth());
- Assert.assertEquals(height, window.getWindowHeight());
+ Assert.assertEquals(width, window.getWidth());
+ Assert.assertEquals(height, window.getHeight());
destroyWindow(window, true);
}
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01dNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01dNEWT.java
index d03306c4f..2f86d120d 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01dNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01dNEWT.java
@@ -163,8 +163,8 @@ public class TestScreenMode01dNEWT extends UITestCase {
final MonitorDevice monitor = window.getMainMonitor();
Assert.assertEquals(false, window.isFullscreen());
- Assert.assertEquals(width, window.getWindowWidth());
- Assert.assertEquals(height, window.getWindowHeight());
+ Assert.assertEquals(width, window.getWidth());
+ Assert.assertEquals(height, window.getHeight());
window.setFullscreen(true);
Assert.assertEquals(true, window.isFullscreen());
@@ -175,8 +175,8 @@ public class TestScreenMode01dNEWT extends UITestCase {
window.setFullscreen(false);
Assert.assertEquals(false, window.isFullscreen());
- Assert.assertEquals(width, window.getWindowWidth());
- Assert.assertEquals(height, window.getWindowHeight());
+ Assert.assertEquals(width, window.getWidth());
+ Assert.assertEquals(height, window.getHeight());
Thread.sleep(waitTimeShort);
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java
index a02a0bac7..9f56ecdbf 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java
@@ -110,8 +110,8 @@ public class TestParenting02NEWT extends UITestCase {
GLWindow glWindow1 = GLWindow.create(window1);
Assert.assertNotNull(glWindow1);
glWindow1.setSize(width, height);
- Assert.assertEquals(width,glWindow1.getWindowWidth());
- Assert.assertEquals(height,glWindow1.getWindowHeight());
+ Assert.assertEquals(width,glWindow1.getWidth());
+ Assert.assertEquals(height,glWindow1.getHeight());
glWindow1.setTitle("test01NewtOnNewtParentChildDraw - PARENT");
glWindow1.setPosition(x,y);
//glWindow1.addKeyListener(new TraceKeyAdapter(new KeyAction(eventFifo)));
@@ -134,7 +134,7 @@ public class TestParenting02NEWT extends UITestCase {
//Assert.assertEquals(width/2,glWindow2.getWidth());
//Assert.assertEquals(height/2,glWindow2.getHeight());
glWindow2.setTitle("test01NewtOnNewtParentChildDraw - CHILD");
- glWindow2.setPosition(glWindow1.getWindowWidth()/2, glWindow1.getWindowHeight()/2);
+ glWindow2.setPosition(glWindow1.getWidth()/2, glWindow1.getHeight()/2);
//glWindow2.addKeyListener(new TraceKeyAdapter(new KeyAction(eventFifo)));
//glWindow2.addWindowListener(new TraceWindowAdapter(new WindowAction(eventFifo)));
// glWindow2.addMouseListener(new TraceMouseAdapter());
@@ -163,7 +163,7 @@ public class TestParenting02NEWT extends UITestCase {
x += 1;
y += 1;
// glWindow1.setPosition(x,y);
- glWindow2.setPosition(glWindow1.getWindowWidth()/2,glWindow1.getWindowHeight()/2-y);
+ glWindow2.setPosition(glWindow1.getWidth()/2,glWindow1.getHeight()/2-y);
Thread.sleep(step);
while( null != ( event = eventFifo.get() ) ) {
diff --git a/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java b/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
index a9fc53eec..aa9611c6f 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
@@ -137,9 +137,9 @@ public class AWTRobotUtil {
javax.media.nativewindow.util.Point p0 = win.getLocationOnScreen(null);
if( onTitleBarIfWindow ) {
javax.media.nativewindow.util.InsetsImmutable insets = win.getInsets();
- p0.translate(win.getWindowWidth()/2, insets.getTopHeight()/2);
+ p0.translate(win.getWidth()/2, insets.getTopHeight()/2);
} else {
- p0.translate(win.getWindowWidth()/2, win.getWindowHeight()/2);
+ p0.translate(win.getWidth()/2, win.getHeight()/2);
}
return new int[] { p0.getX(), p0.getY() };
}