Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Multiple connections between two figures
Multiple connections between two figures [message #182515] Wed, 25 May 2005 22:18 Go to next message
Eclipse UserFriend
Originally posted by: eri_cao_apex.yahoo.com

Hi,

I want to create multiple connections between figures. It seems new
connections will overlap with old ones. I tried FanRouter that can handle
collision, but it doesn't spread connections. The code is as follows:

FanRouter router = new FanRouter();
router.setSeparation(10);
connection.setConnectionRouter(router);

I am not sure if it is the proper way to use it, or
handleCollision(PointList points, int index) has to be overrided. Is it
possible to handle mutliple connections between two figures by using
ManhattanConnectionRouter, etc.? Those connections will have different
styles or labels. Any suggestions are welcome.

Thanks,

Eric
Re: Multiple connections between two figures [message #182568 is a reply to message #182515] Wed, 25 May 2005 22:51 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
You should always look at our examples before posting here. You set the
router on the connection layer, not the connection themselves. See
ShapesEditor#initializeGraphicalViewer().

"Eric Cao" <eri_cao_apex@yahoo.com> wrote in message
news:d72tpj$58r$1@news.eclipse.org...
> Hi,
>
> I want to create multiple connections between figures. It seems new
> connections will overlap with old ones. I tried FanRouter that can handle
> collision, but it doesn't spread connections. The code is as follows:
>
> FanRouter router = new FanRouter();
> router.setSeparation(10);
> connection.setConnectionRouter(router);
>
> I am not sure if it is the proper way to use it, or
> handleCollision(PointList points, int index) has to be overrided. Is it
> possible to handle mutliple connections between two figures by using
> ManhattanConnectionRouter, etc.? Those connections will have different
> styles or labels. Any suggestions are welcome.
>
> Thanks,
>
> Eric
>
>
Previous Topic:draw2 text
Next Topic:GridLayout sample
Goto Forum:
  


Current Time: Tue Apr 23 12:59:24 GMT 2024

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

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

Back to the top