예제 #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);
 }