GraphStream Users

Archives de la liste Aide


Re:


Chronologique Discussions 
  • From: guilhelm savin <guilhelm.savin AT gmail.com>
  • To: "graphstream-users AT litislab.fr" <graphstream-users AT litislab.fr>, "Steven E. Noel" <snoel AT gmu.edu>
  • Subject: Re:
  • Date: Wed, 16 Oct 2013 23:34:19 +0200

Hi again,

A full rebuild of the UI is planned with a modular rendering ability (Swing, OpenGL, ...). So, this is not impossible.
No date is set for the availability of the new ui. Just be patient :)

Regards.
Guilhelm


2013/10/16 Steven E. Noel <snoel AT gmu.edu>

I've been able to successfully embed a GraphStream View into a JavaFX GUI.  Here is the key code:

 

Viewer viewer = new Viewer(network, ThreadingModel.GRAPH_IN_SWING_THREAD);

View view = viewer.addDefaultView(false);

viewer.enableAutoLayout();

viewer.setCloseFramePolicy(Viewer.CloseFramePolicy.EXIT);

SwingNode swingNode = new SwingNode();

swingNode.setContent(view);

StackPane pane = new StackPane();

pane.getChildren().add(swingNode);

 

This uses the newly available SwingNode (http://download.java.net/jdk8/jfxdocs/javafx/embed/swing/SwingNode.html) to embed Swing content into a JavaFX application.

 

While this works for me, it introduces an extra GUI thread (Swing and JavaFX).  For example, dynamic changes to GraphStream graphs do not refresh in the GUI until the Swing thread completes and returns control to JavaFX.

 

I was wondering if there are plans for eventual support of support for JavaFX in GraphStream?

 

Steve




--
Guilhelm Savin
PhD Student of Computer Science


  • [no subject], Steven E. Noel, 16/10/2013
    • Re:, guilhelm savin, 16/10/2013

Archives gérées par MHonArc 2.6.16.

Top of page