Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8088147

[SWT] FXCanvas: implement custom cursors

    Details

      Description

      Custom cursors are currently not supported in FXCanvas. Corresponding code is commented out in SWTCursors.
      1. JDK-8088147.patch
        18 kB
        Kevin Rushforth
      2. JDK-8088147.revised.27-07-16.patch
        18 kB
        Kevin Rushforth
      3. JDK-8088147.revised.27-07-16.patch
        18 kB
        Kevin Rushforth
      4. JDK-8088147.revised.patch
        18 kB
        Guru Hb

        Activity

        Hide
        kcr Kevin Rushforth added a comment -
        The following description of the fix was copied from the latest (27-07-16) attached patch:

        - Augmented implementation of SWTCursorsTest to handle image cursors properly.
        - Ensured PlatformImpl exposes com.sun.javafx.tk to swt, as this is required to convert the cursor frame platform image to an javafx image.
        - Ensured cursor frame is updated when synchronizing scene properties, so it does not get overwritten.
        - Added an automated JUnit test (SWTCursorsTest), which is currently not executed on Mac (because -XstartOnFirstThread is not supported by Gradle test runner) and disabled for jigsaw tests (as SWT is no named module yet).
        - Added SWT_TEST option to build.gradle, which is only evaluated when FULL_TEST is enabled.
        - Enhanced gradle.properties.template to provide SWT_TEST property.
        - Added a manual test class (SWTImageCursorTest) that can be used to validate the cursor change.
        Show
        kcr Kevin Rushforth added a comment - The following description of the fix was copied from the latest (27-07-16) attached patch: - Augmented implementation of SWTCursorsTest to handle image cursors properly. - Ensured PlatformImpl exposes com.sun.javafx.tk to swt, as this is required to convert the cursor frame platform image to an javafx image. - Ensured cursor frame is updated when synchronizing scene properties, so it does not get overwritten. - Added an automated JUnit test (SWTCursorsTest), which is currently not executed on Mac (because -XstartOnFirstThread is not supported by Gradle test runner) and disabled for jigsaw tests (as SWT is no named module yet). - Added SWT_TEST option to build.gradle, which is only evaluated when FULL_TEST is enabled. - Enhanced gradle.properties.template to provide SWT_TEST property. - Added a manual test class (SWTImageCursorTest) that can be used to validate the cursor change.
        Hide
        kcr Kevin Rushforth added a comment -
        All my testing looks good. The latest patch, 27-07-16, looks good.

        +1
        Show
        kcr Kevin Rushforth added a comment - All my testing looks good. The latest patch, 27-07-16, looks good. +1
        Hide
        kcr Kevin Rushforth added a comment -
        The following is just FYI for the future, since I will format the changeset comment per the OpenJDK requirements listed here:

        http://openjdk.java.net/guide/producingChangeset.html

        1. The first line must start with the 7-digit bug ID without the 'JDK-' prefix, followed by a colon and a space. The rest of the text should match the title of the bug.

        2. There is an optional single-line summary line with the prefix 'Summary: ' Any longer description would go into the bug ID as a comment (which I did above for your description of the patch)

        3. I got an error applying your patch, since it used characters not in the Ascii character set in the changset comment:

        $ hg qpush
        applying JDK-8088147.revised.27-07-16.patch
        transaction abort!
        rollback completed
        cleaning up working directory...done
        abort: decoding near 'exander Nyßen <alex': 'ascii' codec can't decode byte 0xc3 in position 12: ordinal not in range(128)!

        In any case, the following is the changeset comment I will use, with the appropriate reviewer filled in once approved by a second reviewer.

        8088147: [SWT] FXCanvas: implement custom cursors
        Summary: Augmented implementation of SWTCursors to handle image cursors properly. Added unit test and manual test.
        Reviewed-by: XXXXX
        Contributed-by: alexander@nyssen.org
        Show
        kcr Kevin Rushforth added a comment - The following is just FYI for the future, since I will format the changeset comment per the OpenJDK requirements listed here: http://openjdk.java.net/guide/producingChangeset.html 1. The first line must start with the 7-digit bug ID without the 'JDK-' prefix, followed by a colon and a space. The rest of the text should match the title of the bug. 2. There is an optional single-line summary line with the prefix 'Summary: ' Any longer description would go into the bug ID as a comment (which I did above for your description of the patch) 3. I got an error applying your patch, since it used characters not in the Ascii character set in the changset comment: $ hg qpush applying JDK-8088147 .revised.27-07-16.patch transaction abort! rollback completed cleaning up working directory...done abort: decoding near 'exander Nyßen <alex': 'ascii' codec can't decode byte 0xc3 in position 12: ordinal not in range(128)! In any case, the following is the changeset comment I will use, with the appropriate reviewer filled in once approved by a second reviewer. 8088147: [SWT] FXCanvas: implement custom cursors Summary: Augmented implementation of SWTCursors to handle image cursors properly. Added unit test and manual test. Reviewed-by: XXXXX Contributed-by: alexander@nyssen.org
        Hide
        azvegint Alexander Zvegintsev added a comment -
        +1
        Show
        azvegint Alexander Zvegintsev added a comment - +1
        Hide
        kcr Kevin Rushforth added a comment -
        Changeset: 286fab2d6958
        Author: kcr
        Date: 2016-07-27 13:04 -0700
        URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/286fab2d6958

        8088147: [SWT] FXCanvas: implement custom cursors
        Summary: Augmented implementation of SWTCursors to handle image cursors properly. Added unit test and manual test.
        Reviewed-by: azvegint
        Contributed-by: alexander@nyssen.org
        Show
        kcr Kevin Rushforth added a comment - Changeset: 286fab2d6958 Author: kcr Date: 2016-07-27 13:04 -0700 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/286fab2d6958 8088147: [SWT] FXCanvas: implement custom cursors Summary: Augmented implementation of SWTCursors to handle image cursors properly. Added unit test and manual test. Reviewed-by: azvegint Contributed-by: alexander@nyssen.org

          People

          • Assignee:
            kcr Kevin Rushforth
            Reporter:
            art Artem Ananiev
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Imported: