edu.princeton.toy
Class TStdinPane.Runner

java.lang.Object
  extended by edu.princeton.toy.TStdinPane.Runner
All Implemented Interfaces:
Runnable
Enclosing class:
TStdinPane

protected class TStdinPane.Runner
extends Object
implements Runnable

The Runner of a TStdin blinks the inputField when the Virtual machine needs input. This class is completely thread-safe in that the user need not worry about the current status of the Runner when he calls start() or stop().


Constructor Summary
protected TStdinPane.Runner()
          Creates a new Runner.
 
Method Summary
 void run()
          Implement runnable to blink the inputField.
protected  void start()
          Starts the blink thread if it hasn't started, or tells it to keep on going if it has.
protected  void stop()
          Stops the blink thread at the next available opportunity, does nothing if the thread hasn't started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TStdinPane.Runner

protected TStdinPane.Runner()
Creates a new Runner.

Method Detail

start

protected void start()
Starts the blink thread if it hasn't started, or tells it to keep on going if it has.


stop

protected void stop()
Stops the blink thread at the next available opportunity, does nothing if the thread hasn't started.


run

public void run()
Implement runnable to blink the inputField.

Specified by:
run in interface Runnable