}
/** Utility function to add the "ports" to the composite figure.
*/
public void addPorts(CompositeFigure tc) {
Figure p1 = new BasicEllipse(150.0, 100.0, 20.0, 20.0, Color.red);
p1.translate(-10, -10);
Figure p2 = new BasicEllipse(200.0, 150.0, 20.0, 20.0, Color.blue);
p2.translate(-10, -10);
Figure p3 = new BasicEllipse(150.0, 200.0, 20.0, 20.0, Color.yellow);
p3.translate(-10, -10);
Figure p4 = new BasicEllipse(100.0, 150.0, 20.0, 20.0, Color.magenta);
p4.translate(-10, -10);
tc.add(p1);
tc.add(p2);
tc.add(p3);
tc.add(p4);
p1.setInteractor(defaultInteractor);
p2.setInteractor(defaultInteractor);
p3.setInteractor(defaultInteractor);
p4.setInteractor(defaultInteractor);
}