Вопрос

I have adjacency matrices stored in a database and I would like to interactively edit them with the Java Jung graph package. Interactive graph editing can be seen in the sample GraphEditorDemo. I have completed a method that will create graph objects from the information in the adjacency matrices. Now I would like to put this together to interactively edit these graphs (create/delete vertices/edges, modify the edge weights and capacities...). I would like to do this efficiently without reinventing the wheel.

So, what is the best approach to creating/extending an interactive graph editor?

  1. Can I extend GraphEditorDemo?

I do not think this is a valid option since I will have no control over the vertex/edge factories in GraphEditorDemo which will differ from my graphs and their factories in the database.

  1. Besides extending, what other options do I have to use all of this code?
Это было полезно?

Решение

I think that the best option you have to achieve what you want, is to look directly to the source code of the GraphEditorDemo class in order to understand how is it using the library.

Tips: sources are available there, and seem to be nicely commented.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top