I think BehaviorContext looks suspiciously like a (skin) input map, so I would rather see that.
Invention of State class is a way to work around the stateless behavior which, though it adds (in my opinion) very little, might still be a feature that app developers want to exploit - at least in terms of saving on per-instance key maps. So any alternative proposal should also support a stateless behavior. To summarize my position, I would rather see development of InputMap / (Skin/Secondary)InputMap rather than this v2 proposal. Cheers, -andy From: openjfx-dev <openjfx-dev-r...@openjdk.org> on behalf of John Hendrikx <john.hendr...@gmail.com> Date: Wednesday, November 29, 2023 at 14:54 To: openjfx-dev@openjdk.org <openjfx-dev@openjdk.org> Subject: Behavior API proof of concept PR For those still interested, I've updated https://github.com/openjdk/jfx/pull/1265 with a replaced ButtonBehavior and SpinnerBehavior, using concepts laid out in https://gist.github.com/hjohn/c7b1bf9d4a4770b1b3ae854b20fbaa94 Any feedback is welcome, I think it's making progress, and the changes required seem quite doable. The ability for Behaviors to intercept any event from its Control or its (named) children makes Behaviors a lot more powerful than earlier proposals, allowing for completely new interactions without requiring Skin changes. --John