ManhattanConnectionRouter ? [message #231227] |
Wed, 28 February 2007 23:17 |
Eclipse User |
|
|
|
Originally posted by: sunjianing.hotmail.com
Hi group,
i'm writing a project using GEF.
The connections in my diagram work fine with ShortestPathConnectionRouter,
the connections are routed between figures.
But when i use ManhattanConnectionRouter, the connections are orthogonal, it
is what i need, but the connections cross figures too, it is very bad :(
Does anybody here know where is the problem?
I've only changed "ShapeDiagram", here the code block
protected IFigure createFigure() {
Figure f = new FreeformLayer();
f.setBorder(new MarginBorder(3));
f.setLayoutManager(new FreeformLayout());
// Create the static router for the connection layer
ConnectionLayer connLayer =
(ConnectionLayer)getLayer(LayerConstants.CONNECTION_LAYER);
//connLayer.setConnectionRouter(new ShortestPathConnectionRouter(f));
connLayer.setConnectionRouter(new ManhattanConnectionRouter());
return f;
}
Thanks in advanced.
kevin
|
|
|
Re: ManhattanConnectionRouter ? [message #231296 is a reply to message #231227] |
Fri, 02 March 2007 15:27 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
There's a feature request open on bugzilla to have an orthogonal router that
would avoid obstacles.
"Kevin Sun" <sunjianing@hotmail.com> wrote in message
news:es52hv$95q$1@utils.eclipse.org...
> Hi group,
>
> i'm writing a project using GEF.
>
> The connections in my diagram work fine with ShortestPathConnectionRouter,
> the connections are routed between figures.
>
> But when i use ManhattanConnectionRouter, the connections are orthogonal,
> it is what i need, but the connections cross figures too, it is very bad
> :(
>
> Does anybody here know where is the problem?
>
>
>
> I've only changed "ShapeDiagram", here the code block
>
> protected IFigure createFigure() {
>
> Figure f = new FreeformLayer();
>
> f.setBorder(new MarginBorder(3));
>
> f.setLayoutManager(new FreeformLayout());
>
>
> // Create the static router for the connection layer
>
> ConnectionLayer connLayer =
> (ConnectionLayer)getLayer(LayerConstants.CONNECTION_LAYER);
>
> //connLayer.setConnectionRouter(new ShortestPathConnectionRouter(f));
>
> connLayer.setConnectionRouter(new ManhattanConnectionRouter());
>
>
> return f;
>
> }
>
>
>
>
>
> Thanks in advanced.
>
> kevin
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02910 seconds