Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to avoid Node overlapping in horizontal tree layout algorithm in zest(Zest Horizontal Model diagram)
How to avoid Node overlapping in horizontal tree layout algorithm in zest [message #1746159] Mon, 24 October 2016 09:47 Go to next message
surekha somisetty is currently offline surekha somisettyFriend
Messages: 18
Registered: April 2016
Junior Member
i am Generating a new Model design diagram , i am looking for horizontal flow diagram, i just tried all the way's , but still i am not get-in proper way of my data, actually we have lot's(thousands) of data , i generate an example to give below code , but my client not happy for that , if any one have idea on this model diagram please hint us,


Other wise tell me new algorithm to implement replace of zest .


My code is given below:




public class ZestView extends ViewPart {

public static String ID = "zestDemoGraph.OpenEditorView";
private Graph graph;
private int layout = 1;

public ZestView() {
}

@SuppressWarnings("unused")
public void createPartControl(Composite parent) {

Tree tree = new Tree(parent, SWT.None | SWT.MULTI);
TreeItem itemroot;
TreeItem itemchild, itemchild1, itemchild2;

graph = new Graph(parent, SWT.NONE);

for (int r = 0; r < 1; r++) {
itemroot = new TreeItem(tree, SWT.NONE);
GraphNode source = new GraphNode(graph, SWT.NONE, "Parent");
System.out.println("");
for (int j = 0; j < 1; j++) {
System.out.println("j" + j);
itemchild = new TreeItem(itemroot, SWT.NONE);
GraphNode destinantion = new GraphNode(graph, SWT.NONE,
"Child Level 1");

new GraphConnection(graph, ZestStyles.CONNECTIONS_DIRECTED,
source, destinantion);

for (int s = 0; s < 2; s++) {
System.out.println("s" + s);
itemchild1 = new TreeItem(itemchild, SWT.NONE);
GraphNode destinantion1 = new GraphNode(
graph,
SWT.NONE,
"Child Level 2 ");

new GraphConnection(graph, ZestStyles.CONNECTIONS_DIRECTED,
destinantion, destinantion1);

for (int su = 0; su < 2; su++) {
System.out.println("su" + su);
itemchild2 = new TreeItem(itemchild1, SWT.NONE);
GraphNode destinantion2 = new GraphNode(graph,
SWT.NONE,
"Child Level 3 ");

new GraphConnection(graph,
ZestStyles.CONNECTIONS_DIRECTED, destinantion1,
destinantion2);
}

}

graph.setLayoutAlgorithm(new HorizontalTreeLayoutAlgorithm(
LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);

graph.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
System.out.println(e);
}

});

}
}

}
}
Re: How to avoid Node overlapping in horizontal tree layout algorithm in zest [message #1749052 is a reply to message #1746159] Thu, 01 December 2016 13:24 Go to previous message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 69
Registered: July 2009
Location: Cologne, Germany
Member

Please see this solution


https://www.eclipse.org/forums/index.php/t/77232/


Regards,
Abhishek Chakraborty
Previous Topic:Node overlapping problem in HorizontalTreeLayoutAlgorithm
Next Topic:Display Child outside ParentContainer
Goto Forum:
  


Current Time: Tue Sep 25 23:15:16 GMT 2018

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

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

Back to the top