Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » REQ_MOVE and overlapping Layers problem
REQ_MOVE and overlapping Layers problem [message #231560] Sat, 10 March 2007 18:59
Eclipse UserFriend
Originally posted by: kvdijken.tiscali.nl

I have a problem with overlapping layers and moving figures within their parentlayer.

I have two Layers which overlap each other completely. Each of these Layers have Figures on them
which may be dragged. Dropping may only occur on their own Layer, ie., they may not be reparented,
only moved within their own parent.

When the DragEditPartsTracker is looking for a target editpart (in updateTargetUnderMouse()) it will
return the first of these Layers it encounters in its search. This may be the wrong layer. This
results in the wrong requests being generated (REQ_ADD instead of REQ_MOVE).

I tried several options:

1. create my own DragEditPartsTracker which in its activate() after calling super.activate() calls
lockTargetEditPart(layerEditPart). This does not work because calling lockTargetEditPart implicitly
initializes the operationSet which can't be done because the DragEditPartsTracker does not have a
viewer yet. That is only set after activation.

2. create my own DragEditPartsTracker with overrides for isMove() and getTargetEditPart(). This
seems to work but looks rather clumsy to me.

I have got the feeling that it could be done a bit simpler. Is that right?


Thanks,

Koen
Previous Topic:Layout question
Next Topic:Painting figures with SWTGraphics does not work any longer.
Goto Forum:
  


Current Time: Fri Apr 26 20:09:11 GMT 2024

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

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

Back to the top