*/
protected void update(ConnectionData data) {
if(!(data instanceof BezierConnectionData)){
throw new IllegalArgumentException("Expected BezierConnectionData");
}
BezierConnectionData bdata = (BezierConnectionData) data;
if( bdata.getPoints().size() != 2 ){
throw new IllegalArgumentException("Expected two connection points");
}
if( bdata.getControlPoints().size() != 2 ){
throw new IllegalArgumentException("Expected two control points");
}
curve.draw(
(Point)bdata.getPoints().get(0),
(Point)bdata.getPoints().get(1),
(Point)bdata.getControlPoints().get(0),
(Point)bdata.getControlPoints().get(1));
}