Class TINIDrinkMachine.ButtonLoop

java.lang.Object
  extended byjava.lang.Thread
      extended byTINIDrinkMachine.ButtonLoop
All Implemented Interfaces:
Runnable
Enclosing class:
TINIDrinkMachine

private class TINIDrinkMachine.ButtonLoop
extends Thread

A class to independantly handle the callbacks for the buttons.


Field Summary
private  Vector dbls
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TINIDrinkMachine.ButtonLoop(Vector _dbls)
          Construct the class by saving the variables.
 
Method Summary
 void run()
          Set up the button states and loop forever polling the butttons
private  void sleep(int s)
          Wrapper function to handle sleeping.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dbls

private Vector dbls
Constructor Detail

TINIDrinkMachine.ButtonLoop

public TINIDrinkMachine.ButtonLoop(Vector _dbls)
Construct the class by saving the variables.

Parameters:
_dbls - A Vector of the DrinkButtonListeners
Method Detail

sleep

private void sleep(int s)
Wrapper function to handle sleeping. Basically, it just does the exception handling.

Parameters:
s - The number of milliseconds to sleep for.

run

public void run()
Set up the button states and loop forever polling the butttons