I am new to prefuse and don't understand several things regarding nodes.
- How can I get an event raised whenever a node clicked?
- How can I group similar nodes with the same color?
- How can I keep an extra meta-data on every node?
Its important to say that I build the graph in real-time and not loading it from any file.
Thanks, Ozrad.
Three answers to your three questions:
prefuse.controls.ControlAdapterand add it to theDisplay.prefuse.action.assignment.DataColorActionassigns color based on a data field. For more advanced scenarios you can useColorActionwith predicates or extend the classDataColorAction.You can add columns to the node table to store metadata. A column can also store objects if you need it: