layout connections [message #237107] |
Tue, 21 July 2009 12:36 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03285 seconds