private NodeRendererTutorial(AppContext context) {
final BasicGraphController bgc = new BasicGraphController();
// Build the renderers
NodeRenderer defaultRenderer = new BasicNodeRenderer(bgc,
new Ellipse2D.Double(0.0, 0.0, 40.0, 40.0),
new Ellipse2D.Double(0.0, 0.0, 600.0, 600.0), Color.gray,
Color.gray, .3);
NodeRenderer stringRenderer = new BasicNodeRenderer(bgc,
new Ellipse2D.Double(0.0, 0.0, 40.0, 40.0),
new Ellipse2D.Double(0.0, 0.0, 600.0, 600.0), Color.blue,
Color.blue, .3);
NodeRenderer integerRenderer = new BasicNodeRenderer(bgc,
new Rectangle2D.Double(0.0, 0.0, 40.0, 40.0),
new Rectangle2D.Double(0.0, 0.0, 600.0, 600.0), Color.orange,
Color.orange, .3);
NodeRenderer setRenderer = new BasicNodeRenderer(bgc,
new Ellipse2D.Double(0.0, 0.0, 40.0, 40.0),
new Ellipse2D.Double(0.0, 0.0, 600.0, 600.0), Color.red,
Color.red, .3);
TypedNodeRenderer typedRenderer = new TypedNodeRenderer(bgc,
defaultRenderer);