From 485f89a7563643525f11a50465d04e5107f2e0f8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 20 Sep 2014 02:52:27 +0200 Subject: TestGearsES2GLJPanelAWT: Update frame title (awt-size, pixel-size) for GLEventListener.reshape(..) --- .../junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/test/com') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java index 9841bb35e..ae11c9d54 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java @@ -36,8 +36,10 @@ import java.awt.event.ComponentListener; import java.lang.reflect.InvocationTargetException; import javax.media.nativewindow.ScalableSurface; +import javax.media.opengl.GLAutoDrawable; import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLCapabilitiesImmutable; +import javax.media.opengl.GLEventListener; import javax.media.opengl.GLProfile; import javax.media.opengl.awt.GLJPanel; import javax.swing.JFrame; @@ -137,6 +139,19 @@ public class TestGearsES2GLJPanelAWT extends UITestCase { } final SnapshotGLEventListener snap = new SnapshotGLEventListener(); glJPanel.addGLEventListener(snap); + glJPanel.addGLEventListener(new GLEventListener() { + @Override + public void init(final GLAutoDrawable drawable) { } + @Override + public void dispose(final GLAutoDrawable drawable) { } + @Override + public void display(final GLAutoDrawable drawable) { } + @Override + public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) { + setTitle(frame, glJPanel, caps); + } + + }); setTitle(frame, glJPanel, caps); frame.setLocation(xpos, ypos); -- cgit v1.2.3