Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Unable to drag shapes
Unable to drag shapes [message #248016] Wed, 01 April 2009 13:09 Go to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
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 21:50 Go to previous message
Ben Vitale is currently offline Ben VitaleFriend
Messages: 247
Registered: July 2009
Senior Member
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
>
Previous Topic:Keep palette tool selected when shift is pressed
Next Topic:GEF Palette
Goto Forum:
  


Current Time: Fri Apr 26 23:51:34 GMT 2024

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

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

Back to the top