Three answers to your three questions:
- The best way to react on node clicks is to extend
prefuse.controls.ControlAdapter
and add it to theDisplay
. prefuse.action.assignment.DataColorAction
assigns color based on a data field. For more advanced scenarios you can useColorAction
with 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:
vg.getNodeTable().addColumn("meta", MyMetaData.class);