smartlamp
Class LightController
java.lang.Object
java.lang.Thread
tron.VirtualThread
smartlamp.LightController
- All Implemented Interfaces:
- MouseListener, WindowListener, Runnable, EventListener, LevelListener
public class LightController
- extends VirtualThread
- implements MouseListener, WindowListener, LevelListener
Field Summary |
static boolean |
DBG
Controls whether the debug information should be produced into err
stream. true enables and false disables debug output. |
Methods inherited from class tron.VirtualThread |
activate, condBroadcast, condDelay, condDelay, condDestroy, condInit, condSignal, condWait, condWait, deactivate, getTime, getTimeMillis, mutexDestroy, mutexInit, mutexLock, mutexUnlock, quit, realtime, setRemoteClock, start, virtualtime |
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, yield, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString |
DBG
public static boolean DBG
- Controls whether the debug information should be produced into err
stream. true enables and false disables debug output.
This variable can be set via environment variable DEBUG_LC.
LightController
public LightController(int mutant,
int levelCount)
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
handleGrasp
public void handleGrasp()
handleRelease
public void handleRelease()
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClicked
in interface MouseListener
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEntered
in interface MouseListener
mouseExited
public void mouseExited(MouseEvent e)
- Specified by:
mouseExited
in interface MouseListener
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressed
in interface MouseListener
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased
in interface MouseListener
windowActivated
public void windowActivated(WindowEvent e)
- Specified by:
windowActivated
in interface WindowListener
windowClosed
public void windowClosed(WindowEvent e)
- Specified by:
windowClosed
in interface WindowListener
windowClosing
public void windowClosing(WindowEvent e)
- Specified by:
windowClosing
in interface WindowListener
windowDeactivated
public void windowDeactivated(WindowEvent e)
- Specified by:
windowDeactivated
in interface WindowListener
windowDeiconified
public void windowDeiconified(WindowEvent e)
- Specified by:
windowDeiconified
in interface WindowListener
windowIconified
public void windowIconified(WindowEvent e)
- Specified by:
windowIconified
in interface WindowListener
windowOpened
public void windowOpened(WindowEvent e)
- Specified by:
windowOpened
in interface WindowListener
levelChanged
public void levelChanged(int level)
- Specified by:
levelChanged
in interface LevelListener
main
public static void main(String[] args)