graphstream

Graphstream view not loading

这一生的挚爱 提交于 2019-12-12 03:29:50
问题 Well, i have the following schemas: A Java class that extends JFrame instantiating the other class that contains my graph which returns a blank screen. The second a normal class with the method main inside of it, calling the same class that contains my graph which returns a normal graph. Now, why the class that is a JFrame returns a blank graph? My code of the graph class. public class grafoComparacao implements ViewerListener { private List<Comparados> integralizacoesComparadas; private

GraphStream graph not rendered corectly

前提是你 提交于 2019-12-12 02:28:08
问题 I have the following code while trying to display a graph in a form. For 3 nodes the code works well but after adding other nodes the graph is not showed entirely. I have no idea where the problem can be. public class Test{ public static void main(String args[]) throws IOException{ final DefaultGraph g = new DefaultGraph("my beautiful graph"); g.setStrict(false); Viewer viewer = new Viewer(g, Viewer.ThreadingModel.GRAPH_IN_GUI_THREAD); JFrame myJFrame = new JFrame(); myJFrame.setPreferredSize

More readable graph in GraphStream - JAVA

笑着哭i 提交于 2019-12-11 07:13:18
问题 I am working on application by using GraphStream Library. So far I have implemented Dijkstra's Shortest Path Algorithm. My graph is working fine but the readability of graph is not what I was expecting. Here is the screen shot of graph : As you can see that graph is not readable due to alot of edge crossing. Is there any way to make my graph more readable. I am studying Graph Stream Generators BUT I dont think that they will be best in my case. So I am looking for accurate solution to my

how to use static layout in graphstream

≡放荡痞女 提交于 2019-12-11 03:05:03
问题 I would like to generate static graph use GraphStream. Is there any suggestion solutions? I read input data from DGS file (generated from other model). Because the number of nodes is not fix every time and I don't want to manually specify each position of each node. Currently I can use the autolayout function to place the nodes and the result is OK, but the problem is: each node can be moved if you click the node and drag it. Is there any way to generate the graph use autolayout, and the node

How to layout nodes once in GraphStream?

浪子不回头ぞ 提交于 2019-12-11 02:58:08
问题 It is possible to activate layout process in GraphStream with Viewer#enableAutoLayout(). Unfortunately, this process will tamper each user interaction like node dragging. Is is possible to do automatic layout once and then stop? I have tried to turn autolayout for a second and wait, but this didn't work. package tests.graphstream; import java.awt.BorderLayout; import javax.swing.JFrame; import javax.swing.SwingUtilities; import org.graphstream.graph.Graph; import org.graphstream.graph

Add GraphStream graph into my custom jPanel

纵饮孤独 提交于 2019-12-02 10:06:33
问题 I am working on GraphStream library. For now, When I run my program it opens new window for my graph and separate window for my graph. I tried to create a JFrame and add JPanel into JFrame , after all this I tried to add graph into my JPanel but it says that graph object is not a component. Here is my code: import java.awt.BorderLayout; import java.awt.EventQueue; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java

Add GraphStream graph into my custom jPanel

混江龙づ霸主 提交于 2019-12-02 06:49:10
I am working on GraphStream library. For now, When I run my program it opens new window for my graph and separate window for my graph. I tried to create a JFrame and add JPanel into JFrame , after all this I tried to add graph into my JPanel but it says that graph object is not a component. Here is my code: import java.awt.BorderLayout; import java.awt.EventQueue; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border

Displaying Parallel Edges in Graphstream

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 12:15:58
I have a multigraph, and I would like to be able to see each edge that goes from one vertex to another clearly. For example, when I have a graph with 2 vertices, and 2 edges going from the first to the second, I would like to see 2 arrows going from the first node to the second, instead of the arrows overlapping. This is my code currently, and you can see that I'm trying to have 2 edges connecting A and B: import org.graphstream.graph.*; import org.graphstream.graph.implementations.*; import org.graphstream.ui.swingViewer.Viewer; public class Tutorial1 { public static void main(String args[])

Displaying Parallel Edges in Graphstream

泪湿孤枕 提交于 2019-12-01 11:44:57
问题 I have a multigraph, and I would like to be able to see each edge that goes from one vertex to another clearly. For example, when I have a graph with 2 vertices, and 2 edges going from the first to the second, I would like to see 2 arrows going from the first node to the second, instead of the arrows overlapping. This is my code currently, and you can see that I'm trying to have 2 edges connecting A and B: import org.graphstream.graph.*; import org.graphstream.graph.implementations.*; import