de.jadv.client
Class DrawThread

java.lang.Object
  |
  +--de.jadv.client.DrawThread
All Implemented Interfaces:
java.lang.Runnable

public class DrawThread
extends java.lang.Object
implements java.lang.Runnable


Field Summary
private  java.lang.Thread _animatorThread
           
private  int _delay
           
private  GameData _gameData
           
private  GameCanvas _screen
           
 
Constructor Summary
DrawThread(GameData gameData, GameCanvas gameCanvas)
           
DrawThread(GameData gameData, GameCanvas gameCanvas, int fps)
           
 
Method Summary
 void run()
          Called by the thread that was created in the start method.
 void start()
          Called when the applet becomes visible on the screen.
 void stop()
          Called when the GameWindow is no longer visible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_delay

private int _delay

_animatorThread

private java.lang.Thread _animatorThread

_gameData

private GameData _gameData

_screen

private GameCanvas _screen
Constructor Detail

DrawThread

public DrawThread(GameData gameData,
                  GameCanvas gameCanvas)

DrawThread

public DrawThread(GameData gameData,
                  GameCanvas gameCanvas,
                  int fps)
Method Detail

start

public void start()
Called when the applet becomes visible on the screen. Create a thread and start it.


run

public void run()
Called by the thread that was created in the start method. It does the main animation.

Specified by:
run in interface java.lang.Runnable

stop

public void stop()
Called when the GameWindow is no longer visible. Set the animator variable to null so that the thread will exit before displaying the next frame.