Multiple connections between two figures [message #182515] |
Wed, 25 May 2005 18:18  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04280 seconds