Package Shapes
Class MyCircle
java.lang.Object
Shapes.MyShape
Shapes.MyBoundedShape
Shapes.MyOval
Shapes.MyCircle
public class MyCircle extends MyOval
a circle defined by two points, restricts to a valid circle!
- Author:
- Itay Finci
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MyCircle(java.awt.Point origin, java.awt.Point target, java.awt.Color color, boolean filled, int thickness)makes a new circle -
Method Summary
Modifier and Type Method Description protected intcalculateHeight()protected intcalculateWidth()
-
Constructor Details
-
MyCircle
public MyCircle(java.awt.Point origin, java.awt.Point target, java.awt.Color color, boolean filled, int thickness)makes a new circle- Parameters:
origin- the origin point of the ovaltarget- the end point of the ovalcolor- the color of the ovalfilled- if the oval is filled or outlinedthickness- the line thickness
-
-
Method Details
-
calculateHeight
protected int calculateHeight()- Overrides:
calculateHeightin classMyBoundedShape- Returns:
- the abs value of the height of the shape
-
calculateWidth
protected int calculateWidth()- Overrides:
calculateWidthin classMyBoundedShape- Returns:
- the abs value of the width of the shape
-