but onDoubleClick is a different thing from onMouseClicked. there are a lot of side effects which shouldnt be so obstructive to find out.
r
Ruckus
02/18/2018, 4:52 PM
That's the thing, it's not. "double click" is just a multiple clicks on the same spot, and JavaFX treats it accordingly. You could define a 100 click listener if your wanted.
w
wineluis
02/18/2018, 4:52 PM
yep. you see if you look at the source.
g
gtnarg
02/18/2018, 4:53 PM
actually, to be consistent the method should probably be called setOnDoubleClick() which implies that it's a helper method (i.e. is similar to the setOnMouseClicked javafx method) which replaces the existing handler.
👍 1
gtnarg
02/18/2018, 5:02 PM
all that said - it could be modified to add an additional handler in the extension function but it "could" be a breaking change if someone expects it to replace the existing handler (not likely)
gtnarg
02/18/2018, 5:04 PM
You can just use event filters if you want to add multiple handlers (instead of using the helper method)