Tag: applets

  • Fun With Prefuse

    Couple of things I found using Prefuse that I’ll document here for reference (I had a hard time finding the answer to these).

    1. NullPointerException thrown by GraphMLReader

    This means there’s an issue in the XML, even if it’s valid according to W3Schools (which mine was). Double check it, for me it was an issue where I declare my keys – I’d created a key called “dist” but then I was referring to it by “type”. That kind of thing will cause an NPE, but no better explanation (and can be a total pain to fix).

    2. NullPointerException thrown in ColorAction

    If  you create an OrdinalMap for your DataColorAction, but at run time you’re getting an NPE or other exception (colors not showing) check that everything you have for that field is in your OrdinalMap. For instance, if your map contains “A”, “B” and “C”, but your GraphML refers to a “D” you’ll get an exception but no explanation as to what is missing, which can make it difficult to work out what’s going on.

    3. Converting to Applet

    Use JPrefuseApplet for this. Extend that for your applet class, and then you’ll want something like:

    this.getContentPane().add(new MyPrefuseCreation(graph));

    Where MyPrefuseCreation extends the Prefuse Display Object. You’ll probably need to change some bits of your code in accordance with this. Also, Display has a field called m_vis, which holds the visualization when you call the Display(Visualization) constructor.

    You’ll need to get in your graph by loading it from a URL, which you can make a parameter in your applet html embed code.

    Finally, when it came to embedding the applets, the html was fairly simple working from an example applet – check out the prefuse gallery and click view source to see how they do it.

    Loads of new graphs uploaded, see them here.

  • Release Time!

    Conversation graph for @kittenthebad

    Really excited to release the applets of my Twitter Conversation Networks, and also the Clique visualizations.

    Details here.

    I’m providing the option to get priority by making a loan on uOttawa WISE’s Kiva lending team.

    Although much of it is automated, each one takes me a little time to make, plus there is the time I’ve spent coding everything. So if you want to show some appreciation for my work, it would make me really happy if you would make a loan on Kiva. Kiva encourages sustainable development, and enables people – especially women – to lift themselves out of poverty by building a business. I think that’s awesome, so I hope that in providing this option I can do a little bit to help entrepreneurs in developing countries.