Graph Visualization in a Eclipse RCP aplication - java

I am working on an Eclipse RCP application which should display an internal hierarchical structure as a graph. The nodes of the graph should be positioned on different points of a background image but should offer drag support. The graph should be zoom-able possibly without resizing the nodes on the maps (layout zoom) while the background image should be scaled normally. Some kind of semantic zoom (showing and hiding sub nodes on request) should be possible.
Which library or tool would be suitable to solve this problem?
Update:
The graph should be displayed similar to an UML class diagram.

I guess the term graph is confusing. Your description suggests a travelling salesman or or class diagram style graph, instead of a earning for the last quarter style graph. I think you are looking for something along the lines of GUESS or Zest.

JFreeChart does most (maybe even all, it is a very comprehensive tool) of what you list, It is simply embeddable in Eclipse. See the Eclipse-CS plugin for example usage.

Best bet would be Graphical Editing Framework (GEF) http://www.eclipse.org/gef/. As it highly integrates into eclipse and includes a 2d visualization library.
As for third-party libraries:
Either prefuse or processing.org are java-based which can be used for graph-based visualization. You should wrap either org.prefuse for prefuse or wrap processing.core for processing as a standalone osgi plugin for a better version-maintenance.
I'd recommend you look at http://code.google.com/p/uofs-silver-hg/ as it is a system that integrated prefuse in her workspace.
I also recommend you look at gephi graph toolkit http://gephi.org/toolkit/ as your problem may involve large-scale information processing.

JUNG is the best Graph vis package I've seen to date.
jung.sourceforge.net
Super flexible and you can pretty much cusomize everything.
Cheers.

You could use Structure101. It will give you the hierarchical graphs which you can export and then manually overlay on your graphic. In fact, you can grab package-level graphs from a s101 repository using an url so I guess you could maybe construct what you're looking for in html...
Cheers.

As far as I know: EMF (Eclipse Modeling Framework) and GMF (Graphical Modelign Framework) are best well-known frameworks to do that.

Related

Simple Java GIS Editor

I'm looking for a library/application that would give me a good starting point for an application that will needed to:
display a (big) rail/street network on a map (geographically limited to central Europe)
rail/street network has its custom graph data structure (no standards we could benefit from)
standard interaction with map: zoom/pan
interaction with network: remove/add nodes and edges. move nodes.
Implementation preferably in Java. Thats's it ;)
Would love to hear your suggestions on this topic!
Thanks very much,
Patrick
There is GeoServer which is a full-featured geospatial server based on the GeoTools library.
Besides, you could check all the other projects hosted by OSGeo.
As for standards, there are quite a few that you could benefit from, developed by OGC.
Give uDig a shoot. Open source and in Java.
Fulfils your criteria of display and interaction (I tried with relatively large vector data, not sure about raster performance though).
I cannot really say how it works with network datasets, but with enough programming skills you could probably hack your way with some custom plugins. Here is a starting point.
Another interesting project worth checking out is Degree which is in OsGeo endorsed projects just like Geoserver.

Eclipse plugin - nodes and connection + code generation

I'd like to create an Eclipse extension modelling a decision tree/diagram. The actual modelling would be done using a graphical interface (nodes, connections etc). I'd like this plugin to generate code based on nodes and their interconnections. I have basic model classes ready; however, my diagrams are very large and it's difficult to manage all the connections only through code. I imagine I would build the whole diagram using GUI. When I double-click on a connection, I'd like to be able to override some of its methods, thus creating an anonymous subclass.
I found GEF used in similar plugins. Is my goal plugin "doable" in GEF? Do you have any advice?
Yes. GEF is the foundation for building any graphical editor in Eclipse. It has basic support for moving nodes, placing connection, palette, etc. Other frameworks sit on top of GEF to make the task of creating a graphical editor even easier if your requirements fit with their supported scenarios. Take a look at Eclipse Graphiti project.
I would say that GMF is something that would help your life. GMF generates quite big parts for free, and also includes EMF.
Also GMF is highly extendeable, so if you don't like something it has generated, you can just override those parts.
There are good GMF tutorial here: http://wiki.eclipse.org/Graphical_Modeling_Framework/Tutorial

Need a java library for visualization that support automatic layout

I need a java graph library for visualization that I can incorporate in my own application. I found that jgraph is excellent for visualization but require explicit positioning of the nodes. Is there any open source java graph library that support automatic layout. Any suggestion will be really helpful for me.
There are numerous packages to do that.
If you are used to graphviz, then you may like Grappa, which is a sort of graphviz library for java (though not as complete as the original).
jung is also quite good, providing various layout engines.
Another tool of interest to build nice graph visualizations and animations is prefuse. It it very flexible, and can lead to very good looking visualizations, with complex layouts.
All of them are java libraries, and open source.
I've used JGo for years with success - not free (has free eval).
http://www.nwoods.com/go/jgo.htm
It has autolayout options for digraphs and force-directed, for sure, maybe more. I think the newer versions are much spiffier.
JGraph does support automatic layout and includes a number of graph and hieracichal layout algorithms.
See the API reference and example code for details.

Graph Control in Java/Netbeans? Does it exist?

Is it possible that anyone has a link to a graph class/library that I can use to produce a graph in Java?
Thanks for any help!
My top choice would be JGraph as others have suggested; I am using JGraph5 because it is better documented than the newer alternative, JGraphX. EDIT: JGraphX turns out to be the far superior version, despite the lack of documentation. It's not that hard to figure out.
JGraph
Demonstration app
Feature list
Licensing agreement
Other alternatives I've researched:
JGraphT
"JGraphT is a free Java graph library that provides mathematical graph-theory objects and algorithms...complete source code included, under the terms of the GNU Lesser General Public License." (http://jgrapht.sourceforge.net/)
Main project repository
Example visualizations
JUNG - Java Universal Network/Graph Framework
Main project repository
yEd Graph Editor
Implementation of yFiles library
Demonstration Java applet
About yEd
Saves graphs in GraphML format
I used JGraph as a visualizer for networks of nodes/topologies at my previous job, it's not half bad once you get past the architecture (it's a big state machine if I recall correctly).
Visual graph: JFreeChart
You may also wish to consider the Google Charts API, if you can make web service requests.
A really good alternative is to used the Google Charts API. Platform independent, easy to use, and fast processing (done on Google Server side)
graphviz would be my choice. It's not Java, but still terrific and easy to use.
There is a Java component that works with dot to generate graphs. I've used it - very nice, indeed.
I would recommend JGraphT. I used it to create multi-leveled graphs in my dissertation and as the base of a GPS Routing Software, understanding what is going on I found a bit of a mind bender, but once looking at how the algorithms package works I found it quite easy to implement A*/D* heuristic algorithms. For working out the distance between nodes on the graph I'd also recommend looking at the Haversine function, if that's your thing.

Does anyone have any experiences with Eclipse GMF?

I've just started to play around with Eclipse GMF.
Has anyone used the framework?
Any good or bad experiences you had using it?
Any alternatives for graphical modeling you could suggest?
EDIT: What good examples are available?
Has anyone used the framework? Yes, I am using it right now. It works, but it is typically quite a bit of coding for the graphical figures. I currently am struggling to leverage the IBM RSA/RSM UML editparts/figures/nodes etc built on top of GMF.
Any good or bad experiences you made using it? Looking back on my initial dives into GMF/EMF/GEF etc I can say for certain, study the examples. There are important patterns that you have to pick-up on from the examples and not the documentation. I would also suggest a new book (Eclipse Modeling Project: A Domain-Specific Language (DSL)) specific for GMF Modeling in Eclipse. I paged through it and it seemed to be the missing manual to some of the more basic concepts. Why the book is good is that is focuses on the key to making UML/Models useful through constraining it to a specific domain and providing a tool that only allows for valid models to be created. There is not a lot of documentation online and the API only tells you so much. WATCH OUT for repaint/paint loops caused by calling setBounds() or other set methods on children, it crashes the eclipse instance, not fun. Oh yes and the APIs are split between eclipse help documentation versions or not included at all.
Any alternatives for graphical modeling you could suggest?
Consider UML profiles with custom images and icons rather than full shape generation. It takes about 2 hours to put together a pretty good Image/Icon editor building on top of UML graphical objects and UML profiles. The IBM RSM tool UML Profile tooling project does this quickly. There is a lot you can do with constrained UML profiles (via Eclipse plug-ins or OCL). Entering GMF land is more than a order of magnitude effort increase, from 1 to 10 hours no problem.
Consider pure DSL (Domain specific language) tools out there. Google will provide a good list. From what I have seen the main reason to use GMF is eclipse integration and leveraging existing ecore/UML models, this is why I use GMF.
Ask yourself do I need model which is easy, or do I need a tool for creating instances of this model. If there are only 1-5 expert users there may not be a need for a sleek tool.
The TOPCASED project makes use of GMF. It provides various graphical editors for UML and other diagrams.
With GMF, most of the editor code is generated for you, but the main complexity arises from having to modify it.
As most recent alternatives, you might try Graphiti and Spray. Here is a comparison and another between GMF and Graphiti.

Categories

Resources