Proposal: Focus Traversal API
Andy Goryachev
andy.goryachev at oracle.com
Wed Oct 23 17:16:38 UTC 2024
Thank you for suggestion!
My only problem with a more assertive “moveFocus” is that it implies a success, while this API may or may not succeed (similarly to requestFocus).
The word "shift" in "shiftFocus" might clash with the "shift" key, don't really like that.
Maybe "requestTraversal" although it will expand auto-completion list that has 2 items already. Welcome any alternative, as long as it's not creat().
-andy
From: openjfx-dev <openjfx-dev-retn at openjdk.org> on behalf of Michael Strauß <michaelstrau2 at gmail.com>
Date: Wednesday, October 23, 2024 at 10:05
To:
Cc: openjfx-dev at openjdk.org <openjfx-dev at openjdk.org>
Subject: Re: Proposal: Focus Traversal API
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).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20241023/81ecf859/attachment-0001.htm>
More information about the openjfx-dev
mailing list