Class games.Battle.client.ClientApplet.ClientUpdater
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class games.Battle.client.ClientApplet.ClientUpdater

java.lang.Object
   |
   +----games.Battle.client.ClientApplet.ClientUpdater

public class ClientUpdater
extends Object
implements Runnable
The client updater is simple a thread that sleeps until somebody wakes it up to redraw the board, and then it goes back to sleep again.

Constructor Index

 o ClientUpdater(ClientBoard, ClientLook)
Construct a ClientUpdater with the given ClientBoard and ClientLook.

Method Index

 o run()
The run method executed by the thread.
 o setLook(ClientLook)
Set the look for this updater.
 o stop()
Stop the updater thread from executing.
 o update()
Called to wake up the thread and update the board.
 o updateLook()
Physically update the contents of the display with the board information.

Constructors

 o ClientUpdater
  public ClientUpdater(ClientBoard board,
                       ClientLook look)
Construct a ClientUpdater with the given ClientBoard and ClientLook.
Parameters:
board - the ClientBoard this updater will update from
look - the ClientLook this updater will update with

Methods

 o setLook
  public synchronized void setLook(ClientLook look)
Set the look for this updater.
Parameters:
look - the look instance to reference from now on
 o update
  public void update()
Called to wake up the thread and update the board.
 o updateLook
  protected synchronized void updateLook()
Physically update the contents of the display with the board information.
 o run
  public void run()
The run method executed by the thread. The method basically loops, performing a) board updates and then b) suspending itself. The updates is "woken" up by a call to "update";
 o stop
  public void stop()
Stop the updater thread from executing.

All Packages  Class Hierarchy  This Package  Previous  Next  Index