Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » layout connections
layout connections [message #237107] Tue, 21 July 2009 12:36 Go to next message
Eclipse UserFriend
Originally posted by: marmeladenfaust.gmx.net

Hi,

in my Project, I generate diagrams and display them to the user in an
GMF generated Editor for further manipulation.
The default layout in GMF positions all nodes perfectly. But in my case
I often have connections with identical source and target. These are
overlapping with other nodes and connections.. the following images show
what I mean:
*Result after generating and programmatically calling the
allignAll-Function: http://imgbox.de/users/public/images/a55317k4.png
*Desired Result: http://imgbox.de/users/public/images/j55097h4.png

My question: Is it possible to layout the connections in a way, that
they don't collide anymore?

Best wishes,
Malte
Re: layout connections [message #237420 is a reply to message #237107] Fri, 24 July 2009 12:36 Go to previous message
Eclipse UserFriend
Originally posted by: marmeladenfaust.gmx.net

After reading some Tutorial I tried to change the connection router to
FanRouter in the Root Edit Part:

protected void configureGraphicalViewer() {
super.configureGraphicalViewer();

//....
GraphicalViewer viewer = this.getGraphicalViewer();
RootEditPart root = viewer.getRootEditPart();

if (root instanceof LayerManager) {
((ConnectionLayer) ((LayerManager)
root).getLayer(LayerConstants.CONNECTION_LAYER))
.setConnectionRouter(new FanRouter());
}

}

But I can see no changes in the displayed diagram. Any ideas? The
Connection Routers are said to take care of colliding connections.

Best wishes,
Malte


Malte schrieb:
> Hi,
>
> in my Project, I generate diagrams and display them to the user in an
> GMF generated Editor for further manipulation.
> The default layout in GMF positions all nodes perfectly. But in my case
> I often have connections with identical source and target. These are
> overlapping with other nodes and connections.. the following images show
> what I mean:
> *Result after generating and programmatically calling the
> allignAll-Function: http://imgbox.de/users/public/images/a55317k4.png
> *Desired Result: http://imgbox.de/users/public/images/j55097h4.png
>
> My question: Is it possible to layout the connections in a way, that
> they don't collide anymore?
>
> Best wishes,
> Malte
Previous Topic:Problems with opposite references.
Next Topic:Faulty coordinates when using translateToAbsolute & scrolling
Goto Forum:
  


Current Time: Fri Apr 26 16:17:44 GMT 2024

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

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

Back to the top