Skip to main content



      Home
Home » Eclipse Projects » GEF » Multiple connections between two figures
Multiple connections between two figures [message #182515] Wed, 25 May 2005 18: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 18:51 Go to previous message
Eclipse UserFriend
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 Jul 15 01:20:23 EDT 2025

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

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

Back to the top