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 |
surekha somisetty 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);
}
});
}
}
}
}
|
|
| |
Goto Forum:
Current Time: Thu Dec 05 17:24:35 GMT 2024
Powered by FUDForum. Page generated in 0.02670 seconds
|