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

Remove Scene.KeyHandler

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • jfx20
    • jfx19
    • javafx
    • None
    • b13

    Description

      The `Scene.KeyHandler` class doesn't seem to have a clear purpose, mixing focus handling with event propagation. Since JDK-8268225, `KeyHandler.setFocusVisible` is also called from mouse and touch event handlers, which makes the purpose of the class even less pronounced.

      Moving the focus-related functionality next to the other focus functions in the `Scene` class is a safe and straightforward change, and it makes it easier to work with the code in the future.

      With the focus-related functions gone, `KeyHandler` only contains a single, small method that is called from `Scene.processKeyEvent`. For simplicity, this code can be rolled into `Scene.processKeyEvent` and the now-empty `KeyHandler` class can be removed.

      Attachments

        Issue Links

          Activity

            People

              mstrauss Michael Strauß
              mstrauss Michael Strauß
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: