smartlamp
Class Dimmer

java.lang.Object
  extended by java.lang.Thread
      extended by tron.VirtualThread
          extended by smartlamp.Dimmer
All Implemented Interfaces:
Runnable

public class Dimmer
extends VirtualThread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 boolean alive
           
static boolean DBG
          Controls whether the debug information should be produced into err stream. true enables and false disables debug output.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Dimmer(long aTime, int levelCount, int mutant)
           
 
Method Summary
 void addLevelListener(LevelListener listener)
           
 int getLevel()
           
 int getMaxLevels()
           
 void handleEndHold()
           
 void handleStartHold(long startHold)
           
 void handleTouch()
           
 void run()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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_DIMMER.


alive

public boolean alive
Constructor Detail

Dimmer

public Dimmer(long aTime,
              int levelCount,
              int mutant)
Method Detail

handleTouch

public void handleTouch()

handleStartHold

public void handleStartHold(long startHold)

handleEndHold

public void handleEndHold()

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

getLevel

public int getLevel()

getMaxLevels

public int getMaxLevels()

addLevelListener

public void addLevelListener(LevelListener listener)