I was looking for a java based visualization toolkit for quite a while. Either they are very static (image rendered and delivered without any interaction) or cost too much money or badly documented or plain buggy and incomplete. I found a toolkit called prefuse (link) on sourceforge which is an amazing piece of work done by Jeffrey Heer (link) of Berkeley University Stanford. Thanks for this and to the people in the forum (link) to continue the effort to answer questions.
Though it’s last release if dating 2007.10 it is feature complete and not really need to carry the beta tag, but never mind. The project migrated to flare (link) based on Flash and AS, but unfortunately that is not always the first choice, even more powerful in terms of graphics. But I wonder what would be missing. It is open source, so with community effort things can be implemented or even added.
It is released under BSD and can be used freely for commercial and non-commercial applications.
I am a true Netbean nerd, aka NB user and spent some time to get started with prefuse.
Today I wan to share with you the steps (i did) to get a running with prefuse and Netbeans running Windows.
(Please note, it might not be the perfect or smartest approach. I dont claim its the right way or complete, but I got it to work this way. )
I am sure this is very basic information for the prefuse experts, but other beginners might need to go through the same steps.
1. Donwload the file prefuse-beta-20071021.zip (link).
2. Unzip the file to folder.
3. Check for a properly set JAVA_HOME path, like
E:\Documents and Settings\SAM>echo %JAVA_HOME%
4. Open the file build.bat with text editor of your choice and change the follwoing line
(I removed the JAVA_HOME because java already is in the system PATH)
5. Open a DOS-Box (Windows, aka run.. CMD) and navigate to the folder with the build.bat file.
6. Execute ‘build.bat all’. You should get something like this:
prefuse and Netbeans: Build the jarfiles
7. Start Netbeans and create a new project (New, Choose project, Java, Java Application). Lets call it PrefuseDemo.
8. Open the project properties (right click on the project name in the project explorer) and select properties. Go to the libraries sectio and add prefuse.jar and demo.jar (required for the sample code). You find these files in the folder ‘build’ created by our build.bat.
9. Now you change the packagename (with the initial created Main.Java if selected) to prefusedemo.
10. In the build folder you also find a src folder with various sample java code. For this tutorial I took GraphView.java.
11. Create a new javaclass in the prefuse package with the name GraphView.
12. Copy the complete sourcecode from GraphView.java into it and replace the basic skeleton.
13. Fix the package name to package prefusedemo;
14. You can delete the Main.java if NB created it for you.
15. Build the project.
16. Right click onGraphView.java and select Run File. Finished ! You should see this:
prefuse and Netbeans: Run the demo
1. The other files (demos that come with the prefuse package) you can create the same way and add them into your demo application.
2. I tried to import the whole prefuse source folder into Netbeans via Import, but it didnt work.
Now we got started, lets move on to understand the prefuse concept and adapt some of the samples to our own applications or create new ones from the scratch ! Stay tuned for more prefuse !