All Packages  Class Hierarchy

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Index of all Fields and Methods

C

clearRect(int, int, int, int). Method in class sg.Graphics
Clear rectangle on grid by filling with spaces ' '.
cols. Variable in class sg.Graphics
The number of columns on the drawing canvas.

D

drawBorder(). Method in class sg.Graphics
Draws border around canvas.
drawLine(int, int, int, int). Method in class sg.Graphics
Draw a line on the grid from point (x1,y1) to (x2,y2)

E

equals(Pixel). Method in class sg.Pixel
Checks whether two pixels are equal.

G

Graphics(). Constructor for class sg.Graphics
Default constructor that constructs a 50 x 50 canvas.
Graphics(int, int). Constructor for class sg.Graphics
Two-parameter constructor.
grid. Variable in class sg.Graphics
A two dimensional array that is used as the drawing canvas or tablet.

I

isParallel(Line). Method in class sg.Line
Returns true if the slope of the object line is the same as the slope of the line L.

L

Line(). Constructor for class sg.Line
Default zero-parameter constructor that sets the line to the default line consisting of a single pixel at (0,0).
Line(Pixel, Pixel). Constructor for class sg.Line
Two-parameter constructor

M

move(int, int). Method in class sg.Pixel
Moves the pixel to the specified location.

P

p1. Variable in class sg.Quadrilateral
Member variables defining the four corners of the quadrilateral in clockwise order starting with the upper left-hand corner.
p2. Variable in class sg.Quadrilateral
Member variables defining the four corners of the quadrilateral in clockwise order starting with the upper left-hand corner.
p3. Variable in class sg.Quadrilateral
Member variables defining the four corners of the quadrilateral in clockwise order starting with the upper left-hand corner.
p4. Variable in class sg.Quadrilateral
Member variables defining the four corners of the quadrilateral in clockwise order starting with the upper left-hand corner.
paint(Graphics). Method in class sg.Line
Draws the line on the graphic device g.
paint(Graphics). Method in interface sg.Polygon
Paint the polygon on the graphics device g.
paint(Graphics). Method in class sg.Quadrilateral
Draws the quadrilateral.
Parallelogram(Pixel, Pixel, Pixel, Pixel). Constructor for class sg.Parallelogram
Four-parameter constructor.
Pixel(). Constructor for class sg.Pixel
Constructs and initializes a Pixel initialized with (0, 0).
Pixel(int, int). Constructor for class sg.Pixel
Constructs and initializes a Pixel from the specified x and y coordinates.
Pixel(Pixel). Constructor for class sg.Pixel
Constructs and initializes a Pixel with the same location as the specified Pixel.

Q

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

R

Rectangle(Pixel, Pixel, Pixel, Pixel). Constructor for class sg.Rectangle
Four-parameter constructor.
rows. Variable in class sg.Graphics
The number of rows on the drawing canvas.

S

show(). Method in class sg.Graphics
Display the grid on the standard output.
slope(). Method in class sg.Line
Computes the slope of the line.
Square(Pixel, Pixel, Pixel, Pixel). Constructor for class sg.Square
Four parameter constructor insures that new object is a square.

T

toString(). Method in class sg.Pixel
Returns the String representation of the object Pixel.
translate(int, int). Method in class sg.Pixel
Translates the pixel.
Trapezoid(Pixel, Pixel, Pixel, Pixel). Constructor for class sg.Trapezoid
Four-parameter constructor.