Trull

edu.luc.cs.trull.demo.counter
Class ButtonComponent

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.counter.ButtonComponent
All Implemented Interfaces:
Component, EventLabels, PropertyChangeSource, Startable, Suspendable, VisualComponent, Terminating, java.beans.PropertyChangeListener, java.util.EventListener

public class ButtonComponent
extends EmitComponent
implements VisualComponent, EventLabels

A component that emits an event each time the button is pressed.


Field Summary
private  javax.swing.JButton button
           
 
Fields inherited from interface edu.luc.cs.trull.demo.counter.EventLabels
DOWN, OUCH, OVERFLOW, PRESSED, RESET, TICK, UP
 
Constructor Summary
ButtonComponent(java.lang.String label)
           
 
Method Summary
 javax.swing.JComponent getView()
          Returns the Swing component associated with this Trull component.
 
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, propertyChange
 
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

button

private javax.swing.JButton button
Constructor Detail

ButtonComponent

public ButtonComponent(java.lang.String label)
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.

Trull

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