Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to achieve bend points in the connection between 2 figures
How to achieve bend points in the connection between 2 figures [message #215766] Tue, 09 May 2006 14:41 Go to next message
Eclipse UserFriend
Originally posted by: shruthi.cn.in.bosch.com

Hello everybody,

Between two figures i want to have a manhattan connection. I also want to
have a number of bend points.

Now the background is I am using GEF editor only as a viewer. So i have to
create a model initializing the data and then do
setContents(diagramContainer).

How exactly i have to deal with bend points?
Any links, any code will definitely help me.

Thank you very much
Best Regards
Shruthi
Re: How to achieve bend points in the connection between 2 figures [message #215853 is a reply to message #215766] Thu, 11 May 2006 00:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bandrews.nospam.com

I believe if you are using the ManhattanRouter, it will ignore any
bendpoints. I think you will need to create a custom router to achieve this.

-Barry


shruthi wrote:
> Hello everybody,
>
> Between two figures i want to have a manhattan connection. I also want
> to have a number of bend points.
> Now the background is I am using GEF editor only as a viewer. So i have
> to create a model initializing the data and then do
> setContents(diagramContainer).
>
> How exactly i have to deal with bend points?
> Any links, any code will definitely help me.
>
> Thank you very much
> Best Regards
> Shruthi
>
>
>
Re: How to achieve bend points in the connection between 2 figures [message #216044 is a reply to message #215853] Fri, 12 May 2006 14:27 Go to previous message
Pablo Carbajal is currently offline Pablo CarbajalFriend
Messages: 2
Registered: July 2009
Junior Member
We had a similar problem and ended up creating our own bend points, here is
what we did:

List bendsPoints = new ArrayList();
bendPoints.add(new AbsoluteBendpoint(x, y));
// keep adding your bendpoints...

PolylineConnection line = (PolylineConnection)getConnectionFigure();
line.setRoutingConstraint(bends);

Assumptions:
- "bendPoints" is a list with the bendpoints you want to add to your
connection
- "line" is your connection

We do this in our connection edit part every time the model fires a
PropertyChangeEvent and needs to refresh our connections (simililar to
#refreshVisuals()).

Hope this helps,
Pablo


"Barry Andrews" <bandrews@nospam.com> wrote in message
news:e3u1l1$jkn$1@utils.eclipse.org...
>
> I believe if you are using the ManhattanRouter, it will ignore any
> bendpoints. I think you will need to create a custom router to achieve
> this.
>
> -Barry
>
>
> shruthi wrote:
>> Hello everybody,
>>
>> Between two figures i want to have a manhattan connection. I also want to
>> have a number of bend points.
>> Now the background is I am using GEF editor only as a viewer. So i have
>> to create a model initializing the data and then do
>> setContents(diagramContainer).
>>
>> How exactly i have to deal with bend points?
>> Any links, any code will definitely help me.
>>
>> Thank you very much
>> Best Regards
>> Shruthi
>>
>>
Previous Topic:PolylineConnection & Bendpoint
Next Topic:Palette action for manipulating editor selection
Goto Forum:
  


Current Time: Sun Dec 04 16:26:50 GMT 2022

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

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

Back to the top