Widgets added into DropTarget seem different from Dragged/Dropped widget objects?

10 views
Skip to first unread message

stagirus

unread,
Feb 7, 2012, 11:15:50 AM2/7/12
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

Fred Sauer

unread,
Feb 9, 2012, 5:24:18 PM2/9/12
to gwt...@googlegroups.com, mohan...@yahoo.com
See my other email response.


--
You received this message because you are subscribed to the Google Groups "gwt-dnd" group.
To post to this group, send email to gwt...@googlegroups.com.
To unsubscribe from this group, send email to gwt-dnd+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-dnd?hl=en.




--
Fred Sauer
fr...@allen-sauer.com
Reply all
Reply to author
Forward
0 new messages