Package Shapes
Class MyRectangle
java.lang.Object
Shapes.MyShape
Shapes.MyBoundedShape
Shapes.MyRectangle
public class MyRectangle extends MyBoundedShape
a rectangle shape class that knows how to draw the rectangle
- Author:
- Itay Finci
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MyRectangle(java.awt.Point origin, java.awt.Point target, java.awt.Color color, boolean isFilled, int thickness)makes new rectangle -
Method Summary
Modifier and Type Method Description voiddraw(java.awt.Graphics g)shapes will implement this method to be drawnMethods inherited from class Shapes.MyBoundedShape
calculateHeight, calculateWidth, findStart, isFilled
-
Constructor Details
-
MyRectangle
public MyRectangle(java.awt.Point origin, java.awt.Point target, java.awt.Color color, boolean isFilled, int thickness)makes new rectangle- Parameters:
origin- the origin of the rectangletarget- the end of the rectanglecolor- the color of the rectangleisFilled- if the rectangle is filled or outlinedthickness- the line thickness
-
-
Method Details