Button and TouchEvents

Sebastian Rheinnecker sebastian.rheinnecker at yworks.com
Wed Nov 13 05:27:03 PST 2013


Hello,

yes, the synthesized events worked just fine. I was just surprised that 
the button didn't work on touches when I prevented mouse events from 
reaching the button. I actually had to look up the code to understand 
why this effects touch events and I just wanted to make sure that this 
is intended.

Kind regards,
Sebastian

Am 12.11.2013 11:12, schrieb Pavel Safrata:
> 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.
> Thanks,
> Pavel
>
> 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
>>
>


-- 
Sebastian Rheinnecker
phone: +49 7071 9709050
fax: +49 7071 9709051

yWorks GmbH
Vor dem Kreuzberg 28
72070 Tuebingen
Germany
http://www.yworks.com
Managing Directors: Sebastian Müller, Michael Pfahler
Commercial Registry: Stuttgart, Germany, HRB 382340



More information about the openjfx-dev mailing list