public class CircleShape extends Shape
Shape
, with multiple constructors to specify its
location, size, and color.Constructor and Description |
---|
CircleShape(int x,
int y)
CircleShape's simplest constructor, it only needs an x and y pixel
location on your window.
|
CircleShape(int x,
int y,
java.awt.Color color)
CircleShape constructor where the default size is 50.
|
CircleShape(int x,
int y,
int size)
CircleShape constructor where the default color is orange.
|
CircleShape(int x,
int y,
int size,
java.awt.Color color)
CircleShape constructor where every parameter is specified.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics2D graph)
draw method (overridden)
|
getHeight, getWidth, move, moveTo, onClick, onClick, onTimer, onTimer, remove, stopTimer
collidesWith, contains, getBackgroundColor, getBounds, getForegroundColor, getWindow, getX, getY, onClick, repaint, setBackgroundColor, setForegroundColor, setX, setY
public CircleShape(int x, int y)
x
- x axis location in pixelsy
- y axis location in pixelspublic CircleShape(int x, int y, java.awt.Color color)
x
- x axis location in pixelsy
- y axis location in pixelscolor
- The awt.Color chosen for this circlepublic CircleShape(int x, int y, int size)
x
- x axis location in pixelsy
- y axis location in pixelssize
- the width and height of your circle in pixels.public CircleShape(int x, int y, int size, java.awt.Color color)
x
- x axis location in pixelsy
- y axis location in pixelssize
- the width and height of your circle in pixels.color
- The awt.Color chosen for this circle