Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » ManhattanConnectionRouter ?
ManhattanConnectionRouter ? [message #231227] Wed, 28 February 2007 23:17 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
>
Previous Topic:HTML like WYSWYG Editor in GEF
Next Topic:getModifier() protected in AbstractTool
Goto Forum:
  


Current Time: Fri Mar 29 10:01:38 GMT 2024

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

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

Back to the top