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

Introduce a "focus container" concept in class Parent

XMLWordPrintable

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

      In JavaFX 2.2.21-b11 you can exclude a single component from focus traversal, but in the app I am building, there are several cases where this is not sufficient. As an example, I have a user interface A with a number of focusable components and a button. If you click the button I show another user interface B visually in front of A like a modal dialog if you will.

      User interface B is a Pane with its own focusable components, and using the TAB key, I would like JavaFX to let the focus cycle through all of B's components. The trouble is, if I keep hitting TAB, JavaFX will traverse all of B's components and after focusing the last component of B, JavaFX will not move focus back to the first component of B, but to the first component of A, effectively focusing a component which is partially hidden by B.
      To solve this issue I request that the Parent class get a new boolean property focusContainer which is initially false, but if set to true, will make the JavaFX focus traversal system realize that focus traversel should be contained inside this Parent.
      In my specific case this would mean that I could invoke setFocusContainer(true) on user interface B, and when the user hits TAB JavaFX would now move the focus from the last componet of B to its first component, rather than to the first component of A.

            Unassigned Unassigned
            risaksen Randahl Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported: