edu.luc.cs.trull.demo.microwave
Class ControlPanel
java.lang.Object
edu.luc.cs.trull.EmptyComponent
edu.luc.cs.trull.TerminatingComponent
edu.luc.cs.trull.AbstractComponent
edu.luc.cs.trull.EmitComponent
edu.luc.cs.trull.swing.ActionEventAdapter
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).
| 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 |
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
container
javax.swing.JPanel container
heatStatus
javax.swing.JCheckBox heatStatus
level
javax.swing.JLabel level
lightStatus
javax.swing.JCheckBox lightStatus
time
TimeDisplay time
ControlPanel
public ControlPanel()
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
http://www.cs.luc.edu/trull/