JDK-8090763 : FX Robot API
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: scenegraph
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2011-10-24
  • Updated: 2018-08-20
  • Resolved: 2018-07-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx11Fixed
Related Reports
CSR :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
AWT provides a public Robot API, but to get it to work with JavaFX (on Mac at least) requires some hacks / internal system properties.

Glass does provide Robot functionality, but there is no public API for it.

It would be nice to provide a public API for Glass's Robot functionality so external developers don't have to hack AWT Robot to work in JavaFX.

Comments
Here is the list of follow-on issues, organized by importance and current targeted fix version. openjfx11 ------------ JDK-8207372 : Robot.mouseWheel not implemented correctly on Windows, Mac JDK-8207374 : FX Robot should pass float or double down to the native code JDK-8207377 : Verify/document the implementation of Robot::getPixelColor with high DPI screens JDK-8207379 : Robot screen capture test fails with HiDPI at some screen locations JDK-8207370 : Several Monocle robot tests fail because of deprecated assertEquals calls openjfx12 ------------ JDK-8207378 : Update tests in openjfx/jfx-dev/tests repo for new Robot API (*) JDK-8207373 : Need to dispose native Robot objects to avoid resource leak JDK-8207369 : Add more FX Robot API tests (*) the tests in openjfx/jfx-dev/tests are not routinely built or run, which is why it is OK to defer JDK-8207378, even though it is a P2 bug tbd_major ------------ JDK-8207375 : Robot::getScreenCapture could use PixelWriter::setPixels for performance
18-07-2018

I filed several follow-on issues, which are now linked and can be evaluated.
17-07-2018

As part of the review, several follow-up issues need to be filed. I will link them to this bug.
09-07-2018

Changeset: 30186c02bc22 Author: kcr Date: 2018-07-09 15:58 -0700 URL: http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/30186c02bc22 8090763: FX Robot API Reviewed-by: kcr, serb Contributed-by: mike.ennen@gmail.com
09-07-2018

This work is being reviewed on the GitHub sandbox. Pull request: https://github.com/javafxports/openjdk-jfx/pull/36
18-05-2018

This is out of scope for JDK 9, but we can consider it for a future release.
29-03-2016

The Glass Robot (com.sun.glass.ui.Robot, Application.createRobot()) is fully functional. The public API in FX should be provided by Scenegraph or Graphics teams.
03-11-2011