Grouping components for a drag [message #193217] |
Wed, 24 August 2005 17:25 |
Eclipse User |
|
|
|
Originally posted by: gef.oppacher.ca
Hi,
I'm trying to select a set of editparts when another editpart is selected
for dragging. When component A is selected for dragging I also want
components B, C, and D to also be selected for the components. I am
essentially trying to do what the marquee tool does but on the fly. I
created a DragTracker and overrid the handleDragStarted() method to select
the other components by using the appendSelection method in
GraphicalViewer. By doing this selection it seems to interupt my drag so
the objects don't actually move. Is there a better place to put this where
it won't override the drag?
|
|
|
Re: Grouping components for a drag [message #193248 is a reply to message #193217] |
Wed, 24 August 2005 18:42 |
Eclipse User |
|
|
|
Originally posted by: bashar.infromatik.uni-bonn.de
You may try with implementing EditPartListener and register it with the
editparts which will then be notified by
EditPartListener#selectedStateChanged(EditPart editpart). @see
GraphicalEditPart#setSelected() for selecting others.
"Yandu" <gef@oppacher.ca> wrote in message
news:1d9e30770ea568ee686d112e89c85dfd$1@www.eclipse.org...
> Hi,
>
> I'm trying to select a set of editparts when another editpart is selected
> for dragging. When component A is selected for dragging I also want
> components B, C, and D to also be selected for the components. I am
> essentially trying to do what the marquee tool does but on the fly. I
> created a DragTracker and overrid the handleDragStarted() method to select
> the other components by using the appendSelection method in
> GraphicalViewer. By doing this selection it seems to interupt my drag so
> the objects don't actually move. Is there a better place to put this where
> it won't override the drag?
>
|
|
|
Re: Grouping components for a drag [message #193284 is a reply to message #193248] |
Wed, 24 August 2005 20:28 |
Eclipse User |
|
|
|
Originally posted by: gef.oppacher.ca
Selecting the other parts using GraphicalEditPart#setSelected() is exactly
what GraphicalViewer#appendSelection() does. It seems that when I add to
my selection group gef trets this as if the drag has finished since each
part that I add gains focus be default. So either I can override the
appendSelection method which I don't want to do or figure out how to
regenerate a drag request. Any ideas on how to do this?
Thanks
Abul Bashar wrote:
> You may try with implementing EditPartListener and register it with the
> editparts which will then be notified by
> EditPartListener#selectedStateChanged(EditPart editpart). @see
> GraphicalEditPart#setSelected() for selecting others.
> "Yandu" <gef@oppacher.ca> wrote in message
> news:1d9e30770ea568ee686d112e89c85dfd$1@www.eclipse.org...
>> Hi,
>>
>> I'm trying to select a set of editparts when another editpart is selected
>> for dragging. When component A is selected for dragging I also want
>> components B, C, and D to also be selected for the components. I am
>> essentially trying to do what the marquee tool does but on the fly. I
>> created a DragTracker and overrid the handleDragStarted() method to select
>> the other components by using the appendSelection method in
>> GraphicalViewer. By doing this selection it seems to interupt my drag so
>> the objects don't actually move. Is there a better place to put this where
>> it won't override the drag?
>>
|
|
|
Re: Grouping components for a drag [message #193310 is a reply to message #193284] |
Wed, 24 August 2005 21:27 |
Eclipse User |
|
|
|
Originally posted by: bashar.infromatik.uni-bonn.de
Yes, you are right. I tried using EditPartListener & EditPart#setSelected().
All others are selected as well but only the first one moves.
Sorry, I don't have any other idea, but I think overriding appendSelection
should work.
regards
"Yandu" <gef@oppacher.ca> wrote in message
news:f6217bb06d79cb8e92e2b5cdd1a6841f$1@www.eclipse.org...
> Selecting the other parts using GraphicalEditPart#setSelected() is exactly
> what GraphicalViewer#appendSelection() does. It seems that when I add to
> my selection group gef trets this as if the drag has finished since each
> part that I add gains focus be default. So either I can override the
> appendSelection method which I don't want to do or figure out how to
> regenerate a drag request. Any ideas on how to do this?
>
> Thanks
>
> Abul Bashar wrote:
>
>> You may try with implementing EditPartListener and register it with the
>> editparts which will then be notified by
>> EditPartListener#selectedStateChanged(EditPart editpart). @see
>> GraphicalEditPart#setSelected() for selecting others.
>
>> "Yandu" <gef@oppacher.ca> wrote in message
>> news:1d9e30770ea568ee686d112e89c85dfd$1@www.eclipse.org...
>>> Hi,
>>>
>>> I'm trying to select a set of editparts when another editpart is
>>> selected for dragging. When component A is selected for dragging I also
>>> want components B, C, and D to also be selected for the components. I am
>>> essentially trying to do what the marquee tool does but on the fly. I
>>> created a DragTracker and overrid the handleDragStarted() method to
>>> select the other components by using the appendSelection method in
>>> GraphicalViewer. By doing this selection it seems to interupt my drag so
>>> the objects don't actually move. Is there a better place to put this
>>> where it won't override the drag?
>>>
>
|
|
|
Re: Grouping components for a drag [message #193350 is a reply to message #193310] |
Thu, 25 August 2005 13:58 |
Eclipse User |
|
|
|
Originally posted by: gef.oppacher.ca
I managed to get it working by updating the operationSet List in
AbsractTool to include all newly selected EditParts. I also had to
setState(STATE_DRAG_IN_PROGRESS). Thanks for your help.
Regards,
Yandu
Abul Bashar wrote:
> Yes, you are right. I tried using EditPartListener & EditPart#setSelected().
> All others are selected as well but only the first one moves.
> Sorry, I don't have any other idea, but I think overriding appendSelection
> should work.
> regards
> "Yandu" <gef@oppacher.ca> wrote in message
> news:f6217bb06d79cb8e92e2b5cdd1a6841f$1@www.eclipse.org...
>> Selecting the other parts using GraphicalEditPart#setSelected() is exactly
>> what GraphicalViewer#appendSelection() does. It seems that when I add to
>> my selection group gef trets this as if the drag has finished since each
>> part that I add gains focus be default. So either I can override the
>> appendSelection method which I don't want to do or figure out how to
>> regenerate a drag request. Any ideas on how to do this?
>>
>> Thanks
>>
>> Abul Bashar wrote:
>>
>>> You may try with implementing EditPartListener and register it with the
>>> editparts which will then be notified by
>>> EditPartListener#selectedStateChanged(EditPart editpart). @see
>>> GraphicalEditPart#setSelected() for selecting others.
>>
>>> "Yandu" <gef@oppacher.ca> wrote in message
>>> news:1d9e30770ea568ee686d112e89c85dfd$1@www.eclipse.org...
>>>> Hi,
>>>>
>>>> I'm trying to select a set of editparts when another editpart is
>>>> selected for dragging. When component A is selected for dragging I also
>>>> want components B, C, and D to also be selected for the components. I am
>>>> essentially trying to do what the marquee tool does but on the fly. I
>>>> created a DragTracker and overrid the handleDragStarted() method to
>>>> select the other components by using the appendSelection method in
>>>> GraphicalViewer. By doing this selection it seems to interupt my drag so
>>>> the objects don't actually move. Is there a better place to put this
>>>> where it won't override the drag?
>>>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.05836 seconds