How to achieve bend points in the connection between 2 figures [message #215766] |
Tue, 09 May 2006 14:41  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.04284 seconds