Skip to main content



      Home
Home » Eclipse Projects » GEF » Draw2D DND
Draw2D DND [message #124928] Tue, 30 March 2004 13:16 Go to next message
Eclipse UserFriend
Originally posted by: mas.nospam.com

Can I just use draw2D figures to be dragSources and dropTargets ? How do I
achieve this functionality if I am just using draw2D and NOT using GEF?

Could some one provide me some tips here?

Thanks,
MM
Re: Draw2D DND [message #124988 is a reply to message #124928] Tue, 30 March 2004 22:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You need to hook the DragSource on the canvas. When you get a dragStart,
determine which figure is under the mouse, and ask that figure if it is a
"lightweight" drag source, and allow the drag if it is. This is very
similar to DelegatingDragSourceAdapter in JFace

"Mas Masoud" <mas@nospam.com> wrote in message
news:c4cdir$av8$1@eclipse.org...
> Can I just use draw2D figures to be dragSources and dropTargets ? How do I
> achieve this functionality if I am just using draw2D and NOT using GEF?
>
> Could some one provide me some tips here?
>
> Thanks,
> MM
>
Re: Draw2D DND [message #125050 is a reply to message #124988] Wed, 31 March 2004 09:48 Go to previous message
Eclipse UserFriend
Originally posted by: mas.nospam.com

I tried doing the same thing but I am not able to find out the figure
under the mouse. I have the following construct.

Figure Canvas
-- Figure
-- Figure1
-- Figure2
-- Figure3

I am currently trying to find out using findFigureAt() but I am sure I
have problems identifying the coordinates at which the figure is. Any
suggestions here. Thanks in advance.

MMS


Randy Hudson wrote:

> You need to hook the DragSource on the canvas. When you get a dragStart,
> determine which figure is under the mouse, and ask that figure if it is a
> "lightweight" drag source, and allow the drag if it is. This is very
> similar to DelegatingDragSourceAdapter in JFace

> "Mas Masoud" <mas@nospam.com> wrote in message
> news:c4cdir$av8$1@eclipse.org...
> > Can I just use draw2D figures to be dragSources and dropTargets ? How do I
> > achieve this functionality if I am just using draw2D and NOT using GEF?
> >
> > Could some one provide me some tips here?
> >
> > Thanks,
> > MM
> >
Previous Topic:How can I run a swt example with no entry class
Next Topic:How can I draw B-spline using GEF Graphics?
Goto Forum:
  


Current Time: Sun Jul 06 23:44:51 EDT 2025

Powered by FUDForum. Page generated in 0.50002 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top