DrawingAPI object = (DrawingAPI) shape.getGraphicObjectByIndex(i);
System.out.println(shape.getGraphicObjectByIndex(i).toString());
if(shape.getGraphicObjectByIndex(i).toString().contains("Dreieck")) {
shape.switchObjectTo(new DreieckRot(object.getX(), object.getY(), object.getWidth(), object.getHeight()), i);
}
else if(shape.getGraphicObjectByIndex(i).toString().contains("Rechteck")) {
shape.switchObjectTo(new RechteckRot(object.getX(), object.getY(), object.getWidth(), object.getHeight()), i);
}