Announce: SimpleGesture, mouse gesture recognition

109 views
Skip to first unread message

emarc

unread,
Apr 24, 2009, 8:03:37 AM4/24/09
to Google Web Toolkit
Hi,

SimpleGesture is a mouse gesture recognition widget for GWT (and the
IT Mill Toolkit).

It uses the method described by Didier Brun at bytearray.org, and
uses the Levenshtein Distance method from Jakarta Commons
(getLevenshteinDistance() from StringUtils) on the client-side,
without modifications. I think this shows one of the strengths of GWT
- the ability to make use of existing Java code in the browser.

Video of me using it with a Wii:
http://www.youtube.com/watch?v=LEvJdTuZ8sc
Live demo:
http://marc.virtuallypreinstalled.com/SimpleGesture

It was made using my "10% time" here at IT Mill (yes, we're only half
Google, but that's not half bad, if you ask me...;) and it's obviously
an IT Mill Toolkit component as well.

To use it in "plain" GWT (w/o IT Mill Toolkit), just get the GWT stuff
from SVN (or just ISimpleGesture.java). ISimpleGesture a GWT Widget,
and there are only two IT Mill Toolkit specific things (which you can
remove): "implements Paintable", and the "updateFromUIDL()" -method.
http://dev.itmill.com/browser/incubator/SimpleGesture/WebContent/WEB-INF/src/com/itmill/incubator/simplegesture

Note that SimpleGesture is nowhere near perfect - feedback and
suggestions are welcome, or even better: patches :-)

Obviously, mouse gestures are not suitable for all applications, but
as the video shoud demonstrate, they can be handy...
Let me know what you think!

More details in my blogpost here:
http://marcenglund.blogspot.com/2009/04/gesture-recognition-in-gwt-and-it-mill.html

Best Regards,
Marc

emarc

unread,
Apr 24, 2009, 4:59:22 PM4/24/09
to Google Web Toolkit
Oh, I forgot to mention:
The license is Apache 2.

(And a tip: watch the video to get a quick idea of what it's all
about.)

Best Regards,
Marc

tim.clymer

unread,
May 1, 2009, 8:12:58 AM5/1/09
to Google Web Toolkit
I'd love to try it, but unfortunately I'm getting an
"OutOfMemoryError: java heap space" error. Perhaps it's a bit too
popular at the moment? :-)

Tim

emarc

unread,
May 1, 2009, 10:42:40 AM5/1/09
to Google Web Toolkit
Yeah, sorry about that - virtuallypreinstalled.com is our 'playground'
and IT Mill - a bunch of virtual servers running out of the 'server
closet' at work. My virtual machine runs out of memory if enough
people is manipulation the image at the same time, and it does not
recover very well...
It's the fourth time I've restarted the demo now, I should probably do
something more sustainable, such as ask for more memory. Or perhaps I
should make the demo less memory dependent, but that might require
coding ;-)

Just keep trying if it's down, I'll restart it as soon as I realize
it's down.

Best Regards,
Marc

Sumit Chandel

unread,
May 1, 2009, 12:37:49 PM5/1/09
to Google-We...@googlegroups.com
Hi Marc,

I probably should have checked in with you before referring to the announcement thread in the latest GWT community update blog post, a blog which has about 10K followers :-) Sorry about that!

One idea to help with server load would be to move image manipulation logic to canvas, although that would probably have to be a forward looking solution while in wait for popular browsers to implement HTML 5 specs (either partially or fully). Or, if you have another demo that might do something fancy except at the client-side, that would be cool too.

Cheers,
-Sumit Chandel

emarc

unread,
May 5, 2009, 6:49:50 AM5/5/09
to Google Web Toolkit
Hi Sumit,

Yeah, manipulating an image serverside with only a small amount of
memory available is not the best of ideas... It's been handling it
fairly well, though.
Actually I do have another simple idea that I was going to do as a
demo, I'll see if I can get that done sometime soon.

Best Regards,
Marc


On May 1, 7:37 pm, Sumit Chandel <sumitchan...@google.com> wrote:
> Hi Marc,
> I probably should have checked in with you before referring to the
> announcement thread in the latest GWT community update blog post, a blog
> which has about 10K followers :-) Sorry about that!
>
> One idea to help with server load would be to move image manipulation logic
> to canvas, although that would probably have to be a forward looking
> solution while in wait for popular browsers to implement HTML 5 specs
> (either partially or fully). Or, if you have another demo that might do
> something fancy except at the client-side, that would be cool too.
>
> Cheers,
> -Sumit Chandel
>
Reply all
Reply to author
Forward
0 new messages