Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Drag parent by dragging child
Drag parent by dragging child [message #235814] Thu, 09 July 2009 13:57 Go to next message
Josip Maras is currently offline Josip MarasFriend
Messages: 41
Registered: July 2009
Member
Hi,

Does anyone know how to cause parent drag by dragging the child which is
inside of a parent compartment? What do i need to override??


Thank you
Re: Drag parent by dragging child [message #235888 is a reply to message #235814] Thu, 09 July 2009 18:32 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Josip,

I think you have to modify DragDropEditPolicy.getDropCommand() installed
onto the target EditPart (one you are dropping objects in).

-----------------
Alex Shatalin
Re: Drag parent by dragging child [message #236130 is a reply to message #235888] Tue, 14 July 2009 09:44 Go to previous message
Josip Maras is currently offline Josip MarasFriend
Messages: 41
Registered: July 2009
Member
Thank you Alex,

Unfortunately i wasn't able to do it by modifying the
DragDropEditPolicy.getDropCommand().

But this seems to be working:

In the child Edit part add:

@Override
public DragTracker getDragTracker(Request request)
{
return getParent().getDragTracker(request);
}

Alex Shatalin wrote:

> Hello Josip,

> I think you have to modify DragDropEditPolicy.getDropCommand() installed
> onto the target EditPart (one you are dropping objects in).

> -----------------
> Alex Shatalin
Previous Topic:How to use my own image for each Eclass
Next Topic:Diagram node as image
Goto Forum:
  


Current Time: Mon Mar 08 13:34:50 GMT 2021

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

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

Back to the top