Search in sources :

Example 11 with Edge

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;
}
Also used : Node(org.graphstream.graph.Node) Scene(javafx.scene.Scene) Edge(org.graphstream.graph.Edge) MultiGraph(org.graphstream.graph.implementations.MultiGraph)

Aggregations

Edge (org.graphstream.graph.Edge)11 Node (org.graphstream.graph.Node)10 MultiGraph (org.graphstream.graph.implementations.MultiGraph)4 FxDefaultView (org.graphstream.ui.fx_viewer.FxDefaultView)3 FxViewer (org.graphstream.ui.fx_viewer.FxViewer)3 FxGraphRenderer (org.graphstream.ui.javafx.FxGraphRenderer)3 Viewer (org.graphstream.ui.view.Viewer)3 ViewerPipe (org.graphstream.ui.view.ViewerPipe)3 Scene (javafx.scene.Scene)2 FileOutputStream (java.io.FileOutputStream)1 PrintWriter (java.io.PrintWriter)1 HashMap (java.util.HashMap)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 WindowEvent (javafx.stage.WindowEvent)1 FilterComplex (org.fagu.fmv.ffmpeg.filter.FilterComplex)1 In (org.fagu.fmv.ffmpeg.filter.FilterComplexBase.In)1 FilterInput (org.fagu.fmv.ffmpeg.filter.FilterInput)1 IOKey (org.fagu.fmv.ffmpeg.filter.IOKey)1 OutputKey (org.fagu.fmv.ffmpeg.filter.OutputKey)1 InputProcessor (org.fagu.fmv.ffmpeg.operation.InputProcessor)1