ui
Class TimerBox

java.lang.Object
  extended by ui.TimerBox

public class TimerBox
extends Object


Constructor Summary
TimerBox(GameThread g)
          Constructor.
 
Method Summary
 Stopwatch getBlackWatch()
          Returns the Stopwatch object keeping track of black's time left.
 Stopwatch getWhiteWatch()
          Returns the Stopwatch object keeping track of white's time left.
 void setWatches(int whiteTime, int blackTime)
          Resets the TimerBox's Stopwatches.
 void switchClockTo(Color color)
          Switches the clock to the specified color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimerBox

public TimerBox(GameThread g)
Constructor.

Method Detail

setWatches

public void setWatches(int whiteTime,
                       int blackTime)
Resets the TimerBox's Stopwatches. Used when starting or loading a game.


switchClockTo

public void switchClockTo(Color color)
Switches the clock to the specified color. If the argument is Color.NONE, stops both watches.


getWhiteWatch

public Stopwatch getWhiteWatch()
Returns the Stopwatch object keeping track of white's time left.


getBlackWatch

public Stopwatch getBlackWatch()
Returns the Stopwatch object keeping track of black's time left.