[PATCH] 8088147: FXCanvas: implement custom cursors

Alexander Nyssen alexander at nyssen.org
Thu Jun 23 16:06:34 UTC 2016


I have worked on a first contribution related to JDK-8088147. Attached please find a patch (created in extended Git format) that comprises the related changes. I have augmented the implementation of javafx.embed.swt.SWTCursors to handle the image cursor case. I further adjusted javafx.scene.Scene to update the cursor frame (in addition to the cursor) within synchronizeSceneProperties, so the cursor is not cleared in the first pulse succeeding the cursor property change. 

I have added an automated JUnit test (SWTCursorsTest) to the swt module, as well as a manual test (SWTImageCursorTest) to the systemTests module, with which the proper behavior can be verified. As no tests for SWT existed so far, I updated the build.gradle and gradle.properties files to support an SWT_TEST option, which allows to handle them similar to Swing tests. I also added the respective SWT dependency to the systemTests module. Please note that the JUnit test can currently not be executed using Gradle on the Mac (where the manual test currently is the single option; the automated tests are disabled), because there SWT-based tests require the -XstartOnFirstThread option that is currently not supported by the Gradle test runner (see https://issues.gradle.org/browse/GRADLE-3290 for details). We would have to use an ant task as a workaround.


More information about the openjfx-dev mailing list