JDK-8091524 : Introduce a "focus container" concept in class Parent
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: scenegraph
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2013-05-03
  • Updated: 2024-06-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
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.