Proposal: Focus Traversal API

Michael Strauß michaelstrau2 at gmail.com
Wed Oct 23 17:05:30 UTC 2024


Maybe we can polish the naming a bit:

When used as a transitive verb, "traverse" means (according to
Merriam-Webster): to go or travel across or over, to move or pass
along or through.

MW gives the example: "light rays traversing a crystal". So one thing
is moving (light rays), while the other thing is static (a crystal).
Cambridge gives the example "Stanley traversed the continent from west
to east." Again, "Stanley" is moving, "the continent" is static.

Since "traverseFocus" is a transitive verb followed by a direct noun,
it sounds to me like "focus" is the thing that can be traversed over
or across.
As an analogy, let's call the method "traverseContinent" for a moment.
It becomes obvious that "continent" is the space which is traveled
across, and not the thing travelling.

In our case, "focus" is the moving thing, not the thing that it is
moved across. I would use something like "moveFocus", "shiftFocus", or
something along those lines.

As for "TraversalDirection", I think it is acceptable, but I'll note
that to me, "direction" implies one of the four directional modes, not
the two logical modes (previous and next).


More information about the openjfx-dev mailing list