ro.polak.multilevelcarpark.gui
Class GUIDriver

java.lang.Object
  extended by java.lang.Thread
      extended by ro.polak.multilevelcarpark.gui.GUIDriver
All Implemented Interfaces:
java.lang.Runnable

public class GUIDriver
extends java.lang.Thread

GUI Driver acts as the simple both side link for the controller and GUI GUI Driver is implemented as a Thread, it does not block when the controller waits (sleeps)

Author:
Piotr Polak

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static GUIMessenger messenger
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
GUIDriver(int levels, int placesPerLevel)
           
 
Method Summary
 void armCatcherHasCar(boolean hasCar)
           
 void armSetIsExtended(boolean isExtended)
           
 void armSetOpen(boolean isOpen)
           
 void indicatorArmSetBusy(boolean isBusy)
           
 void indicatorCarContainerSetBusy(boolean isBusy)
           
 void indicatorElevatorSetBusy(boolean isBusy)
           
 void indicatorSystemSetBusy(boolean isBusy)
           
 void moveToLevel(int index)
           
 void moveToPosition(int index)
           
 void setPlaceFree(int level, int index, boolean isFree)
           
 void simpleDialog(java.lang.String title, java.lang.String message)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

messenger

public static GUIMessenger messenger
Constructor Detail

GUIDriver

public GUIDriver(int levels,
                 int placesPerLevel)
Method Detail

moveToLevel

public void moveToLevel(int index)

moveToPosition

public void moveToPosition(int index)

setPlaceFree

public void setPlaceFree(int level,
                         int index,
                         boolean isFree)

indicatorArmSetBusy

public void indicatorArmSetBusy(boolean isBusy)

indicatorCarContainerSetBusy

public void indicatorCarContainerSetBusy(boolean isBusy)

indicatorElevatorSetBusy

public void indicatorElevatorSetBusy(boolean isBusy)

indicatorSystemSetBusy

public void indicatorSystemSetBusy(boolean isBusy)

armCatcherHasCar

public void armCatcherHasCar(boolean hasCar)

armSetIsExtended

public void armSetIsExtended(boolean isExtended)

armSetOpen

public void armSetOpen(boolean isOpen)

simpleDialog

public void simpleDialog(java.lang.String title,
                         java.lang.String message)