JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers Class Referenceabstract

Test whether or not event modifiers are preserved by NEWT. More...

Inheritance diagram for com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers:
Collaboration diagram for com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers:

Public Member Functions

void test01SingleButtonPressAndRelease () throws Exception
 
void test02SingleButtonPressAndReleaseWithShift () throws Exception
 
void test03SingleButtonPressAndReleaseWithCtrl () throws Exception
 
void test10HoldOneButtonAndPressAnother () throws Exception
 The META and ALT tests get too tied up with functions of the window system on X11, so it's probably best to leave them commented out. More...
 
void test20PressAllButtonsInSequence () throws Exception
 
void test30SingleButtonClickAndDrag () throws Exception
 
void eventDispatchedPostTestDelay () throws Exception
 
void clearKeyboadAndMouse () throws Exception
 
- Public Member Functions inherited from com.jogamp.opengl.test.junit.util.UITestCase
int getMaxTestNameLen ()
 
String getSnapshotFilename (final int sn, String postSNDetail, final GLCapabilitiesImmutable caps, final int width, final int height, final boolean sinkHasAlpha, String fileSuffix, final String destPath)
 
void snapshot (final int sn, final String postSNDetail, final GL gl, final GLReadBufferUtil readBufferUtil, final String fileSuffix, final String destPath)
 Takes a snapshot of the drawable's current front framebuffer. More...
 

Static Public Member Functions

static int getAWTButtonMask (final int button)
 
static void baseBeforeClass () throws Exception
 Must be called from subclass @BeforeClass code, allowing it to perform its specific initialization first. More...
 
- Static Public Member Functions inherited from com.jogamp.opengl.test.junit.util.UITestCase
static void setResetXRandRIfX11AfterClass ()
 
static int resetXRandRIfX11 ()
 Iterates through all outputs and sets the preferred mode and normal rotation using RandR 1.3. More...
 
static int processCommand (final String[] cmdline, final OutputStream outstream, final StringBuilder outstring, final String outPrefix)
 
static final void oneTimeSetUpUITest ()
 
static final void oneTimeTearDownUITest ()
 

Protected Member Functions

void eventDispatch ()
 

Static Protected Attributes

static final int TEST_FRAME_X = 100
 
static final int TEST_FRAME_Y = 100
 
static final int TEST_FRAME_WIDTH = 400
 
static final int TEST_FRAME_HEIGHT = 400
 
static final int INITIAL_MOUSE_X = TEST_FRAME_X + ( TEST_FRAME_WIDTH / 2 )
 
static final int INITIAL_MOUSE_Y = TEST_FRAME_Y + ( TEST_FRAME_HEIGHT / 2 )
 
static final int MS_ROBOT_KEY_PRESS_DELAY = 50
 
static final int MS_ROBOT_KEY_RELEASE_DELAY = 50
 
static final int MS_ROBOT_MOUSE_MOVE_DELAY = 200
 
static final int MS_ROBOT_AUTO_DELAY = 50
 
static final int MS_ROBOT_POST_TEST_DELAY = 100
 
static final boolean _debug = true
 
static final PrintStream _debugPrintStream = System.err
 
static java.awt.Robot _robot
 
static TestMouseListener _testMouseListener
 

Detailed Description

Test whether or not event modifiers are preserved by NEWT.

This class defines most of the tests, but leaves the type of window and canvas up to subclasses.

Definition at line 55 of file BaseNewtEventModifiers.java.

Member Function Documentation

◆ baseBeforeClass()

static void com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.baseBeforeClass ( ) throws Exception
static

Must be called from subclass @BeforeClass code, allowing it to perform its specific initialization first.

Exceptions
Exception

Definition at line 290 of file BaseNewtEventModifiers.java.

Here is the caller graph for this function:

◆ clearKeyboadAndMouse()

void com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.clearKeyboadAndMouse ( ) throws Exception

Definition at line 709 of file BaseNewtEventModifiers.java.

◆ eventDispatch()

void com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.eventDispatch ( )
protected

◆ eventDispatchedPostTestDelay()

void com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.eventDispatchedPostTestDelay ( ) throws Exception

Definition at line 702 of file BaseNewtEventModifiers.java.

◆ getAWTButtonMask()

static int com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.getAWTButtonMask ( final int  button)
static

Definition at line 272 of file BaseNewtEventModifiers.java.

◆ test01SingleButtonPressAndRelease()

void com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.test01SingleButtonPressAndRelease ( ) throws Exception

Definition at line 403 of file BaseNewtEventModifiers.java.

◆ test02SingleButtonPressAndReleaseWithShift()

void com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.test02SingleButtonPressAndReleaseWithShift ( ) throws Exception

Definition at line 414 of file BaseNewtEventModifiers.java.

◆ test03SingleButtonPressAndReleaseWithCtrl()

void com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.test03SingleButtonPressAndReleaseWithCtrl ( ) throws Exception

Definition at line 425 of file BaseNewtEventModifiers.java.

◆ test10HoldOneButtonAndPressAnother()

void com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.test10HoldOneButtonAndPressAnother ( ) throws Exception

The META and ALT tests get too tied up with functions of the window system on X11, so it's probably best to leave them commented out.

@Test(timeout=180000) // TO 3 min public void test04SingleButtonPressAndReleaseWithMeta() throws Exception { execOffThreadWithOnThreadEventDispatch(new Runnable() { public void run() { try { _doSingleButtonPressAndRelease( java.awt.event.KeyEvent.VK_META, java.awt.event.InputEvent.META_DOWN_MASK ) ; } catch (Exception e) { throw new RuntimeException(e); } } } ); }

@Test(timeout=180000) // TO 3 min public void test05SingleButtonPressAndReleaseWithAlt() throws Exception { execOffThreadWithOnThreadEventDispatch(new Runnable() { public void run() { try { _doSingleButtonPressAndRelease( java.awt.event.KeyEvent.VK_ALT, java.awt.event.InputEvent.ALT_DOWN_MASK ) ; } catch (Exception e) { throw new RuntimeException(e); } } } ); } FIXME - not sure yet what's up with ALT_GRAPH. It appears that this modifier didn't make it through, so I had to disable this test else it would always fail.

My US keyboard doesn't have an AltGr key, so maybe X is smart enough to not let this modifier slip through (?). @Test public void test06SingleButtonPressAndReleaseWithAltGraph() throws Exception { execOffThreadWithOnThreadEventDispatch(new Runnable() { public void run() { try { _doSingleButtonPressAndRelease( java.awt.event.KeyEvent.VK_ALT_GRAPH, java.awt.event.InputEvent.ALT_GRAPH_DOWN_MASK ) ; } catch (Exception e) { throw new RuntimeException(e); } } } ); }

Definition at line 479 of file BaseNewtEventModifiers.java.

◆ test20PressAllButtonsInSequence()

void com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.test20PressAllButtonsInSequence ( ) throws Exception

Definition at line 490 of file BaseNewtEventModifiers.java.

◆ test30SingleButtonClickAndDrag()

void com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.test30SingleButtonClickAndDrag ( ) throws Exception

Definition at line 501 of file BaseNewtEventModifiers.java.

Member Data Documentation

◆ _debug

final boolean com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers._debug = true
staticprotected

Definition at line 75 of file BaseNewtEventModifiers.java.

◆ _debugPrintStream

final PrintStream com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers._debugPrintStream = System.err
staticprotected

Definition at line 76 of file BaseNewtEventModifiers.java.

◆ _robot

java.awt.Robot com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers._robot
staticprotected

Definition at line 266 of file BaseNewtEventModifiers.java.

◆ _testMouseListener

TestMouseListener com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers._testMouseListener
staticprotected

Definition at line 268 of file BaseNewtEventModifiers.java.

◆ INITIAL_MOUSE_X

final int com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.INITIAL_MOUSE_X = TEST_FRAME_X + ( TEST_FRAME_WIDTH / 2 )
staticprotected

Definition at line 65 of file BaseNewtEventModifiers.java.

◆ INITIAL_MOUSE_Y

final int com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.INITIAL_MOUSE_Y = TEST_FRAME_Y + ( TEST_FRAME_HEIGHT / 2 )
staticprotected

Definition at line 66 of file BaseNewtEventModifiers.java.

◆ MS_ROBOT_AUTO_DELAY

final int com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.MS_ROBOT_AUTO_DELAY = 50
staticprotected

Definition at line 72 of file BaseNewtEventModifiers.java.

◆ MS_ROBOT_KEY_PRESS_DELAY

final int com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.MS_ROBOT_KEY_PRESS_DELAY = 50
staticprotected

Definition at line 68 of file BaseNewtEventModifiers.java.

◆ MS_ROBOT_KEY_RELEASE_DELAY

final int com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.MS_ROBOT_KEY_RELEASE_DELAY = 50
staticprotected

Definition at line 69 of file BaseNewtEventModifiers.java.

◆ MS_ROBOT_MOUSE_MOVE_DELAY

final int com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.MS_ROBOT_MOUSE_MOVE_DELAY = 200
staticprotected

Definition at line 70 of file BaseNewtEventModifiers.java.

◆ MS_ROBOT_POST_TEST_DELAY

final int com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.MS_ROBOT_POST_TEST_DELAY = 100
staticprotected

Definition at line 73 of file BaseNewtEventModifiers.java.

◆ TEST_FRAME_HEIGHT

final int com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.TEST_FRAME_HEIGHT = 400
staticprotected

Definition at line 63 of file BaseNewtEventModifiers.java.

◆ TEST_FRAME_WIDTH

final int com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.TEST_FRAME_WIDTH = 400
staticprotected

Definition at line 62 of file BaseNewtEventModifiers.java.

◆ TEST_FRAME_X

final int com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.TEST_FRAME_X = 100
staticprotected

Definition at line 59 of file BaseNewtEventModifiers.java.

◆ TEST_FRAME_Y

final int com.jogamp.opengl.test.junit.newt.event.BaseNewtEventModifiers.TEST_FRAME_Y = 100
staticprotected

Definition at line 60 of file BaseNewtEventModifiers.java.


The documentation for this class was generated from the following file: