Java SE 6.0 Release 1 Preview Generics Mess
Aug 13

Regarding my previous rant, I am still waiting for GWT to be released on the Mac (with hosted mode, that is), and until that happens I am toying around with it in very slow pace. However, one issue is semi-resolved for me as I read this article from Nub Games. Apparently, there’s an easy way to implement drag and drop in GWT, using mostly out-of-the-box tools provided by the framework and the rest is standard code that can be generified to an almost invisible level.

I hope that soon some examples on my part would be available, but for now I can’t use the Windows computer for GWT toying, and as for the Mac.. We’ll have to wait for Google to make their move. Regarding that, Scott Blum of Google asked if anyone who’s a Safari ninja (in code, not usage) could send him an email so that this situation could be fixed.

Other posts of interest

5 Responses to “Drag and Drop in GWT”

  1. Diwant Says:

    Hi,

    That Nub Games article is missing presently. Do you have another link?

    Thanks,
    Diwant

  2. Diwant Says:

    Ok, so I Googled and a minute later found

    http://blogs.nubgames.com/code/?p=9

    which I think is the same article’s new url.

  3. Avah Says:

    No.. And unfortunately, their site is not cached with Google either.. :-/

    If I remember correctly, the idea was to capture mouseDown, and set a dragging flag to true. Then, on mouseMove, translate the position of the box (or movable object) to the mouse movement’s deltas. Then, on mouseUp, set the flag to false.

    Simple, and could really be made generic for most objects.

  4. Avah Says:

    Yeah I think that was it too. :)

  5. Chaotic Java » Blog Archive » Drag and Drop in GWT - The How-To Says:

    […] I wrote about GWT’s lack of drag and drop a long time ago, and since then have done many things instead of making a generic drag-drop mechanism as promised. Luckily, some other people have, and it seems like their solution is quite good and solves a wide array of drag-drop problems. […]

Leave a Reply

Chaotic Java is Digg proof thanks to caching by WP Super Cache!