29package com.jogamp.opengl.test.junit.newt.event;
33import javax.swing.JFrame ;
34import javax.swing.SwingUtilities ;
35import javax.swing.WindowConstants ;
37import org.junit.AfterClass ;
38import org.junit.Assert;
39import org.junit.BeforeClass ;
40import org.junit.FixMethodOrder;
41import org.junit.runners.MethodSorters;
43import com.jogamp.nativewindow.swt.SWTAccessor;
45import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
46import com.jogamp.opengl.test.junit.util.AWTRobotUtil;
53@FixMethodOrder(MethodSorters.NAME_ASCENDING)
56 private static JFrame _testFrame ;
68 _testFrame =
new JFrame(
"Event Modifier Test AWTCanvas" ) ;
69 _testFrame.setDefaultCloseOperation( WindowConstants.EXIT_ON_CLOSE ) ;
71 SwingUtilities.invokeAndWait(
new Runnable() {
74 _testFrame.getContentPane().add( canvas ) ;
75 _testFrame.setBounds( TEST_FRAME_X, TEST_FRAME_Y, TEST_FRAME_WIDTH, TEST_FRAME_HEIGHT ) ;
76 _testFrame.setVisible(
true ) ;
84 Assert.assertNotNull(_robot);
92 SwingUtilities.invokeAndWait(
new Runnable() {
95 if(
null != _testFrame ) {
96 _testFrame.dispose() ;
104 public static void main(
final String args[])
throws Exception {
106 org.junit.runner.JUnitCore.
main( testName ) ;
synchronized AWTAdapter addTo(final java.awt.Component awtComponent)
Due to the fact that some NEWT com.jogamp.newt.event.NEWTEventListener are mapped to more than one ja...
A heavyweight AWT component which provides OpenGL rendering support.
void addGLEventListener(final GLEventListener listener)
Adds the given listener to the end of this drawable queue.
Test whether or not event modifiers are preserved by NEWT.
static void baseBeforeClass()
Must be called from subclass @BeforeClass code, allowing it to perform its specific initialization fi...
Test whether or not event modifiers are preserved by NEWT when the source is an AWT canvas.
static void main(final String args[])
static void beforeClass()
static void requestFocus(final Robot robot, final Object obj)
FIXME: AWTRobotUtil Cleanup: Use specific type for argument object.
static boolean waitForRealized(final java.awt.Component comp, final boolean realized, final Runnable waitAction)
static boolean waitForVisible(final java.awt.Component comp, final boolean visible, final Runnable waitAction)
static void assertRequestFocusAndWait(final Robot robot, final Object requestFocus, final Object waitForFocus, final FocusEventCountAdapter gain, final FocusEventCountAdapter lost)