Unable to drag shapes [message #248016] |
Wed, 01 April 2009 09:09  |
Eclipse User |
|
|
|
Hi all,
I've created a simple GEF Editor. The main purpose is just to add Label
figure & while user is dragging it around the location of the figure is
printed somewhere so I don't need connections ect. But when new Label is
added, it can not be dragged anywhere. Am I missing something here ?
Regards,
Setya
|
|
|
Re: Unable to drag shapes [message #248028 is a reply to message #248016] |
Wed, 01 April 2009 17:50  |
Eclipse User |
|
|
|
You need an EditPolicy that will handle a REQ_MOVE (among others) by
generating the appropriate Command. The Command will update your model,
which in turn will update your edit parts, which will move the actual
figure.. assuming you have all those pieces hooked up.
The Logic example should have this functionality.
This guide may also be useful:
http://help.eclipse.org/ganymede/topic/org.eclipse.gef.doc.i sv/guide/guide.html#Interactions
Cheers,
Ben
Setya wrote:
> Hi all,
>
> I've created a simple GEF Editor. The main purpose is just to add Label
> figure & while user is dragging it around the location of the figure is
> printed somewhere so I don't need connections ect. But when new Label is
> added, it can not be dragged anywhere. Am I missing something here ?
>
> Regards,
>
> Setya
>
|
|
|
Powered by
FUDForum. Page generated in 0.02664 seconds