aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup AWTRobotUtil ..: Add 'Runnable waitAction' also to waitForFocus and ↵Sven Gothel2019-04-101-4/+4
| | | | closeWindow, etc ..
* Cleanup AWTRobotUtil 2: Align signatures of waitForVisible(..) and ↵Sven Gothel2019-04-091-8/+8
| | | | waitForRealized(..)
* Cleanup AWTRobotUtil: Extract GLTestUtil + NewtTestUtil; all three based on ↵Sven Gothel2019-04-091-3/+4
| | | | TestUtil
* Bug 682 - Relocating javax.media.opengl.* -> com.jogamp.opengl.* (Part 1)Sven Gothel2015-02-021-4/+4
| | | | | | | | | sed -i 's/javax\.media\.opengl/com\.jogamp\.opengl/g' `grep -Rl "javax\.media\.opengl" src` sed -i 's/javax\.media\.nativewindow/com\.jogamp\.nativewindow/g' `grep -Rl "javax\.media\.nativewindow" src` sed -i 's/javax\/media\//com\/jogamp\//g' `grep -Rl "javax/media/" src` sed -i 's/javax\/media\//com\/jogamp\//g' `grep -Rl "javax/media/" doc` Manually edited all occurences within make/**
* Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-031-19/+18
| | | | | | | | | | | | | c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
* Add '@FixMethodOrder(MethodSorters.NAME_ASCENDING)' to all *Test* classes; ↵Sven Gothel2013-09-021-0/+3
| | | | | | | | Relying on junit 4.11 + hamcrest 1.2 (deployed in Gluegen junit.jar) See gluegen commits: - 10a28c860bd3f4ccecef156c9bbbc88087bf568d - 70c9ba258c5ba3d78f0f52faf37d88b4c62d0c96
* All AWT Related Unit Tests: Call AWT 'frame.setVisible(..)' and ↵Sven Gothel2013-02-281-7/+10
| | | | 'frame.pack()' on AWT-EDT - Use dedicated test TestBug572AWT for testing otherwise.
* Fix NEWT/AWT WindowClosing Unit Tests ; Review/Cleanup NEWT WindowClosing ↵Sven Gothel2013-02-281-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mechanism Due to a NEWT WindowClosing event regression cause by NewtCanvasAWT changes a review of our WindowClosing event mechanism was required. Important cleanups are marked w/ '(*)' below. I would have preferred to change the 'WindowListener.windowDestroyNotify(WindowEvent)' method to pass a WindowCloseEvent object exposing more information like toolkit or programmatic destruction and passing whether a 'closing' or 'nop' action will be performed based on the WindowClosingMode. For now I postponed this idea .. since it would change the API again, but may reconsider it after merging the Android 'closing' patch. - InputEvent.consumedTag -> NEWTEvent.consumedTag - Window - (*) Promote setWindowDestroyNotifyAction(Runnable) to public, former WindowImpl.setHandleDestroyNotify(boolean). Using a Runnable action for WindowImpl.windowDestroyNotify(boolean) allows a setting defined alternative for destroy() and gets rid of [ab]using WindowListener.windowDestroyNotify(WindowEvent) for lifecycle actions. Used in: - GLWindow - GLAutoDrawableDelegate impl. - WindowImpl - Respect NEWTEvent.consumedTag for WindowEvents as well - (*) Impl. setHandleDestroyNotify(boolean) (see above) - (*) destroy() simply sends out pre- and post- destruction Window events, where windowDestroyNotify(boolean) sends out the pre-destruction event if NOP. - (*) windowDestroyNotify(boolean) is public now, allowing other impl. details to follow proper destruction using handleDestroyNotify Runnable (-> NewtCanvasAWT). - AWTWindowClosingProtocol: - addClosingListenerOneShot() -> addClosingListener() - calling addClosingListener() at addNotify() - calling removeClosingListener() at removeNotify() - AWTWindowClosingProtocol ctor taking NOP runnable, allowing to send WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY at WindowClosingMode.DO_NOTHING_ON_CLOSE - add/remove listener on AWT-EDT - AWTWindowAdapter - Add 'removeWindowClosingFrom(..)', allowing to remove window closing event fwd. - Also fwd windowClosed in window closing fwd'ing. - NewtCanvasAWT - (*) Utilize AWTWindowClosingProtocol NOP runnable (see above) to fwd closing-NOP event to NEWT - (*) Unify remove/destroy code in destroyImpl(..) - !removeNotify -> destroy NEWT child programatic or as toolkit event - removeNotify || windowClosing -> destroy jawtWindow - (*) Remove AWTWindowAdapter/AWTParentWindowAdapter's windowClosingListener, since we utilize AWTWindowClosingProtocol - DisplayImpl - Adding 'final void dispatchMessage(final NEWTEvent event)' allowing to remove the NEWTEventTask wrapping for no reason in enqueueEvent(..) if on EDT and waiting.
* TestWindowClosingProtocol01AWT: More relaxed timing reducing false positivesSven Gothel2013-02-161-1/+9
|
* Fix TestWindowClosingProtocol01AWT: GLCanvas closing operation 'destroy' ↵Sven Gothel2013-02-161-1/+0
| | | | will no more call removeNotify() - see commit 3567e7e8519f82720f98b0b2ac30456cbfeddc0d
* NEWT API Change 'WindowClosingProtocol': Use 'enum WindowClosingMode' ↵Sven Gothel2012-05-021-8/+8
| | | | instead of static final int values.
* CrossTest: Add AWT Unit-Test. Unit-Tests: Refine GLProfile request where we ↵Sven Gothel2012-02-291-2/+2
| | | | favor a more detailed request than getDefault().
* Tests: AWT EDT: invokeLater(..) -> invokeAndWait(..) for a more predictable ↵Sven Gothel2011-10-231-4/+4
| | | | workflow
* Destruction of GLAutoDrawable shall not remove them from AnimatorControl ↵Sven Gothel2011-09-081-0/+2
| | | | | | | | | | | | | | | | | | | (due to recreation) ; NEWT/Window: Remove isValid() API entry - always true! Destruction of GLAutoDrawable shall not remove them from AnimatorControl (due to recreation) - Completes commit b65e1e76d413b70e5593173e6bd36d30675554a6 - WindowImpl: - volatile: windowHandle/visible fields (memeory sync critical) - destroy must set visible := false, to avoid immediate recreation via a display call of another thread, ie an animator. NEWT/Window: Remove isValid() API entry - always true! - NEWT/Window's can always be recreated. - redundancy in API is even worse than redundancy in impl. :)
* Tests: Exchange GL2, ES1 GLEventListener to ES2 - mobile test preparation.Sven Gothel2011-09-011-3/+4
|
* reloc test: demos.gl2.gears -> demos.gl2, etcSven Gothel2011-08-221-1/+1
|
* Fix WindowClosingProtocol test, using new AWTRobotUtilsSven Gothel2010-12-231-22/+27
|
* JOGL/NEWT: Introduce WindowClosingProtocol (solves Bug/Request 444)Sven Gothel2010-12-191-0/+155
Similar to JFrame's closing behavior, the following components window closing follow the new WindowClosingProtocol: - GLCanvas - GLJPanel - NEWT Window, GLWindow - NEWT NewtCanvasAWT The implementation obeys either 1) the user value set by this interface, 2) an underlying toolkit set user value (JFrame, ..) 3) or it's default, eg. {@link #DO_NOTHING_ON_CLOSE DO_NOTHING_ON_CLOSE} within an AWT environment. If none of the above determines the operation, this protocol default behavior {@link #DISPOSE_ON_CLOSE DISPOSE_ON_CLOSE} shall be used.