Skip to main content



      Home
Home » Modeling » Graphiti » GMF Layout Algorithm for Graphiti
GMF Layout Algorithm for Graphiti [message #1609664] Tue, 10 February 2015 03:58 Go to next message
Eclipse UserFriend
I have tried using the CompoundDirectedGraph and KIELER layout algorithm, but none of these are able to give me the desirable result, I wish to try the GMF layout algorithm for a try and see if I can get a better result for my Process Network.
Can someone suggest how can I achieve the same on my Diagram .

Re: GMF Layout Algorithm for Graphiti [message #1611306 is a reply to message #1609664] Wed, 11 February 2015 04:29 Go to previous message
Eclipse UserFriend
This is how I have introduced the GMF layout in Graphiti.

int PADDING = 10;
final CompoundDirectedGraph graph = mapDiagramToGraph(d);
graph.setDirection(PositionConstants.EAST);
graph.setDefaultPadding(new Insets(PADDING));
// new CompoundDirectedGraphLayout().visit(graph);
// mapGraphCoordinatesToDiagram(graph);

new GMFDirectedGraphLayout().visit(graph);
// new CompositeDirectedGraphLayout().visit(graph);

mapGraphCoordinatesToDiagram(graph);

In the last method you need to map the draw 2d node and edge to graphiti Shape and Connection, and add the bendpoints too.
Previous Topic:remove ColorDecorator on Connection after deselection
Next Topic:Graphiti editor refresh behavior
Goto Forum:
  


Current Time: Wed Jul 23 14:32:20 EDT 2025

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

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

Back to the top