public void drawObjects(Canvas canvas) {
   for (int i = 0; i < drawableObjects.size(); i++) {
     tempDO = drawableObjects.get(i);
     if (tempDO.getActiveState()) {
       tempDO.draw(canvas);
       tempDO.nextState();
     }
   }
 }
예제 #2
0
 /**
  * Write information of the circle to a file
  *
  * @param dos DataOutputStream
  */
 public void write(DataOutputStream dos) throws IOException {
   dos.writeBytes("DrawableCircle" + "\n");
   super.write(dos);
   dos.writeInt(getRadius());
 }