Open kiendao515 opened 3 years ago
I'm also not getting the above basic node click example to work.
Also view.findGraphicElementAt()
is inaccurate and doesn't find the proper graph node given MouseEvent
coordinates. Mostly it returns null. When clicking randomly, it sometimes finds a node but it is never anywhere near the cursor.
Any help would be appreciated.
Seems to be the same as issue 301, i.e. due to Java9+ HDPI settings. Adding -Dsun.java2d.uiScale=100%
fixes the bad coordinates but makes the application scale to barely readable font size.
I have the same problem, any solution ?
I try to do the same as the tutorial "Retrieving mouse clicks on the viewer" in graphstream ,I have added some nodes and edges but there is no thing to happen.
`public Clicks() { // We do as usual to display a graph. This // connect the graph outputs to the viewer. // The viewer is a sink of the graph. Graph graph = new SingleGraph("Clicks"); Viewer viewer = graph.display(); graph.addNode("a"); graph.addNode("b"); graph.addNode("c"); graph.addEdge("ab","a","b"); graph.addEdge("bc","c","b"); // The default action when closing the view is to quit // the program. viewer.setCloseFramePolicy(Viewer.CloseFramePolicy.HIDE_ONLY);