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

A

AbstractVehicle - class vehicle.AbstractVehicle.
An AbstractVehicle has the current World and a MovementTracker.
AbstractVehicle(World) - Constructor for class vehicle.AbstractVehicle
Initialize variables for the vehicle.
actionPerformed(ActionEvent) - Method in class world.World
Called by timer when it's running.
addVehicle(AbstractVehicle) - Method in class world.World
Registers a moving object with the controller Duplicates are allowed.
addWorldObject(Background) - Method in class world.World
Registers a non-moving world object with the controller.
AutomaticRightMovingV - class vehicle.AutomaticRightMovingV.
An AutoBasicVehicle demostrates the correct usage of the update() method to automatically update the state of this vehicle.
An AutoBasicVehicle will automatically move left to right on the world and return to the left side of the world once it passes the right side.
AutomaticRightMovingV(World) - Constructor for class vehicle.AutomaticRightMovingV
Creates a automatically moving vehicle
aWorld - Variable in class world.WinEnv.SimPanel
 

B

background - package background
 
background - Variable in class world.World
 
Background - class background.Background.
A "background" is a graphical image.
Background(double, double, double, double) - Constructor for class background.Background
Initialize attributes for this Background
BaseballField - class background.BaseballField.
A background representing a baseball field.
BaseballField(double, double, double, double) - Constructor for class background.BaseballField
Initialize attributes for this BaseballField
BasicVehicle - class vehicle.BasicVehicle.
Basic Vehicle implementation.
BasicVehicle(World) - Constructor for class vehicle.BasicVehicle
Create a very simple movement vehicle
bg - Variable in class world.WinEnv.SimPanel
 
body - Variable in class vehicle.BasicVehicle
 
buttons - Variable in class world.WinEnv
 

C

characters - Variable in class world.World
 
container - Variable in class vehicle.MovementTracker
 
createButtons() - Method in class world.WinEnv
Creates all the buttons and puts them in a panel.
createShapes() - Method in class vehicle.BasicVehicle
Create all our shapes representing this vehicle.

D

defaultFilename - Static variable in class world.WorldCreator
Name of a file to use if a good file name is not supplied as a parameter.
DemoSim - class DemoSim.
Main class that demostrate some funtionality of the framework
DemoSim() - Constructor for class DemoSim
 
draw(Graphics2D) - Method in class background.Tree
Use the graphics system to draw the shapes representing this Tree
draw(Graphics2D) - Method in class background.Road
Use the graphics system to actually draw the shapes we have created.
draw(Graphics2D) - Method in class background.Lake
Use the graphics system to draw the shapes representing this Lake
draw(Graphics2D) - Method in class background.Intersection
Use the graphics system to draw the shapes representing this Intersection
draw(Graphics2D) - Method in class background.House
Use the graphics system to draw the shapes representing this House
draw(Graphics2D) - Method in class background.BaseballField
Use the graphics system to draw the shapes representing this BaseballField
draw(Graphics2D) - Method in class background.Background
Use the graphics system to draw the shapes representing this Background
draw(Graphics2D) - Method in class vehicle.BasicVehicle
Use the graphics system to actually paint the shapes we have created.
draw(Graphics2D) - Method in class vehicle.AbstractVehicle
Use the graphics system to actually paint the shapes we have created.
draw(Graphics2D) - Method in class world.World
Tells the graphics system what to draw on screen by going through all the objects in the world and telling them to draw themselves.

E

environment - Variable in class world.World
 
externalName - Variable in class background.Background
Name by which this background icon is known to the world (for example, in a text input file).

F

focusGained(FocusEvent) - Method in class world.WinEnv.SimPanel
Nothing to do, but required by the interface.
focusLost(FocusEvent) - Method in class world.WinEnv.SimPanel
Lost the focus -- try to get it back.
FPS - Static variable in class world.World
 
frame - Variable in class world.WinEnv
 

G

getCurrentContainer() - Method in class vehicle.MovementTracker
Retreives the current outline of the shapes
getFile() - Static method in class world.WorldCreator
[DO include in the starter code] Displays a dialog box to choose the file, if the requested one doesn't exist.
getFile(String) - Static method in class world.WorldCreator
Locate the requested file, if possible, or a file selected by the user.
getHeight() - Method in class background.Background
Returns the height of this Background
getKeyPressed(int) - Method in class world.World
Tells whether a given button on the keyboard is pressed.
getName() - Method in class background.Background
A name by which this background icon is known to the world (for example, in a text file).
getOrientation() - Method in class vehicle.MovementTracker
Gets the orientation changed from the inital drawing
getOrientation() - Method in class vehicle.AbstractVehicle
Gets the orientation changed from the inital drawing
getPanelSize() - Method in class world.WinEnv
Gets the size of the main panel
getSize() - Method in class world.World
Return the size of this world
getTracker() - Method in class vehicle.AbstractVehicle
Retrieves the MovementTracker.
getTransform() - Method in class vehicle.MovementTracker
Get the affine transform of this vehicle from global to local space
getVehicles() - Method in class world.World
Return the list of moving objects currently registered with the controller
getWidth() - Method in class background.Background
Returns the width of this Background
getX() - Method in class background.Background
Returns the x position of this Background
getX() - Method in class vehicle.MovementTracker
Returns the current x position of the center point of all the shapes contained in this tracker
getX() - Method in class vehicle.AbstractVehicle
Returns the current x position of the center point of all the shapes contained in this tracker.
getY() - Method in class background.Background
Returns the y position of this Background
getY() - Method in class vehicle.MovementTracker
Returns the current y position of the center point of all the shapes contained in this tracker
getY() - Method in class vehicle.AbstractVehicle
Returns the current y position of the center point of all the shapes contained in this tracker.

H

handleCollision(AbstractVehicle) - Method in class vehicle.AbstractVehicle
Handles a collision with another vehicle.
head - Variable in class vehicle.BasicVehicle
 
height - Variable in class background.Background
 
HorizontalRoad - class background.HorizontalRoad.
 
HorizontalRoad(double, double, double, double) - Constructor for class background.HorizontalRoad
Initialize variables for the vehicle
House - class background.House.
A background representing a house.
House(double, double, double, double) - Constructor for class background.House
Initialize attributes for this House

I

Intersection - class background.Intersection.
A background representing a road intersection.
Intersection(double, double, double, double) - Constructor for class background.Intersection
Initialize attributes for this Intersection
isVertical - Variable in class background.Road
 

K

KEY_A - Static variable in class world.World
 
KEY_D - Static variable in class world.World
 
KEY_DOWN - Static variable in class world.World
 
KEY_LEFT - Static variable in class world.World
 
KEY_RIGHT - Static variable in class world.World
 
KEY_S - Static variable in class world.World
 
KEY_SPACE - Static variable in class world.World
 
KEY_UP - Static variable in class world.World
 
KEY_W - Static variable in class world.World
 
keyPressed(KeyEvent) - Method in class world.World
Handle the key pressed event
keyReleased(KeyEvent) - Method in class world.World
Handle the key released event
keysPressed - Variable in class world.World
 
keyTyped(KeyEvent) - Method in class world.World
Handle the key typed event

L

Lake - class background.Lake.
A background representing a lake
Lake(double, double, double, double) - Constructor for class background.Lake
Initialize attributes for this Lake

M

main(String[]) - Static method in class DemoSim
Main Method
modifyWorld(String, World) - Static method in class world.WorldCreator
Modifies a currently existing World by adding Background objects specified in the fileName.
modifyWorld(World) - Static method in class world.WorldCreator
Modifies a World with Background objects taken from a file.
moveBy(double, double) - Method in class vehicle.MovementTracker
Move by xoffset and yoffset pixels
moveBy(double, double) - Method in class vehicle.AbstractVehicle
Move by xoffset and yoffset pixels.
MovementTracker - class vehicle.MovementTracker.
A MovementTracker tracks the current position and orientation of an object with graphics components.
MovementTracker() - Constructor for class vehicle.MovementTracker
Creates a tracker
moveTo(double, double) - Method in class vehicle.MovementTracker
Move to (x, y) in the world
moveTo(double, double) - Method in class vehicle.AbstractVehicle
Move to (x, y) in the world.
mvTrack - Variable in class vehicle.AbstractVehicle
 

N

NUM_KEYS - Static variable in class world.World
 

O

orientation - Variable in class vehicle.MovementTracker
 

P

paintComponent(Graphics) - Method in class world.WinEnv.SimPanel
Ask the world to draw itself.
panel - Variable in class world.WinEnv
 
posX - Variable in class vehicle.MovementTracker
 
posY - Variable in class vehicle.MovementTracker
 

R

redraw() - Method in class world.WinEnv
Redraws the entire main content panel
registerShape(Shape) - Method in class vehicle.MovementTracker
Registers a shape as part of this tracker to track.
Road - class background.Road.
 
Road(double, double, double, double) - Constructor for class background.Road
Initialize variables for the vehicle
rotateBy(double) - Method in class vehicle.MovementTracker
Rotate shapes by theta with postive sign meaning clockwise
rotateBy(double) - Method in class vehicle.AbstractVehicle
Rotate shapes by theta with postive sign meaning clockwise

S

setOrientation(double) - Method in class vehicle.AbstractVehicle
Set the current orientation with postive sign meaning clockwise.
setRotation(double) - Method in class vehicle.MovementTracker
Set the current rotation with postive sign meaning clockwise
start() - Method in class world.World
Handles start button
startX - Variable in class vehicle.MovementTracker
 
startY - Variable in class vehicle.MovementTracker
 
stop() - Method in class world.World
Handles stop button

T

tail - Variable in class vehicle.BasicVehicle
 
theWorld - Variable in class vehicle.AbstractVehicle
 
theWorld - Variable in class world.WinEnv
 
timer - Variable in class world.World
 
Tree - class background.Tree.
A background representing a tree
Tree(double, double, double, double) - Constructor for class background.Tree
Initialize attributes for this Tree

U

update() - Method in class vehicle.BasicVehicle
Called by World when it's time to update.
update() - Method in class vehicle.AutomaticRightMovingV
Called by World when it's time to update.
update() - Method in class vehicle.AbstractVehicle
Called by World when it's time to update.
update(double) - Method in class background.Background
Updates the background in some particular way.

V

vehicle - package vehicle
 
VerticalRoad - class background.VerticalRoad.
 
VerticalRoad(double, double, double, double) - Constructor for class background.VerticalRoad
Initialize variables for the vehicle

W

width - Variable in class background.Background
 
WinEnv - class world.WinEnv.
A WinEnv contains windowing and panel code.
WinEnv.SimPanel - class world.WinEnv.SimPanel.
Our main panel class simply contains a white panel that always requests to have the focus
WinEnv.SimPanel(World) - Constructor for class world.WinEnv.SimPanel
Creates the panel
WinEnv(World) - Constructor for class world.WinEnv
Create our window and buttons and registers the world.
world - package world
 
World - class world.World.
The World class contains all the world management code.
World() - Constructor for class world.World
Creates our World, empty.
WorldCreator - class world.WorldCreator.
A WorldCreator creates a World with particular Background objects whose description and location are given in a specified file, where each line of data is of the following format:

backgroundName xCoordinate yCoordinate width height

where backgroundName is the predetermined name refering to some background (e.g.
WorldCreator() - Constructor for class world.WorldCreator
 

X

xCoor - Variable in class background.Background
xCoor and yCoor together represent the TOP-LEFT coordinate of the Background.

Y

yCoor - Variable in class background.Background
 

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