A Java library for Graph Visualization that runs on Android, Web, and Desktop. JGraphV is powered by OpenGL. It is designed to be preformant on graphs with thounds of nodes while supporting panning and zooming to floating point precision.
A platform API for all platforms is specified in JGraphVCore project under com.github.rma350.jgraphv.core.portable. Each platform must provide a common API to OpenGL through GL.java (an intersection of GLES and WebGL), basic linear algebra, native arrays, and logging. The JGraphVCore project builds on this platform API to provide basic tools for building graphs, rendering them with OpenGL, viewing through an orthographic camera, and responding to input.
There are three additional projects JGraphVAndroid, JGraphVDesktop and JGraphVWeb, that provide implementations of the platform API from JGraphVCore and contain minimal runnable applications using the engine.
- Make sure you have the Java 7 JDK installed
- Install a recent version of eclipse (works with Juno, newer tends to be better)
- Install the android eclipse plugin (see http://developer.android.com/sdk/installing/installing-adt.html)
- Install the GWT eclipse plugin (http://www.gwtproject.org/usingeclipse.html)
- git clone anywhere on your local machine
- Create a workspace anywhere on your local machine
- From eclipse in your new workspace:
File->Import->General->Existing Projects into Workspace. UnderSelect root directoryclickBrowse, then navigate to to[location where you git-cloned]/jgraphv/. Under theProjectsbox there should be 4 projects in a list all checked,JGraphVAndroid,JGraphVCore,JGraphVDesktopandJGraphVWeb. ClickFinish.
If all is well, then everything should just build in eclipse. Cross platform development is hard! If you don't care about web or android, you can skip installing their eclipse plugins and just not import these projects.
- Android: plug your android device (with developer options enabled) into your computer. From eclipse, right on
JGraphVAndroidselectRun As -> Android Application. - Desktop: Right click on
JGraphVDesktop->src/com/github/rma350/jgraphv/desktop/Main.javaand selectRun As -> Java Application. - Web: Right click on the
JGraphVWebproject and selectGoogle->GWT Compile. Selectcom.github.rma350.jgraphv.web.JGraphVWeb.javaas the entry point module, theLog leveltoInfo, and theOutput styletoPretty. ClickCompile. You can then visit the local file from your web browserJGraphVWeb/war/JGraphVWebDemo.html.