Basic Drawing
First step is to create a new actionlist, actions are added to the list using the actionlists add() function.
ActionList draw = new ActionList();
Color Actions are actions which determine the coloring of node and edge objects. Arguments given to the ColorAction constructor are :
- object to color
- Which part of the object to color
- TextColor : Color of the text
- StrokeColor : Color of the objects border
- FillColor : Color used to fill the object
- Color to use, Prefuse provides a ColorLib object to define colors in RGB or Grayscale
draw.add(new ColorAction("graph.nodes", VisualItem.STROKECOLOR, ColorLib.rgb(255, 255, 255)));
draw.add(new ColorAction("graph.nodes", VisualItem.TEXTCOLOR, ColorLib.rgb(0, 0, 0)));
draw.add(new ColorAction("graph.edges", VisualItem.FILLCOLOR, ColorLib.gray(200)));
draw.add(new ColorAction("graph.edges", VisualItem.STROKECOLOR, ColorLib.gray(200)));