Package
Class
Tree
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
L
M
P
R
S
T
V
W
A
animate(int)
- Method in class
LongRoad
Runs the animation of driving the vehicles down the road for the number of turns (frames, ticks, etc).
B
Batmobile
- Class in
<Unnamed>
A Batmobile to drive down the road.
Batmobile()
- Constructor for class
Batmobile
Creates a new Batmobile object.
C
Canvas
- Class in
<Unnamed>
Class Canvas - a class to allow for simple graphical drawing on a canvas.
Canvas(String)
- Constructor for class
Canvas
Create a Canvas with default height, width and background color (300, 300, white).
Canvas(String, int, int)
- Constructor for class
Canvas
Create a Canvas with default background color (white).
Canvas(String, int, int, Color, int, int)
- Constructor for class
Canvas
Create a Canvas.
Car
- Class in
<Unnamed>
A Car to drive down the road.
Car()
- Constructor for class
Car
Creates a new Car object.
closeCanvas()
- Method in class
Canvas
close the window This method sets the Canvas to invisible, then disposes of it.
color
- Variable in class
Car
D
draw(Canvas)
- Method in class
Batmobile
Draws the Car on the given Canvas
draw(Shape)
- Method in class
Canvas
Draws the given shape with the current foreground color of the canvas.
draw(Canvas)
- Method in class
Car
Draws the Car on the given Canvas
draw(Canvas)
- Method in class
Truck
Draws the Truck on the given Canvas
draw(Canvas)
- Method in class
Vehicle
Draws the vehicle on the given canvas.
drawCircle(int, int, int)
- Method in class
Canvas
Draws a circle with the current foreground color of the canvas.
drawImage(Image, int, int)
- Method in class
Canvas
Draws an image onto the canvas.
drawLine(int, int, int, int)
- Method in class
Canvas
Draws a line on the Canvas.
drawRectangle(int, int, int, int)
- Method in class
Canvas
Draws a rectangle with the current foreground color of the canvas.
drawString(String, int, int)
- Method in class
Canvas
Draws a String on the Canvas.
drive()
- Method in class
Batmobile
Drive the Batmobile down the road.
drive()
- Method in class
Car
Drives the Car its speed, turning around if necessary.
drive()
- Method in class
Vehicle
Drives the vehicle its speed, turning around if necessary.
E
erase()
- Method in class
Canvas
Erase the whole canvas.
erase(Shape)
- Method in class
Canvas
Erase a portion of the canvas with the given shape.
eraseCircle(int, int, int)
- Method in class
Canvas
Erases a portion of the canvas in the shape of a circle.
eraseOutline(Shape)
- Method in class
Canvas
Erases a given shape's outline on the screen.
eraseRectangle(int, int, int, int)
- Method in class
Canvas
Erase a portion of the canvas in the shape of a rectangle.
F
facingRight
- Variable in class
Vehicle
fill(Shape)
- Method in class
Canvas
Fill the internal dimensions of a given shape with the current foreground color of the canvas.
fillCircle(int, int, int)
- Method in class
Canvas
Fill the internal dimensions of the given circle with the current foreground color of the canvas.
fillRectangle(int, int, int, int)
- Method in class
Canvas
Fill the internal dimensions of the given rectangle with the current foreground color of the canvas.
G
getBackgroundColor()
- Method in class
Canvas
Returns the current color of the background
getFont()
- Method in class
Canvas
Returns the current font of the canvas.
getForegroundColor()
- Method in class
Canvas
Returns the current color of the foreground.
getSize()
- Method in class
Canvas
Returns the size of the canvas.
H
HEIGHT
- Static variable in class
LongRoad
I
ImageUtils
- Class in
<Unnamed>
ImageUtils()
- Constructor for class
ImageUtils
isVisible()
- Method in class
Canvas
Provide information on visibility of the Canvas.
L
LENGTH
- Static variable in class
LongRoad
loadImage(String)
- Static method in class
ImageUtils
LongRoad
- Class in
<Unnamed>
A Long Road for vehicles to drive on
LongRoad()
- Constructor for class
LongRoad
Creates a new LongRoad object
LongRoadTester
- Class in
<Unnamed>
A Tester for the LongRoad program.
LongRoadTester()
- Constructor for class
LongRoadTester
M
main(String[])
- Static method in class
LongRoadTester
mirrorImage(BufferedImage)
- Static method in class
ImageUtils
P
position
- Variable in class
Vehicle
R
redraw()
- Method in class
LongRoad
Redraws the canvas each frame of the animation (a convenience method)
refresh()
- Method in class
Canvas
Refreshes the drawing the the canvas, to help with things that aren't showing up.
S
setBackgroundColor(Color)
- Method in class
Canvas
Sets the background color of the Canvas.
setFont(Font)
- Method in class
Canvas
changes the current Font used on the Canvas
setForegroundColor(Color)
- Method in class
Canvas
Sets the foreground color of the Canvas.
setSize(int, int)
- Method in class
Canvas
Sets the size of the canvas.
setVisible(boolean)
- Method in class
Canvas
Set the canvas visibility and brings canvas to the front of screen when made visible.
speed
- Variable in class
Vehicle
T
Truck
- Class in
<Unnamed>
A Truck to drive down the road.
Truck()
- Constructor for class
Truck
Creates a new Truck object.
turn()
- Method in class
Batmobile
Turns the Batmobile.
turn()
- Method in class
Truck
Turns the Truck--but trucks are too big to turn, so this method does nothing.
turn()
- Method in class
Vehicle
Turns the vehicle around.
V
Vehicle
- Class in
<Unnamed>
A Vehicle that can drive and turn down the road.
Vehicle()
- Constructor for class
Vehicle
Creates a new Vehicle object.
W
wait(int)
- Method in class
Canvas
Waits for a specified number of milliseconds before finishing.
A
B
C
D
E
F
G
H
I
L
M
P
R
S
T
V
W
Package
Class
Tree
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes