Simulate ConnectionCreationTool from within EditPart [message #85215] |
Wed, 25 June 2003 10:29  |
Eclipse User |
|
|
|
Originally posted by: g.wagenknecht.intershop.de
Hi!
When I click on the connection anchor of an EditPart I can return my own
DragTracker in EditPart#getDragTracker. This works fine with the
ConnectionDragCreationTool. But know I want to use the
ConnectionCreationTool but it doesn't work the way it works from within the
palette (click on source -> move mouse and see connection -> click on
target -> connection is created).
Any hints?
Thanks,
Gunnar
|
|
|
|
|
|
|
Re: Simulate ConnectionCreationTool from within EditPart [message #86082 is a reply to message #86054] |
Mon, 30 June 2003 03:11  |
Eclipse User |
|
|
|
I did in my app the same thing with connections and it took me some time to
make it work correctly, but this is the only way i found to make this behave
the way i wanted. i needed also to override the handleButtonDown method, to
either start or finish the connection creation, also the method getCommand,
because there were cases that the super implementation for it didn't behave
all the time properly. Moreover, after the connection creation was finished,
i needed to reset the selection and the active tool in the edit domain.
"Gunnar Wagenknecht" <g.wagenknecht@intershop.de> wrote in message
news:bdoisc$uen$1@rogue.oti.com...
> Yoav Rubin wrote:
>
> > You can create a class that extends ConnectionCreationTool and
> > implements DragTracker. Once the getDragTracker method is called in
> > your editpart, you can return the class you created if the user
> > pressed the mouse over the connection anchor.
>
> Yes I know but this didn't give the result I wanted.
>
> Cu, Gunnar
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04281 seconds