use of org.graphstream.graph.Edge in project gs-ui-javafx by graphstream.
the class TutorialDiagrams method diagram1.
public Scene diagram1(String title, String styleSheet) {
MultiGraph graph = new MultiGraph(title);
Scene s = diagram(graph, styleSheet, title, 500, 250);
Node G = graph.addNode("Graph");
Node V = graph.addNode("Viewer");
Edge E = graph.addEdge("G->V", "Graph", "Viewer", true);
G.setAttribute("xyz", new double[] { 0, 0, 0 });
V.setAttribute("xyz", new double[] { 1, 0, 0 });
G.setAttribute("ui.label", "Graph");
V.setAttribute("ui.label", "Viewer");
return s;
}
Aggregations