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

Focus delegation API

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • javafx
    • None

      Controls in JavaFX have an external representation (the Control), and an internal representation (the Skin). The internal representation is a "gray box" to the user, it is usually hidden from the developer-facing API. Let's consider the Spinner control: from the user perspective, it is a monolithic control that consists of a text field and two buttons to change the spinner value.

      Users should observe the Spinner to have the input focus if it accepts keyboard input. However, the key events must also reach the internal TextField.

      This requires us to support both external and internal focus. The solution must have the following properties:

      1. Allow focus delegation from an external control to an internal control.
      2. Make events consistent for both external and internal observers, without erroneous duplication.
      3. Ensure that focus delegation and consistent events also work in nested scenarios, i.e. when an internal control has its own internal representation.

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

              Created:
              Updated: