Button and TouchEvents

Pavel Safrata pavel.safrata at oracle.com
Tue Nov 12 02:12:54 PST 2013

Hello Sebastian,
why should it? The synthesized mouse events work just fine, don't they? 
They are meant exactly for things like that to work with touches without 
the need to code additional support.

On 12.11.2013 10:41, Sebastian Rheinnecker wrote:
> Hello all,
> while messing around with touch events I found out that Buttons rely 
> solely on mouse events. Although the documentation of the button class 
> explicitly says that the onAction method is fired upon touch events, 
> the only reason why this works is because the platform fires 
> synthesized mouse events for each touch event that reach the button. 
> Then the mouseReleased method in the behavior class invokes the Action 
> event. Shouldn't there be a separate handling for touch events here 
> and the handling for mouse events only done when the isSynthesized 
> flag of the mouse events is set to false?
> Kind regards,
> Sebastian Rheinnecker

More information about the openjfx-dev mailing list