Package Shapes

Class MyOval

java.lang.Object
Direct Known Subclasses:
MyCircle

public class MyOval
extends MyBoundedShape
makes a oval and draws it
Author:
Itay Finci
  • Field Summary

    Fields inherited from class Shapes.MyShape

    color, origin, stroke, target, thickness
  • Constructor Summary

    Constructors 
    Constructor Description
    MyOval​(java.awt.Point origin, java.awt.Point target, java.awt.Color color, boolean filled, int thickness)
    makes a new oval
  • Method Summary

    Modifier and Type Method Description
    void draw​(java.awt.Graphics g)
    shapes will implement this method to be drawn

    Methods inherited from class Shapes.MyBoundedShape

    calculateHeight, calculateWidth, findStart, isFilled

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MyOval

      public MyOval​(java.awt.Point origin, java.awt.Point target, java.awt.Color color, boolean filled, int thickness)
      makes a new oval
      Parameters:
      origin - the origin point of the oval
      target - the end point of the oval
      color - the color of the oval
      filled - if the oval is filled or outlined
      thickness - the line thickness
  • Method Details

    • draw

      public void draw​(java.awt.Graphics g)
      Description copied from class: MyShape
      shapes will implement this method to be drawn
      Specified by:
      draw in class MyShape
      Parameters:
      g - the graphics manager