Class Circle
- java.lang.Object
-
- Circle
-
public class Circle extends Object
A circle that can be drawn on the UI, and can grow and shrink.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
draw()
Draws the circle on the UIvoid
erase()
Erases the circle from the UIvoid
grow()
Makes the circle grow 5 pixelsvoid
shrink(double amount)
Makes the circle shrink by the provided amount.
-
-
-
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 screensize
- The initial diameter of the circlecolor
- 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
-
-