Package Shapes
Class MyShape
java.lang.Object
Shapes.MyShape
- Direct Known Subclasses:
FreeDrawShape,MyBoundedShape,MyLine
public abstract class MyShape
extends java.lang.Object
class that represent the basic attributes of shape
- Author:
- Itay Finci
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MyShape(java.awt.Point origin, java.awt.Point target, java.awt.Color color, int thickness)basic constructor that keeps encapsulation -
Method Summary
Modifier and Type Method Description abstract voiddraw(java.awt.Graphics g)shapes will implement this method to be drawn
-
Field Details
-
Constructor Details
-
MyShape
public MyShape(java.awt.Point origin, java.awt.Point target, java.awt.Color color, int thickness)basic constructor that keeps encapsulation- Parameters:
origin- the point the shape is startedtarget- the point the shape endcolor- the color of the shapethickness- the line thickness
-
-
Method Details
-
draw
public abstract void draw(java.awt.Graphics g)shapes will implement this method to be drawn- Parameters:
g- the graphics manager
-