stagirus
unread,Feb 7, 2012, 11:15:50 AM2/7/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gwt-dnd, mohan...@yahoo.com
I am using AbsolutePositionDropController. I ran into this challenge.
We drag & drop specific widget objects called EventContent that
extends Label. At the time of dropping these objects, we do some
processing on them. I tried to achieve this functionality by
overriding AbsolutePanel.add(Widget w, int left, int top) in a class
DataPanel extends AbsolutePanel. I passed the instances of these
objects (DataPanel) as drop targets to
AbsolutePositionDropController.
I was expecting that the Widget parameter to "add" method to be same
as the dragged objects (instances of EventContent). Unfortunately, it
is not. It is adding instances of wrapper widgets (SimplePanel). I
would naturally expect the dragged objects (widgets) to be same as the
dropped objects. I even tried to iterate through SimplePanel to locate
EventContent objects. No luck.
I am wondering if it was an oversight or a design issue.
Is it possible for the API to keep the dragged objects and dropped
objects to be the same instances? I mean the copies added to
AbsolutePanel should be same instance as the dropped widget(s).
Or, can anybody suggest some other options?
Thanks