ballWorlds.framework
Class WorldDrawer

java.lang.Object
  extended by ballWorlds.framework.WorldDrawer
All Implemented Interfaces:
Runnable

public class WorldDrawer
extends Object
implements Runnable

A WorldDrawer repeatedly asks its WorldView to repaint (i.e., to redraw its associated World and Balls).

Author:
mutchler. Created Sep 20, 2009.

Field Summary
static int TIME_TO_SLEEP_BETWEEN_REPAINTS
          Milliseconds to sleep between repaints of the World and its Balls.
 
Constructor Summary
WorldDrawer(WorldView worldView)
          Stores the given WorldView and starts a thread that repeatedly asks that WorldView to repaint (i.e., to redraw its associated World and Balls).
 
Method Summary
 void run()
          Repeatedly asks this WorldDrawer's WorldView to repaint (i.e., to redraw its associated World and Balls).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIME_TO_SLEEP_BETWEEN_REPAINTS

public static final int TIME_TO_SLEEP_BETWEEN_REPAINTS
Milliseconds to sleep between repaints of the World and its Balls.

See Also:
Constant Field Values
Constructor Detail

WorldDrawer

public WorldDrawer(WorldView worldView)
Stores the given WorldView and starts a thread that repeatedly asks that WorldView to repaint (i.e., to redraw its associated World and Balls).

Parameters:
worldView - The WorldView that this WorldDrawer repeatedly asks to repaint.
Method Detail

run

public void run()
Repeatedly asks this WorldDrawer's WorldView to repaint (i.e., to redraw its associated World and Balls).

Specified by:
run in interface Runnable