Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Making Connections
Making Connections [message #188005] Mon, 18 July 2005 18:58 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
>
Previous Topic:Resize and Children
Next Topic:Layout for graphs with cycles
Goto Forum:
  


Current Time: Thu Dec 12 20:31:53 GMT 2024

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

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

Back to the top