JavaFX 9 & FXCanvas

Kevin Rushforth kevin.rushforth at
Tue Jun 14 21:00:18 UTC 2016


As far as we know, FXCanvas is now usable in an OSGi context with JDK 9 
+ Jigsaw, so you should be able to test this with the latest JDK 9 early 
access build.

You mentioned that the following bugs are critical for you: (properly forward 
consumption state of key events) (properly forward touch 
gestures) (custom cursors)

There is still time to fix bugs for JDK 9, but I none of the above are 
currently targeted for 9, and it seems unlikely that they will make it. 
Would you be interested in contributing fixes for these bugs? If so, 
then please check the following OpenJDK Wiki page [1].

You also mentioned the following RFE: (API to access current 
mouse pointer location)

There is a vanishingly small amount of time to add replacement API for 
internal methods that will be hidden by the module system. It would need 
to be a simple, well-defined API and we need good justification to do 
this. Is the above needed as part of your workarounds for the three bugs 
mentioned earlier or is there some other reason that you need this?

-- Kevin


Alexander Nyßen wrote:
> The Eclipse Graphical Editing Framework (GEF) project as well as other Eclipse project rely on the JavaFX-SWT-integration that is realized through FXCanvas.
> We at GEF, however, do not use it out-of-the-box but have created a subclass ( <>) to properly handle forwarding of touch gesture events ( <>) through an internal delegate ( <>), and to add support for image cursors ( <>). Unfortunately, both fixes provided by us require access to internal API and will thus - AFAIK - no longer work with Jigsaw. Forwarding of SWT key events' consumption state ( <>) is a related issue, for which a workaround in client code would require access to internal API, too.
> By following this list, I got the impression that it is not completely clear yet, if and how the JavaFX-SWT-integration will be usable in an OSGi context with Jigsaw, so let me at least point out that this is quite essential to us. And while <> is being marked as only „nice-to-have“, at least for us this is not the case, as an Eclipse-integrated graphical application that does not support modern touch devices will not really be acceptable. As such, let me ask whether there is a chance we can get this functionality migrated to FXCanvas as part of JavaFX 9. I would like to support this as far as I can.
> Last, I would like to point out that the unavailability of a public API to retrieve the current mouse pointer location ( <>) will definitely become a blocker in case the only workaround (via will no longer work because of Jigsaw. Please consider to include a public API for this within JavaFX 9, even if the related Glass Robot API ( <>) will not be offered yet.
> Regards,
> Alexander

More information about the openjfx-dev mailing list