[External] : Re: Focus delegation API
Martin Fox
martinfox656 at gmail.com
Mon Feb 10 13:12:13 UTC 2025
> I guess that's just the way I made it work. Implementing this in
> Control is not something I've thought about a lot.
It was really my thought experiment to begin with. Not sure it’s even possible to do this without involving Scene and Scene knows nothing about Controls. Don’t give it another thought.
> I see no reason why a control shouldn't dynamically change what it
> returns from getFocusDelegate(). However, there's no notification
> mechanism that would indicate when something has changed. Would you
> need something like Scene.focusOwner(), but instead of containing the
> outermost focused node (like ComboBox), it contains the last node in
> the current delegation chain (TextField)?
I’ll go think about the implementation and get back to you. For now I just needed to clarify that a Node’s focus delegate can change dynamically and that there might be a chain of delegates (which is the tricky part).
More information about the openjfx-dev
mailing list