Making Connections [message #188005] |
Mon, 18 July 2005 18:58 |
Eclipse User |
|
|
|
Originally posted by: rmeschi.us.ibm.com
Hi guys,
I want the user of my application to be able to click on anoutput anchor
(which starts the connection tool)...then connect it to another anchor
(which stops the connection tool -> goes to default tool). The last part
is simple, but I'm wondering what is the best way to implement the first
part. Should I have the edit part of the figure listen to mouse clicks,
then check if the user clicked on the area in which the port is drawn,
then set the current tool the the connection tool and set the source to
the selected node? Is there perhaps a better way to do this?
thanks in advance,
-R
|
|
|
Re: Making Connections [message #188298 is a reply to message #188005] |
Tue, 19 July 2005 17:43 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
"Rouben" <rmeschi@us.ibm.com> wrote in message
news:48f0f487a14944f6a7e0ed8e1ba8f234$1@www.eclipse.org...
> Hi guys,
>
> I want the user of my application to be able to click on anoutput anchor
> (which starts the connection tool)...then connect it to another anchor
> (which stops the connection tool -> goes to default tool). The last part
> is simple, but I'm wondering what is the best way to implement the first
> part. Should I have the edit part of the figure listen to mouse clicks,
> then check if the user clicked on the area in which the port is drawn,
> then set the current tool the the connection tool and set the source to
> the selected node? Is there perhaps a better way to do this?
Just changing the tool when the mouse is pressed should work. If you don't
consume the mouse event, it should then also be forwarded to the new tool
(which will recognize the source anchor).
>
> thanks in advance,
> -R
>
>
|
|
|
Re: Making Connections [message #188791 is a reply to message #188005] |
Fri, 22 July 2005 16:09 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Use an anchor whose drag tracker is the connection drag creation tracker.
"Rouben" <rmeschi@us.ibm.com> wrote in message
news:48f0f487a14944f6a7e0ed8e1ba8f234$1@www.eclipse.org...
> Hi guys,
> I want the user of my application to be able to click on anoutput anchor
> (which starts the connection tool)...then connect it to another anchor
> (which stops the connection tool -> goes to default tool). The last part
> is simple, but I'm wondering what is the best way to implement the first
> part. Should I have the edit part of the figure listen to mouse clicks,
> then check if the user clicked on the area in which the port is drawn,
> then set the current tool the the connection tool and set the source to
> the selected node? Is there perhaps a better way to do this?
>
> thanks in advance,
> -R
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03683 seconds