Esempio n. 1
0
 /** Draw the circle with current specifications on screen. */
 private void draw() {
   if (isVisible) {
     Canvas canvas = Canvas.getCanvas();
     canvas.draw(
         this,
         color,
         new Ellipse2D.Double(
             xPosition, yPosition,
             diameter, diameter));
     canvas.wait(10);
   }
 }
Esempio n. 2
0
 /*
  * Erase the circle on screen.
  */
 private void erase() {
   Canvas canvas = Canvas.getCanvas();
   canvas.erase(new Ellipse2D.Double(xPosition, yPosition, diameter, diameter));
 }
Esempio n. 3
0
 /*
  * Draw the circle with current specifications on screen.
  */
 private void draw() {
   Canvas canvas = Canvas.getCanvas();
   canvas.setForegroundColour(color);
   canvas.fill(new Ellipse2D.Double(xPosition, yPosition, diameter, diameter));
   canvas.wait(10);
 }
Esempio n. 4
0
 /** Erase the circle on screen. */
 private void erase() {
   if (isVisible) {
     Canvas canvas = Canvas.getCanvas();
     canvas.erase(this);
   }
 }
Esempio n. 5
0
 /** Erase this ball at its current position. */
 public void erase() {
   canvas.eraseCircle(xPosition, yPosition, diameter);
 }
Esempio n. 6
0
 /** Draw this ball at its current position onto the canvas. */
 public void draw() {
   canvas.setForegroundColor(color);
   canvas.fillCircle(xPosition, yPosition, diameter);
 }