switch(evt.getHandlerKey()) {
case PaintServer.KEY_FILL: {
Paint paint = (Paint)evt.getNewValue();
ShapeNode shapeNode = (ShapeNode)node;
Shape shape = shapeNode.getShape();
ShapePainter painter = shapeNode.getShapePainter();
if (painter instanceof FillShapePainter) {
FillShapePainter fp = (FillShapePainter)painter;
fp.setPaint(paint);
shapeNode.setShapePainter(fp);
} else if (painter instanceof CompositeShapePainter) {
CompositeShapePainter cp = (CompositeShapePainter)painter;
FillShapePainter fp = (FillShapePainter)cp.getShapePainter(0);
fp.setPaint(paint);
shapeNode.setShapePainter(cp);
}
break;
} case PaintServer.KEY_STROKE: {
Paint paint = (Paint)evt.getNewValue();
ShapeNode shapeNode = (ShapeNode)node;
Shape shape = shapeNode.getShape();
ShapePainter painter = shapeNode.getShapePainter();
if (painter instanceof StrokeShapePainter) {
StrokeShapePainter sp = (StrokeShapePainter)painter;
sp.setPaint(paint);
shapeNode.setShapePainter(sp);
} else if (painter instanceof CompositeShapePainter) {