Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » GMF Layout Algorithm for Graphiti
GMF Layout Algorithm for Graphiti [message #1609664] Tue, 10 February 2015 08:58 Go to next message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 82
Registered: July 2009
Location: Cologne, Germany
Member

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 .



Regards,
Abhishek Chakraborty
Re: GMF Layout Algorithm for Graphiti [message #1611306 is a reply to message #1609664] Wed, 11 February 2015 09:29 Go to previous message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 82
Registered: July 2009
Location: Cologne, Germany
Member

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.


Regards,
Abhishek Chakraborty
Previous Topic:remove ColorDecorator on Connection after deselection
Next Topic:Graphiti editor refresh behavior
Goto Forum:
  


Current Time: Tue Mar 19 07:15:40 GMT 2024

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

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

Back to the top