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.
-
p1
- Member variables defining the four corners of the quadrilateral in
clockwise order starting with the upper left-hand corner.
-
p2
- Member variables defining the four corners of the quadrilateral in
clockwise order starting with the upper left-hand corner.
-
p3
- Member variables defining the four corners of the quadrilateral in
clockwise order starting with the upper left-hand corner.
-
p4
- Member variables defining the four corners of the quadrilateral in
clockwise order starting with the upper left-hand corner.
-
Quadrilateral()
- Zero-parameter constructor that initializes all corners of the
quadrilateral to (0,0).
-
Quadrilateral(Pixel, Pixel, Pixel, Pixel)
- Four-parameter constructor
-
paint(Graphics)
- Draws the quadrilateral.
p1
protected Pixel p1
- Member variables defining the four corners of the quadrilateral in
clockwise order starting with the upper left-hand corner.
p2
protected Pixel p2
- Member variables defining the four corners of the quadrilateral in
clockwise order starting with the upper left-hand corner.
p3
protected Pixel p3
- Member variables defining the four corners of the quadrilateral in
clockwise order starting with the upper left-hand corner.
p4
protected Pixel p4
- Member variables defining the four corners of the quadrilateral in
clockwise order starting with the upper left-hand corner.
Quadrilateral
public Quadrilateral()
- Zero-parameter constructor that initializes all corners of the
quadrilateral to (0,0).
Quadrilateral
public Quadrilateral(Pixel p1,
Pixel p2,
Pixel p3,
Pixel p4)
- Four-parameter constructor
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