All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sg.Quadrilateral

java.lang.Object
   |
   +----sg.Quadrilateral

public class Quadrilateral
extends Object
implements Polygon
The class Quadrilateral defines a four-sided geometric object.


Variable Index

 o p1
Member variables defining the four corners of the quadrilateral in clockwise order starting with the upper left-hand corner.
 o p2
Member variables defining the four corners of the quadrilateral in clockwise order starting with the upper left-hand corner.
 o p3
Member variables defining the four corners of the quadrilateral in clockwise order starting with the upper left-hand corner.
 o p4
Member variables defining the four corners of the quadrilateral in clockwise order starting with the upper left-hand corner.

Constructor Index

 o Quadrilateral()
Zero-parameter constructor that initializes all corners of the quadrilateral to (0,0).
 o Quadrilateral(Pixel, Pixel, Pixel, Pixel)
Four-parameter constructor

Method Index

 o paint(Graphics)
Draws the quadrilateral.

Variables

 o p1
 protected Pixel p1
Member variables defining the four corners of the quadrilateral in clockwise order starting with the upper left-hand corner.

 o p2
 protected Pixel p2
Member variables defining the four corners of the quadrilateral in clockwise order starting with the upper left-hand corner.

 o p3
 protected Pixel p3
Member variables defining the four corners of the quadrilateral in clockwise order starting with the upper left-hand corner.

 o p4
 protected Pixel p4
Member variables defining the four corners of the quadrilateral in clockwise order starting with the upper left-hand corner.

Constructors

 o Quadrilateral
 public Quadrilateral()
Zero-parameter constructor that initializes all corners of the quadrilateral to (0,0).

 o Quadrilateral
 public Quadrilateral(Pixel p1,
                      Pixel p2,
                      Pixel p3,
                      Pixel p4)
Four-parameter constructor

Methods

 o paint
 public void paint(Graphics g)
Draws the quadrilateral.

Parameters:
g - simple graphics device on which quadrilateral is drawn.

All Packages  Class Hierarchy  This Package  Previous  Next  Index