Loop Connections [message #229176] |
Tue, 16 January 2007 17:34 |
Eclipse User |
|
|
|
Originally posted by: adfasfasdf.gmx.com
Hello!
I have to connect a figure with itself (in general with more than one
connection). I am using draw2d without GEF.
I looked in this newsgroup in order to find a solution, but i havent
find a good one yet.
What is the best way to do this? Are there now any existing solutions?
Thanks in advance!
Marcus
|
|
|
|
Re: Loop Connections [message #229235 is a reply to message #229221] |
Wed, 17 January 2007 09:26 |
Eclipse User |
|
|
|
Originally posted by: adfasfasdf.gmx.com
Yes, it is possible.
At the moment I am using a BendpointConnectionRouter if the source and
target figure are the same. Then I add some Bendpoints to the connection.
I am not sure if this is the best solution, because the results are not
very nice, maybe I am doing something wrong.
The problem is that the source and target anchor are the same, so no
connection is painted if I use the ShortestPathConnectionRouter, for
instance.
I think I could use polylines to connect the figure, but I thought using
connections is the natural way.
It is not unusual to connect a figure with itself, so I am sure that I
am not the first with this problem...
Aren´t there any examples or sth. like that?
I had a look at the logic example, but I havent found sth. that could
help me...
Marcus
> Hi,
>
> I don't know if it is possible to define a connection with source figure
> = destination figure ... have you tried ??
>
> May be you can use a polyline ??
>
> Manu
>
|
|
|
Re: Loop Connections [message #229433 is a reply to message #229235] |
Fri, 19 January 2007 13:29 |
Nhu Le Messages: 47 Registered: July 2009 |
Member |
|
|
I think I would just do it like you did. For your figure though, do you
have multiple anchors configured. It will probably not look nice if all
you have is ChopBoxAnchor because the connection will not look
"square/parallel".
Nhu
Marcus wrote:
> Yes, it is possible.
> At the moment I am using a BendpointConnectionRouter if the source and
> target figure are the same. Then I add some Bendpoints to the connection.
> I am not sure if this is the best solution, because the results are not
> very nice, maybe I am doing something wrong.
>
> The problem is that the source and target anchor are the same, so no
> connection is painted if I use the ShortestPathConnectionRouter, for
> instance.
>
>
> I think I could use polylines to connect the figure, but I thought using
> connections is the natural way.
> It is not unusual to connect a figure with itself, so I am sure that I
> am not the first with this problem...
> Aren´t there any examples or sth. like that?
> I had a look at the logic example, but I havent found sth. that could
> help me...
>
> Marcus
>
>
>
>
>
>> Hi,
>>
>> I don't know if it is possible to define a connection with source figure
>> = destination figure ... have you tried ??
>>
>> May be you can use a polyline ??
>>
>> Manu
>>
|
|
|
Powered by
FUDForum. Page generated in 0.02753 seconds