Drag and Drop in GWT

219 views
Skip to first unread message

Ani

unread,
Jan 23, 2017, 11:54:29 AM1/23/17
to GWT Users
HI
 I am working on a Diagram editor with GWT. The requirement is to be able to drag from a palette and draw and connect different shapes.
So using a Canvas component for the drawing part.
 Does GWT have an in built Drag and Drop Framework?

Any help is appreciated

Regards
Ani

Mike Warne

unread,
Jan 24, 2017, 3:42:44 PM1/24/17
to GWT Users
Most GWT components support drag and drop event handling.
For example: Labels, Grids, etc.

Not sure if this helps when drawing to a canvas...

HTML h = new HTML("Hello");

HandlerRegistration regHandler = h.addDragStartHandler(....); 


Mike

Drew Spencer

unread,
Jan 25, 2017, 7:25:58 AM1/25/17
to GWT Users

Jens

unread,
Jan 25, 2017, 7:43:52 AM1/25/17
to GWT Users
Take a look at "Lienzo" for GWT: https://www.lienzo-core.com/lienzo-ks/#WELCOME

-- J.

salk31

unread,
Jan 27, 2017, 5:51:57 AM1/27/17
to GWT Users
I'd suggest at least looking into using "native" drag and drop support. I imagine it is much lighter and it supports dragging between windows etc... I think gwt-dnd was created before this was available.

Ignacio Baca Moreno-Torres

unread,
Jan 27, 2017, 11:29:00 AM1/27/17
to GWT Users
If you are going to use native drag and drop you might what some stream composition lib XD, rxjava makes event plumbing a bit easier, clean and powerful, and rxgwt has various tools to start using rxjava with gwt, see this example using elemental touch events https://github.com/intendia-oss/rxgwt/blob/master/examples/elemental/src/main/java/com/intendia/rxgwt/example/client/ElementalExample.java

avsgi

unread,
Jan 27, 2017, 6:40:17 PM1/27/17
to GWT Users

Hi.

I'm very interested in this approach, but I don't know how to do this. Could you point me to some example application?

Regards.

El 27/01/2017 11:51, salk31 <sal...@gmail.com> escribió:
I'd suggest at least looking into using "native" drag and drop support. I imagine it is much lighter and it supports dragging between windows etc... I think gwt-dnd was created before this was available.

On Monday, January 23, 2017 at 4:54:29 PM UTC, Ani wrote:
HI
 I am working on a Diagram editor with GWT. The requirement is to be able to drag from a palette and draw and connect different shapes.
So using a Canvas component for the drawing part.
 Does GWT have an in built Drag and Drop Framework?

Any help is appreciated

Regards
Ani

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

salk31

unread,
Jan 28, 2017, 4:43:57 AM1/28/17
to GWT Users
I'm not aware of any GWT wrappers but the JavaScript is pretty simple (so easy if you are happy with js interop). 


gwt_dnd is pretty good but even if you have to do the js interop yourself I think the complexity will be similar.

If you don't find off the shelf wrappers I'd be up for helping to come up with something. We have a large gwt_dnd based app that I'd like to move.


On Friday, January 27, 2017 at 11:40:17 PM UTC, Asier wrote:

Hi.

I'm very interested in this approach, but I don't know how to do this. Could you point me to some example application?

Regards.

El 27/01/2017 11:51, salk31 <sal...@gmail.com> escribió:
I'd suggest at least looking into using "native" drag and drop support. I imagine it is much lighter and it supports dragging between windows etc... I think gwt-dnd was created before this was available.

On Monday, January 23, 2017 at 4:54:29 PM UTC, Ani wrote:
HI
 I am working on a Diagram editor with GWT. The requirement is to be able to drag from a palette and draw and connect different shapes.
So using a Canvas component for the drawing part.
 Does GWT have an in built Drag and Drop Framework?

Any help is appreciated

Regards
Ani

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

Thomas Broyer

unread,
Jan 28, 2017, 12:32:15 PM1/28/17
to GWT Users
Drag and drop is in GWT proper (DropEvent et al)

salk31

unread,
Jan 28, 2017, 1:34:05 PM1/28/17
to GWT Users
doh + excellent

Even more keen to switch our app.
Reply all
Reply to author
Forward
0 new messages