Пример #1
0
 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;
 }
Пример #2
0
 public void undo() {
   if (shapes.size() > 0) shapes.remove(shapes.size() - 1);
 }
Пример #3
0
 public void clear() {
   shapes.clear();
 }
Пример #4
0
 public void addShape(Shape shape) {
   shapes.add(shape);
 }