Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » complex DragTracker
complex DragTracker [message #99445] Mon, 13 October 2003 16:57 Go to next message
Eclipse UserFriend
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 #99460 is a reply to message #99445] Mon, 13 October 2003 17:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ThisisFake.Fakeness.xyz

a REQ_MOVE becomes a REQ_ORPHAN when your drag exits the boundaries of the
container. I think you can use REQ_ORPHAN to instead of removing your
children from their container, reissue the REQ_ORPHAN to the childs parent
as a REQ_MOVE, with translated positions (if you even need to translate).


CL
Re: complex DragTracker [message #99580 is a reply to message #99445] Tue, 14 October 2003 00:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

From a usability point of view, what you are descibing does not sound very
intuitive. Alternatives would be:
1) Show some visual title on the container or something else which the user
could click on to drag the container.
2) "Lock" the container such that it acts as a group at first, but can be
unlocked by double-clicking (similar to OLE embedded objects), or by an
ungroup action.

"Brian Fernandes" <brian.fernandes@codito.com> wrote in message
news:bmekoh$aln$1@eclipse.org...
> 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 13:38 Go to previous message
Eclipse UserFriend
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.
Previous Topic:communicating editor preferences to editparts
Next Topic:Embed Figure inside another Figure & Tracking Rectangle
Goto Forum:
  


Current Time: Sat Jul 27 16:16:36 GMT 2024

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

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

Back to the top