Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » extending ManhattenRouter
extending ManhattenRouter [message #194022] Tue, 30 August 2005 08:58 Go to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
The ManhattenRouter is very useful, but lacks the possibility of
explicitly specifying the start and end directions. This is often
needed to avoid strange-looking connections. We have made a variant of
ManhattenRouter with this capability, but since ManhattenRouter is
declared final, we cannot just subclass it, we had to copy all the
code. What is the rationale behind the final keyword? From the (rest
of the) code it seems the class is designed to be subclassed, since it
has several protected method, including ones that are natural to
override to control the start and end directions.
Re: extending ManhattenRouter [message #194093 is a reply to message #194022] Tue, 30 August 2005 16:20 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hallvard Trætteberg wrote:
> The ManhattenRouter is very useful, but lacks the possibility of
> explicitly specifying the start and end directions. This is often
> needed to avoid strange-looking connections. We have made a variant of
> ManhattenRouter with this capability...

I'd be interested in seeing what you and/or others have done. For my
UMLX extension of EDiagram I've made the router option available, but
I want bendpoint dragging to work on the ManhattanRouter, and snapping
to grid/geometry to work on ShortestPathRouter, and for the router
choice to be on a per-link basis. It seems that I have to write a
merged ShortestPathRouter/ManhattanRouter to get both functionalities.

Anyone else looking at more advanced routers?

Regards

Ed Willink
Re: extending ManhattenRouter [message #194101 is a reply to message #194093] Tue, 30 August 2005 17:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: christian.sell.netcologne.de

Ed Willink wrote:
> Anyone else looking at more advanced routers?

most certainly.
Re: extending ManhattenRouter [message #194125 is a reply to message #194093] Tue, 30 August 2005 20:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> choice to be on a per-link basis. It seems that I have to write a
> merged ShortestPathRouter/ManhattanRouter to get both functionalities.

Do you? Can't you just create two router instances, and choose the correct
one on the connection based on its attributes? I remember having this
discussion before and it seems like a delegating router was useful for
something...
Re: extending ManhattenRouter [message #194204 is a reply to message #194125] Wed, 31 August 2005 16:04 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Randy Hudson wrote:
>>choice to be on a per-link basis. It seems that I have to write a
>>merged ShortestPathRouter/ManhattanRouter to get both functionalities.
>
>
> Do you? Can't you just create two router instances, and choose the correct
> one on the connection based on its attributes? I remember having this
> discussion before and it seems like a delegating router was useful for
> something...
>
>
Delegating would certainly be nice, but they're not independent.
Reserved areas must be performed on a per-diagram rather than per-route
basis, so while the strategy can be per-route, the collision
policy must be shared. I've not studied the code here at all.
I was just interested in seeing if this was an already done problem.
Previous Topic:Adding SWT Combo to the draw2d Figure
Next Topic:Sorting entries in Property Sheet
Goto Forum:
  


Current Time: Thu Apr 25 00:55:57 GMT 2024

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

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

Back to the top