On Wed, 13 May 2026 19:51:29 GMT, Martin Fox <[email protected]> wrote:
>> modules/javafx.controls/src/main/java/javafx/scene/control/skin/ComboBoxPopupControl.java >> line 188: >> >>> 186: if (dispatcher == null) return false; >>> 187: >>> 188: EventDispatchChain chain = new EventDispatchChainImpl(); >> >> would it make sense to create a public API to dispatch an event specifically >> to the given `Node`, bypassing the normal path (as in `Event.fireEvent` ?) >> >> something along the lines `EventUtil.fireEvent` ? > >> would it make sense to create a public API to dispatch an event specifically >> to the given `Node`, bypassing the normal path (as in `Event.fireEvent` ?) > > I wouldn't add such a specialized API. It would make more sense to provide an > API so clients can easily create event dispatch chains. The > EventDispatchChain interface is public but the implementation is not and > there's no supported way for clients to create one. With one of those in hand > it's easy to pass an event to a single dispatcher or even a set of > dispatchers. Maybe I wasn't clear. You have two methods - this and an identical one in https://github.com/openjdk/jfx/pull/2166/changes#diff-9117771ea1db4c49f8f0e82634427f7d8205b1f15038c1429959a003a10a5af7R250 that dispatch an event to a component, bypassing the normal chain, correct? Why not make it a public API? `Event.dispatchTo(Node)` or something like that? Or, at a minimum, replace these two with a utility method added to `EventUtil` ? ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2166#discussion_r3250325973
