I have a custom widget that is actually an image, and i would like to be able to drag it inside an AbsolutePanel and get its coordinates every time. I would like to use the new DND API from GWT 2.4, but i’m having a hard time to implement it. Can someone propose the basic steps i must take?
Share
The new DnD API introduced with GWT 2.4 doesn’t currently support the
AbsolutePanel(see the implementations of theHasAllDragAndDropHandlersinterface). Looking at the implementation ofFocusPanelit shouldn’t be too hard to enable it for other panels.Here’s a quick proof of concept on how to solve your problem:
And here the custom panel
and image class: