public List<Object[]> getShapes() { List<Object[]> shapesCollection = new ArrayList<Object[]>(); for (int i = 0; i < shapes.size(); i++) { shapesCollection.add(shapes.get(i).toObjectArray()); } return shapesCollection; }
public void undo() { if (shapes.size() > 0) shapes.remove(shapes.size() - 1); }
public void clear() { shapes.clear(); }
public void addShape(Shape shape) { shapes.add(shape); }