On Wed, 6 Nov 2024 20:49:20 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> Public focus traversal API for use in custom controls.
>> 
>> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal-v3.md
>> 
>> This is a lightweight change that only adds the public API for focus 
>> traversal, containing neither the public API for the traversal policy 
>> (#1555) nor with the changes for the traversal policy hidden (#1604).
>
> Andy Goryachev has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   missing newline

I like this approach of providing the minimal API to do programmatic focus 
traversal without any additional (and unneeded) implementation changes.

The API looks good with a couple wording suggestions on the docs.

Can you provide some unit tests?

modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 8535:

> 8533: 
> 8534:     /**
> 8535:      * Tries to move the focus from this {@code Node} in the specified 
> direction.

Suggestion: `Tries` --> `Requests` (to better match the name of the method and 
the language in `requestFocus()`.

modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 8539:

> 8537:      * A successful traversal results in a new {@code Node} being 
> focused.
> 8538:      * <p>
> 8539:      * This method is expected to be called in response to a {@code 
> KeyEvent}, since the {@code Node}

Suggestion: `, since the Node` --> `; therefore, the Node`

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

PR Review: https://git.openjdk.org/jfx/pull/1628#pullrequestreview-2419405812
PR Review Comment: https://git.openjdk.org/jfx/pull/1628#discussion_r1831700546
PR Review Comment: https://git.openjdk.org/jfx/pull/1628#discussion_r1831707394

Reply via email to