Class Circle


  • public class Circle
    extends Object
    A circle that can be drawn on the UI, and can grow and shrink.
    • Constructor Detail

      • Circle

        public Circle​(double x,
                      double y,
                      double size,
                      Color color)
        Constructor for a circle.
        Parameters:
        x - ,y The position of the circle on the screen
        size - The initial diameter of the circle
        color - The colour of the circle
    • Method Detail

      • grow

        public void grow()
        Makes the circle grow 5 pixels
      • shrink

        public void shrink​(double amount)
        Makes the circle shrink by the provided amount.
        Parameters:
        amount - The number of pixels to shrink the circle.
      • draw

        public void draw()
        Draws the circle on the UI
      • erase

        public void erase()
        Erases the circle from the UI