Selection and drag connection tool [message #211783] |
Wed, 15 March 2006 16:49  |
Eclipse User |
|
|
|
I am needing a tool that will allow for not only the selection of an
EditPart but also the creation of a connection by dragging from a source
EditPart to a target EditPart. It needs to work so that single clicking
on an EditPart only selects the part but does not start connection
creation. Only when a drag occurs does the connection creation begin.
After searching this newsgroup, I tried a few different approaches
without success. First, I tried setting the drag tracker on the
SelectionTool to the ConnectionDragCreationTool. Next, I tried
implementing the getDragTracker method of my EditPart. Finally, I tried
creating my own EditPolicy for the PRIMARY_DRAG_ROLE. None of these
solutions worked very well.
Do I need to create my own tool to accomplish this task or is there an
easier way?
TIA
|
|
|
|
Re: Selection and drag connection tool [message #211935 is a reply to message #211823] |
Thu, 16 March 2006 10:16  |
Eclipse User |
|
|
|
Thanks Randy. I will give it a try today.
Randy Hudson wrote:
> So, you have no need to drag the "node" editparts? If so, It sounds like you
> need to extend ConnectionDragCreationTool and modify it to include the
> behavior found in SelectEditPartTracker.
>
> "Scott Hathaway" <scott_hathaway@iwaysoftware.com> wrote in message
> news:dva29m$6kg$1@utils.eclipse.org...
>> I am needing a tool that will allow for not only the selection of an
>> EditPart but also the creation of a connection by dragging from a source
>> EditPart to a target EditPart. It needs to work so that single clicking
>> on an EditPart only selects the part but does not start connection
>> creation. Only when a drag occurs does the connection creation begin.
>>
>> After searching this newsgroup, I tried a few different approaches
>> without success. First, I tried setting the drag tracker on the
>> SelectionTool to the ConnectionDragCreationTool. Next, I tried
>> implementing the getDragTracker method of my EditPart. Finally, I tried
>> creating my own EditPolicy for the PRIMARY_DRAG_ROLE. None of these
>> solutions worked very well.
>>
>> Do I need to create my own tool to accomplish this task or is there an
>> easier way?
>>
>> TIA
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03407 seconds