The Code
var view = new VisualizationView(name);
var visualization = new Visualization(view);
var p = new Path2D();
p.moveTo(50,50);
p.lineTo(100,100);
p.lineTo(100,150);
visualization.add(new DescribedContent(p, "red", null, null));
var a = new Arc2D(200,200,100,50,-30,60, Arc2D.PIE);
visualization.add(new DescribedContent(a, "blue", "red", null));
var r = new Rectangle2D(20,30,100,40);
visualization.add(new DescribedContent(r, "black", "green", null));
var e = new Ellipse2D(20,30,100,40);
visualization.add(new DescribedContent(e, "purple", "brown", null));
var quadraticCurve = new QuadCurve2D(120.0, 120.0, // End 1
300.0, 180.0, // Control
130.0, 190.0); // End 2
visualization.add(new DescribedContent(quadraticCurve,
"blue", null, null));
var cubicCurve = new CubicCurve2D(320.0, 320.0, // End 1
300.0, 180.0, // Control 1
330.0, 370.0, // Control 2
360.0, 390.0); // End 2
visualization.add(new DescribedContent(cubicCurve,
"orange", null, null));
var at = AffineTransform.getRotateAroundInstance(.25, 50., 50.);
var transformedP = at.createTransformedShape(p);
visualization.add(new DescribedContent(transformedP,
"yellow", null, null));
visualization.repaint();