A B G M N P S

A

action() - Method in class Ball
Perform an appropriate action on each cycle of the simulation
action() - Method in interface SimThing
Perform desired action for one simulation cycle.
add(SimThing) - Method in class SimModel
Add the given SimThing to the world after this cycle is complete.
addView(SimView) - Method in class SimModel
Add the given SimView to the list of viewers to be notified each cycle.

B

Ball - class Ball.
A small ball object that wanders randomly around a bounded area.
Ball(int, int, int, int, Color, int, int, int) - Constructor for class Ball
Construct a new Ball
BallGraphicsView - class BallGraphicsView.
Graphical viewer for Ball simulation.
BallGraphicsView() - Constructor for class BallGraphicsView
 
BallSim - class BallSim.
Demonstration program for simple simulation framework.
BallSim() - Constructor for class BallSim
 

G

getThings() - Method in class SimModel
Return a copy of the list of Things in the simulation at the beginning of the current cycle.
go(int) - Method in class SimModel
Run the simulation for the requested number of cycles
go() - Method in class SimModel
Run the simulation indefinitey

M

main(String[]) - Static method in class BallSim
Create window, viewer, and balls and run simulation

N

notify(SimModel) - Method in class BallGraphicsView
React when notified of a change by a model.
notify(SimModel) - Method in interface SimView
Notify this SimView so it can update its display of the SimModel.

P

paintComponent(Graphics) - Method in class Ball
Display this ball on the given graphics context
paintComponent(Graphics) - Method in class BallGraphicsView
Repaint the simulation by requesting each item to repaint itself
paintComponent(Graphics) - Method in interface SimThing
Draw graphical representation of this SimThing.

S

SimModel - class SimModel.
A SimModel is a basic simulation framework for simulations of collections of objects.
SimModel() - Constructor for class SimModel
Constructor for objects of class SimModel
SimThing - interface SimThing.
Basic interface for objects in the simple simulation world.
SimView - interface SimView.
Basic interface for viewers of a SimModel.
stop() - Method in class SimModel
Stop the simulation

A B G M N P S