Index of all Fields and Methods
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

A

AppFrame(String, Applet, int, int). Constructor for class .AppFrame
Creates a new Frame titled according to the first parameter, resizing it to the width and height passed as the last two parameters, and containing the Applet passed as the second parameter.
AppFrame(String, Applet[], int, int). Constructor for class .AppFrame
Creates a new Frame titled according to the first parameter, resizing it to the width and height passed as the last two parameters, and containing the array of Applets passed as the second parameter.

C

crawl(Spider, int). Method in class .Room
This method advances a spider in its current direction and draws a trail of colored "silk" to mark the spider's path.

D

Draw_Box(). Constructor for class .Draw_Box
drawSpider(Spider, Graphics). Method in class .Room
This method draws a Spider object at its current coordinates in the room.
drawTo(Spider, int, int). Method in class .Room
This method relocates a spider to the specified X, Y coordinates within the room, leaving a silk trail.
drawTo(Spider, Point). Method in class .Room
This method relocates a spider to the specified X, Y coordinates within the room, leaving a silk trail.

E

EAST. Static variable in class .Room
The spider faces or moves toward the right wall of the room

G

getBelly(). Method in class .Spider
Returns the color of this spider's belly.
getHeading(). Method in class .Spider
Reports the current direction (heading) of this spider.
getSilk(). Method in class .Spider
Returns the current color of this spider's "silk".
getXY(). Method in class .Spider
Reports the current coordinates of this spider within the Room.

H

handleEvent(Event). Method in class .AppFrame
Overrides java.awt.Component.handleEvent() to be able to exit the application on a mouse click over the "X" button in the top right corner of the graphics window.

I

init(). Method in class .Room
This method overrides java.applet.Applet.init() to perform initialization once the Graphics object (graphics context) of the drawable surface has been established.
isAtWall(Spider). Method in class .Room
This method returns "true" if the spider is at a wall and faces the wall, it returns "false" otherwise.

J

jumpTo(Spider, int, int). Method in class .Room
This method relocates a spider to the specified X, Y coordinates within the room, without leaving a silk trail.
jumpTo(Spider, Point). Method in class .Room
This method relocates a spider to the specified X, Y coordinates within the room, without leaving a silk trail.
jumpToMiddle(Spider). Method in class .Room
This method relocates a spider to the center of the room.

M

main(String[]). Static method in class .Draw_Box
main(String[]). Static method in class .Room
This is the builtin test program of the Room class.
main(String[]). Static method in class .SpiderApp1
main(String[]). Static method in class .SpiderApp2
main(String[]). Static method in class .SpiderApp3
main(String[]). Static method in class .SpiderApp4
main(String[]). Static method in class .SpiderApp5
main(String[]). Static method in class .SpiderApp6
main(String[]). Static method in class .SpiderApp7
main(String[]). Static method in class .Spiral
main(String[]). Static method in class .ThreeRoomFlat
main(String[]). Static method in class .Worm_and_Apple
myFullSize. Variable in class .Room
The width and height of the drawing area, in pixels
mySurface. Variable in class .Room
The Graphics object, context or handle to use for drawing in the room

N

NORTH. Static variable in class .Room
The spider faces or moves toward the top wall of the room

R

Room(). Constructor for class .Room

S

setHeading(int). Method in class .Spider
Turn toward the specified direction.
setSilk(Color). Method in class .Spider
Changes the color of this spider's "silk".
setXY(int, int). Method in class .Spider
Records this spider as being at the "newX, newY" coordinates of the Room.
setXY(Point). Method in class .Spider
Records this spider as being at the "newSpot" Point of the Room.
showMe(Spider). Method in class .Room
This method displays a spider and updates the room so that all silk trails laid since the last repaint() become visible.
showRoom(). Method in class .Room
This method displays all silk trails laid since the last call to repaint(), showMe() or showRoom().
SOUTH. Static variable in class .Room
The spider faces or moves toward the bottom wall of the room
Spider(). Constructor for class .Spider
Creates a red-bellied spider initially drawing green "silk", targeted for the origin (0, 0) of the drawing surface, facing NORTH (constant defined in Room, meaning vertically up on the screen).
Spider(int, int, int, Color, Color). Constructor for class .Spider
Places a new spider at the X, Y coordinates specified by the first two parameters, headed in the direction specified by the third parameter, drawing "silk" in the color specified by the fourth parameter, and with its belly color specified by the final parameter.
Spider(Point, int, Color, Color). Constructor for class .Spider
Places a new spider at the point specified by the first parameter, headed in the direction specified by the second parameter, drawing "silk" in the color specified by the third parameter, and with its belly color specified by the final parameter.
SpiderApp1(). Constructor for class .SpiderApp1
SpiderApp2(). Constructor for class .SpiderApp2
SpiderApp3(). Constructor for class .SpiderApp3
SpiderApp4(). Constructor for class .SpiderApp4
SpiderApp5(). Constructor for class .SpiderApp5
SpiderApp6(). Constructor for class .SpiderApp6
SpiderApp7(). Constructor for class .SpiderApp7
Spiral(). Constructor for class .Spiral

T

ThreeRoomFlat(). Constructor for class .ThreeRoomFlat
turnLeft(). Method in class .Spider
Specifies that this spider is to turn left (90 degrees) relative to its current direction (heading).
turnRight(). Method in class .Spider
Specifies that this spider is to turn right (90 degrees) relative to its current direction (heading).

U

update(Graphics). Method in class .Room
This method overrides java.awt.Component.update() to prevent it from clearing the background every time it calls paint().

V

veer(Spider, int, int). Method in class .Room
This method advances a spider in its current direction biased by a positive or negative offset, and draws a trail of colored "silk" to mark the spider's path.

W

WEST. Static variable in class .Room
The spider faces or moves toward the left wall of the room
Worm_and_Apple(). Constructor for class .Worm_and_Apple