Prioritized event handlers
Michael Strauß
michaelstrau2 at gmail.com
Sat Nov 9 01:35:52 UTC 2024
I agree with this analysis, and I've taken the liberty to steal parts
of your code for this PR:
https://github.com/openjdk/jfx/pull/1632
On Thu, Nov 7, 2024 at 3:06 PM John Hendrikx <john.hendrikx at gmail.com> wrote:
> [...]
> I now think Behaviors should always be doing their event handling in filters, for the simple reason that they should get to act first before the Skin gets to act on an event; events arriving at the Control level which is the final destination can be handled by either a handler or a filter and there would be no discernible difference. Not only does this solve the problem with the internal text field and the Skin needing to be aware of what keys Behavior will be handling, but it also then makes behaviors always act before user event handlers, creating consistency here (ie. replacing a Skin will not affect event handler order). This frees up handlers for user purposes.
> [...]
More information about the openjfx-dev
mailing list