On Thu, 10 Oct 2024 16:56:42 GMT, Andy Goryachev <ango...@openjdk.org> wrote:
> > I struggle to see what problem this will be solving that isn't already > > solved with the above. > > Let me try to explain this (again). ... > At high level, there might be _application-level requirements_ for > conditional traversal, which should be implemented via _application-level_ > traversal policy. > > To give an example: "if you answered [yes] on line 23, go directly to line > 35". IMHO this sounds like a solution looking for a problem. This is form based type logic, which is IMHO far too high level for FX to cater to. Specifically for this case, I'd expect "lines" 24-34 to simply be disabled, and so navigation automatically proceeds to the next logical location. I remain thoroughly unconvinced that this is sufficient to require a new traversal policy API. I would move that we provide methods that can change focus in the way FX currently allows with directional and logical navigation keys so users/developers don't need to simulate key presses to get at this functionality. Then we can see what use cases are still uncovered. (some time later) I did my best to actually find some use cases... so I checked 50 bugs that match `JavaFX` + `focus` that are not closed or resolved. I only found two that had some relevancy to recent discussions: |Link|Title|Resolution| |---|---|---| |https://bugs.openjdk.org/browse/JDK-8090584|Support standard for UP / DOWN remapping|Seems like it would be solved by fixing ScrollPane and removing the early focus traversal mappings embedded directly in controls...| |https://bugs.openjdk.org/browse/JDK-8224744|Add a feature similar to Swing's FocusEvent.getOppositeComponent|Seems invalid, you can do this with a ChangeListener on Scene#focusOwner| Plus there was a request on the mailinglist to provide a way to just focus the next logical control. So, where are the use cases then? What are we exactly trying to solve for which group of users? That's really something one needs to know when designing a new API. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1555#issuecomment-2405957042