Custom Event Dispatcher - JavaFX
问题 Does anyone know how to write a custom Event Dispatcher based on the javafx.event package? I searched in Google & Co. but didn't find a nice example. Have anyone a minimalistic example for me? That would be nice - I tried it a few times to understand it, but I failed. 回答1: The first thing to realize is how JavaFX dispatches events. When an Event is fired it has an associated EventTarget . If the target was in the scene-graph then the path of the Event starts at the Window and goes down the