ConnectionRouter help [message #157540] |
Wed, 10 November 2004 17:04 |
Eclipse User |
|
|
|
Originally posted by: rsudra.hotmail.com
Dear all,
I am currently writing my own connection router but having some trouble trying to figure out how to detect collisions with other connections.
I have successfully made a connection router that basically creates a staircase style effect similar to a project planning link between tasks. The point is that I would like to figure out if there are any pointlist collisions so that I can tweak them to separate out parts of the routing.
The problem is that given a Connection as passed to the router, I do not know how to find all the other Connections in the diagram to compare the points lists and handle the collision. If I could as the connection anchor via the connection for all the other connections, that would be enough.
A solution to this approach is the have the router store the connections in a static Collection on the router class (or make my ConnectionRouter subtype a singleton) and store each connection as it is routed for future comparison. The problem is that stale connections could be left in the Collection, so how would I dispose of the connection? If its a figure then I would hope that there is a hook to dispose.
Rather than maintaining a Collection in the connection router, I would prefer to discover additional connections and apply my collision variations that way.
Can anyone fill in the holes in my understanding of this please?
Thanks,
Raj
|
|
|
Powered by
FUDForum. Page generated in 0.02379 seconds