complex DragTracker [message #99445] |
Mon, 13 October 2003 12:57  |
Eclipse User |
|
|
|
Originally posted by: brian.fernandes.codito.com
I have a container with Children in a ToolbarLayout
Now when I drag the children within the container, I want them to simply
reorder... this is the default behaviour. Fine.
However, when I drag any of the children outside their parent container,
instead of dragging the child; I want the entire parent container to be
dragged - along with feedback - just as if I had dragged the parent itself.
I need this is because the parent cannot be seen and is totally obscured by
its children.
I can achieve the ultimate effect using an intelligent commands but using
the DragTracker would be much more intuitive.
I just noticed something in DragEditPartsTracker#getCommand().. perhaps I
could distinguish between REQ_MOVE and REQ_ORPHAN to change the editpart ?
I'm not sure how to do this... and then what happens if I go outside the
bounds of the parent.. okay I'll start dragging the parent; but if I come
back within the bounds of the parent.. I should be re-ordering the
originally selected child again..
This isn't as simple as I initially thought,
Thanks in advance,
Brian.
|
|
|
|
|
Re: complex DragTracker [message #100593 is a reply to message #99445] |
Sat, 18 October 2003 09:38  |
Eclipse User |
|
|
|
Originally posted by: brian.fernandes.codito.com
I have a containter with some children. When you left click on the child,
you select it - default behaviour.
However, when you drag the child, I want the parent to be dragged instead. I
used to achieve this by overriding getDragTracker to return a drag tracker
for the containers EditPart instead of the childs EditPart.
But this prevents me from selecting the child so that I can edit it's
properties. I think I have to do something in handleButtonDown -
SelectEditPartTracker; would appreciate any suggestions.
Thanks,
Brian.
|
|
|
Powered by
FUDForum. Page generated in 0.03717 seconds