Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #37989
| Path | csiph.com!feeder.erje.net!2.eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Knute Johnson <nospam@rabbitbrush.frazmtn.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: What's the difference between mouseClicked and mousePressed? |
| Date | Tue, 23 Jan 2018 14:54:44 -0600 |
| Organization | A noiseless patient Spider |
| Lines | 37 |
| Message-ID | <p487em$dfj$1@dont-email.me> (permalink) |
| References | <65e683ec-444d-4a80-b3b4-e6de98bacc5e@googlegroups.com> <p47gev$ns$1@dont-email.me> <46ceca25-eec6-41b4-b304-f5424800b9eb@googlegroups.com> <f7bbe8fe-e0b7-406b-9d72-5e1f0a99ee67@googlegroups.com> <p47vlr$gob$1@dont-email.me> <b38033da-d0ab-47ee-bc93-99c129edef98@googlegroups.com> <p484kh$nta$1@dont-email.me> <3ce5cf06-6cfa-4baf-b459-3751a6dcd195@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Tue, 23 Jan 2018 20:54:48 -0000 (UTC) |
| Injection-Info | reader02.eternal-september.org; posting-host="4c5f3bf66be9b9360a617420a80b49f6"; logging-data="13811"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/GGw1zjunsipAsOoxCqWN5" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
| In-Reply-To | <3ce5cf06-6cfa-4baf-b459-3751a6dcd195@googlegroups.com> |
| Content-Language | en-US |
| Cancel-Lock | sha1:rpuCc+K9HXTYYY9flsQUPXqwSmk= |
| Xref | csiph.com comp.lang.java.programmer:37989 |
Show key headers only | View raw
On 1/23/2018 14:41, Eric Douglas wrote: > On Tuesday, January 23, 2018 at 3:07:03 PM UTC-5, Knute Johnson wrote: >> On 1/23/2018 13:03, Eric Douglas wrote: >>> On Tuesday, January 23, 2018 at 1:42:21 PM UTC-5, Daniele Futtorovic wrote: >>>> >>>> Also, MouseEvent has a #getClickCount(). Might be what you're looking for. >>>> >>>> -- >>>> DF. >>> >>> You can do if (e.getClickCount()==2) in mousePressed, or mouseReleased, seems to accomplish the same double click event as if you used mouseClicked, except I don't see a way to get to mouseClicked with touch events. >>> >> >> Are you using a different API? Otherwise touch events are the same as >> mouse events. It could be however that your Surface Pro is too slow in >> propagating events and you never see click counts greater than 1. On my >> Acer touch screen and that JavaWS program from the Tutorial that Eric >> posted I can get click counts of 2 but I have to be fast :-). >> >> -- >> >> Knute Johnson > > I get the click counts, it processes double click from mousePressed or mouseReleased, I just can't get into the mouseClicked from the touch events (either from finger or pen). > Now I see Oracle explains they did set up touch events as mouse events, a touch pressed = mouse pressed, with no mention of mouseClicked on that page. So it just doesn't appear they set up any way to generate it. > https://docs.oracle.com/javase/8/javafx/events-tutorial/gestures.htm > TouchEvents are JavaFX events not Swing. I thought you were using Swing? Did you try that JavaWS program that Eric S posted the link to? I get MouseEvents on my Acer touch screen with that. The click counts come from timing clicks over a period of time. The individual events are not changed. -- Knute Johnson
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 05:17 -0800
Re: What's the difference between mouseClicked and mousePressed? Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-01-23 09:22 -0500
Re: What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 06:35 -0800
Re: What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 06:47 -0800
Re: What's the difference between mouseClicked and mousePressed? Daniele Futtorovic <da.futt.news@laposte.net> - 2018-01-23 19:41 +0100
Re: What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 11:03 -0800
Re: What's the difference between mouseClicked and mousePressed? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2018-01-23 14:06 -0600
Re: What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 12:41 -0800
Re: What's the difference between mouseClicked and mousePressed? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2018-01-23 14:54 -0600
Re: What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 13:11 -0800
Re: What's the difference between mouseClicked and mousePressed? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2018-01-23 15:18 -0600
Re: What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 13:36 -0800
Re: What's the difference between mouseClicked and mousePressed? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2018-01-23 15:48 -0600
Re: What's the difference between mouseClicked and mousePressed? Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-01-23 09:55 -0500
csiph-web