GraphStream Users

Archives de la liste Aide


graphstream in javafx


Chronologique Discussions 
  • From: Reynaldo Gil <gilcu2 AT gmail.com>
  • To: graphstream-users AT litislab.fr
  • Subject: graphstream in javafx
  • Date: Tue, 31 Mar 2015 22:35:15 +0200

Hi, I want to show a gs viewer in javafx, I did the example in http://sympa.litislab.fr/sympa/arc/graphstream-users/2013-10/msg00006.html but the window dont show any graph.
This is my program:

object GSInFX extends JFXApp {

stage = new PrimaryStage {
title = "GraphStream inside ScalaFX"
scene = new Scene {
content = new SwingNode {

val graph = new SingleGraph("Tutorial 1")

graph.addNode("A")
graph.addNode("B")
graph.addNode("C")
graph.addEdge("AB", "A", "B")
graph.addEdge("BC", "B", "C")
graph.addEdge("CA", "C", "A")
val viewer = new Viewer(graph, Viewer.ThreadingModel.
GRAPH_IN_SWING_THREAD)
val view = viewer.addDefaultView(false)
viewer.enableAutoLayout()
viewer.setCloseFramePolicy(Viewer.CloseFramePolicy.EXIT)
content = view
}

}
}
}
Some idea?
Also I found the project gx-fx in https://github.com/trajar/gs-fx but it doesnt explain how to use it. Some documentation?
Thanks
Reynaldo


  • graphstream in javafx, Reynaldo Gil, 31/03/2015

Archives gérées par MHonArc 2.6.16.

Top of page