Trull

edu.luc.cs.trull.demo.wristwatch
Class Light

java.lang.Object
  extended by edu.luc.cs.trull.EmptyComponent
      extended by edu.luc.cs.trull.TerminatingComponent
          extended by edu.luc.cs.trull.AbstractComponent
              extended by edu.luc.cs.trull.EmitComponent
                  extended by edu.luc.cs.trull.demo.wristwatch.Light
All Implemented Interfaces:
Component, EventLabels, PropertyChangeSource, Startable, Suspendable, Terminating, java.beans.PropertyChangeListener, java.util.EventListener

public class Light
extends EmitComponent
implements EventLabels

light = loop await LIGHT -> { ticks = DELAY; } emit LIGHT_ON ; do loop await TICK -> if -- ticks < 0 then emit LIGHT_OFF watching LIGHT_OFF


Field Summary
static int DELAY
           
private  int ticks
           
 
Fields inherited from interface edu.luc.cs.trull.demo.wristwatch.EventLabels
DATE, DAY, HOUR, LAP, LIGHT, LIGHT_OFF, LIGHT_ON, MIN, MODE, MONTH, NOW, RESET, START, STOP, TICK, TIME, UPDATE
 
Constructor Summary
Light()
           
 
Method Summary
 void propertyChange(java.beans.PropertyChangeEvent event)
           
 
Methods inherited from class edu.luc.cs.trull.EmitComponent
eventEmitter, eventEmitterCached, eventEmitterUncached, resume, scheduleEvent, scheduleEvent, scheduleEvent, start, stop, suspend
 
Methods inherited from class edu.luc.cs.trull.AbstractComponent
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getExternalListeners, getPropertyChangeListeners, removePropertyChangeListener
 
Methods inherited from class edu.luc.cs.trull.TerminatingComponent
fireTermination, getParent, getTermEvent, scheduleTermination, setTerminationListener
 
Methods inherited from class edu.luc.cs.trull.EmptyComponent
getTerminationListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELAY

public static final int DELAY
See Also:
Constant Field Values

ticks

private int ticks
Constructor Detail

Light

public Light()
Method Detail

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class EmptyComponent

Trull

http://www.cs.luc.edu/trull/