Bug 1364

Summary: Add JavaFX Support for NEWT utilizing native Window parenting via NewtCanvasJFX
Product: [JogAmp] Newt Reporter: Sven Gothel <sgothel>
Component: javafxAssignee: Sven Gothel <sgothel>
Severity: critical CC: GMoubarak, rami.santina, Rayan
Priority: P1    
Version: 2.4.0   
Hardware: All   
OS: all   
a4ec6556f9ef3a409cceb9bfdb0d19dfc7d98d4a 46e0b6d774301056ff1691ddd92552f7972751e1 992432a0e2b5e1c510bee246bf4c3990f388c5ea f4b4716975148111335b9b9e6b2576bbadff160f c5979a9a4690eec57c1192c9cd5c842ced92fd21 ec329b2b7ec5459e47fc3ea562a9c80c904515dc c4cebae730496f95308ad7a9d01cabe2061d916e 5ae0eeca1a7031931d10c0db56539bf565ee9591 8a66defd3c2c96b05c8868d5edb604e3564ff66d
Workaround: ---
Bug Depends on: 1363    
Bug Blocks: 607, 1400    

Description Sven Gothel 2019-03-28 18:01:57 CET
Add JavaFX Support for NEWT utilizing native Window parenting via NewtCanvasJFX.

- NewtCanvasJFX shall be a JavaFX Canvas Node
- It shall allow attaching a native NEWT Window to the JavaFX Node's native Window (if attached).
The mechanism shall be similar to NewtCanvasAWT and NewtCanvasSWT.
Implementation shall support placing the NEWT Window
within the JavaFX scene of the native window correctly,
as well as support the following different lifecycles
- attach NewtCanvasJFX to already visible group->scene->window
- attach NewtCanvasJFX to not yet visible or attached group->scene->window
- attach NEWT Window before or after NewtCanvasJFX's visibility

The attached NEWT child window will be opaque on-top of the 
native root JavaFX window (or stage) - similar to NewtCanvasAWT when used within a Swing layout.
Comment 1 Sven Gothel 2019-03-28 18:03:00 CET
Support shall start with OpenJDK-8 and OpenJFX-8,
then later shall support OpenJDK-11 and OpenJFX-11 according to Bug 1363.
Comment 2 Sven Gothel 2019-03-28 18:10:08 CET
NewtCanvasJFX implementation has reached a well working stage already.

It is covered by unit test: TestNewtCanvasJFXGLn
This is the initial commit for JavaFX support and has been tested on
- OpenJDK 8 + OpenJFX 8
- GNU/Linux X11
- Windows


Note regarding JFXEDTUtil commit 8a66defd3c2c96b05c8868d5edb604e3564ff66d:

Utilize JFXEDTUtil per default, supporting the Windows Platform.
On [GNU/Linux] X11 JFXEDTUtil is not required, since X11 can handle multi-threaded native parenting,
however, the Windows platform does require JFXEDTUtil.
Currently the default is to use JFXEDTUtil, which operates solely on the JavaFX thread
for windowing lifecycle and even-dispatch operations.
This behavior can be toggled via the boolean property 'jogamp.newt.javafx.UseJFXEDT',
which currently defaults to 'true'
This behavior might be analyzed in more detail for a fine grained EDTUtil decision.
Comment 3 Sven Gothel 2019-11-30 18:16:33 CET
NewtCanvasJFX is completed working and as-is.

Further feature requests should be covered by new 'bug' entries here.