I am using prefuse, and I would like to know how to give different colors to different edges?
For example, I generate a graph which has 5 nodes from a XML file. Their numbers are 0,1,2,3,4. In the program, I want the edge of which the start node is 3 and the end node is 4 to be colored red, and other nodes be colored other colors. How can I do this?
You add a color action for VisualItem.STROKECOLOR
and give it the edge-group as a key, possibly with a predicate if you want to assign that colour only to certain edges
new ColorAction(GROUP_EDGES, (myPredicate, ) VisualItem.STROKECOLOR, myColor)