ch.aplu.nxt
Class LightAdapter

java.lang.Object
  extended by ch.aplu.nxt.LightAdapter
All Implemented Interfaces:
LightListener

public class LightAdapter
extends java.lang.Object
implements LightListener

Class with empty callback methods for the light sensor.


Constructor Summary
LightAdapter()
           
 
Method Summary
 void bright(SensorPort port, int level)
          Empty method called when the light becomes brighter than the trigger level.
 void dark(SensorPort port, int level)
          Empty method called when the light becomes darker than the trigger level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LightAdapter

public LightAdapter()
Method Detail

bright

public void bright(SensorPort port,
                   int level)
Empty method called when the light becomes brighter than the trigger level. Override it to process the event.

Specified by:
bright in interface LightListener
Parameters:
port - the port where the sensor is plugged in
level - the current light level.

dark

public void dark(SensorPort port,
                 int level)
Empty method called when the light becomes darker than the trigger level. Override it to process the event.

Specified by:
dark in interface LightListener
Parameters:
port - the port where the sensor is plugged in
level - the current light level