Trull

edu.luc.cs.trull.demo.microwave
Class ControlPanel

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.swing.ActionEventAdapter
                      extended by edu.luc.cs.trull.demo.microwave.ControlPanel
All Implemented Interfaces:
Component, EventLabels, PropertyChangeSource, Startable, Suspendable, VisualComponent, Terminating, java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.util.EventListener

public class ControlPanel
extends ActionEventAdapter
implements VisualComponent, EventLabels

The control panel consists of buttons for setting the time, for starting and stopping the device, for setting timer-only mode, and for changing the power setting. It emits events corresponding to these buttons. The control panel also displays the time left and the power setting. It is essentially stateless, that is, it contains no control logic, except for maintaining the status of the door (open or closed).


Field Summary
(package private)  javax.swing.JPanel container
           
(package private)  javax.swing.JCheckBox heatStatus
           
(package private)  javax.swing.JLabel level
           
(package private)  javax.swing.JCheckBox lightStatus
           
(package private)  TimeDisplay time
           
 
Fields inherited from interface edu.luc.cs.trull.demo.microwave.EventLabels
BEEP, CLOSE, FINISH, HEATMODE, HEATOFF, HEATON, HIGH, LIGHTOFF, LIGHTON, LOW, MEDIUM, OFF, ONEMIN, ONESEC, OPEN, POWER, RESET, RUN, START, STOP, TENMIN, TENSEC, TICK, TIME, TIMER, TIMERMODE
 
Constructor Summary
ControlPanel()
           
 
Method Summary
 javax.swing.JComponent getView()
          Returns the Swing component associated with this Trull component.
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 
Methods inherited from class edu.luc.cs.trull.swing.ActionEventAdapter
actionPerformed
 
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
 
Methods inherited from interface edu.luc.cs.trull.PropertyChangeSource
addPropertyChangeListener, getPropertyChangeListeners, removePropertyChangeListener
 
Methods inherited from interface edu.luc.cs.trull.Startable
start, stop
 
Methods inherited from interface edu.luc.cs.trull.Suspendable
resume, suspend
 
Methods inherited from interface edu.luc.cs.trull.Terminating
getTerminationListener, setTerminationListener
 

Field Detail

container

javax.swing.JPanel container

heatStatus

javax.swing.JCheckBox heatStatus

level

javax.swing.JLabel level

lightStatus

javax.swing.JCheckBox lightStatus

time

TimeDisplay time
Constructor Detail

ControlPanel

public ControlPanel()
Method Detail

getView

public javax.swing.JComponent getView()
Description copied from interface: VisualComponent
Returns the Swing component associated with this Trull component.

Specified by:
getView in interface VisualComponent
Returns:
the associated Swing component.

propertyChange

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

Trull

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