RFR: 8091673: Public focus traversal API for use in custom controls [v2]

John Hendrikx jhendrikx at openjdk.org
Fri Oct 25 17:43:11 UTC 2024


On Fri, 25 Oct 2024 15:00:21 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 10449:
>> 
>>> 10447:      * @since 24
>>> 10448:      */
>>> 10449:     public final boolean requestFocusTraversal(TraversalDirection direction) {
>> 
>> possible alternative names:
>> 
>> moveFocus
>> requestFocusTraversal
>> tryToFocus
>> tryMoveFocus
>
> Of these, I like `requestFocusTraversal` best. Another alternative: `requestMoveFocus`.

Plain `requestFocus` can also work as it can be overloaded with the direction parameter.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1604#discussion_r1817103452


More information about the openjfx-dev mailing list