|
Trull | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.luc.cs.trull.EmptyComponent
edu.luc.cs.trull.TerminatingComponent
edu.luc.cs.trull.AbstractComponent
edu.luc.cs.trull.AbstractCombinator
edu.luc.cs.trull.SingleChildCombinator
edu.luc.cs.trull.Rename
edu.luc.cs.trull.demo.counter.CarryCounter
public class CarryCounter
A carry counter suitable for building a multi-digit counter. There are two cases, a single-digit carry counter that reports overflow when it reaches its maximum value, and a carry counter build from two existing carry counters.
To chain two carry counters, the overflow of the less significant digits (c1) increments the more significant digits (c2).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class edu.luc.cs.trull.Rename |
|---|
Rename.LocalListener |
| Nested classes/interfaces inherited from class edu.luc.cs.trull.AbstractCombinator |
|---|
AbstractCombinator.DefaultTerminationListener |
| Field Summary | |
|---|---|
private VisualComponent |
counter
|
private int |
max
|
| Fields inherited from class edu.luc.cs.trull.AbstractCombinator |
|---|
components |
| Fields inherited from interface edu.luc.cs.trull.demo.counter.EventLabels |
|---|
DOWN, OUCH, OVERFLOW, PRESSED, RESET, TICK, UP |
| Constructor Summary | |
|---|---|
CarryCounter(int max)
|
|
| Method Summary | |
|---|---|
javax.swing.JComponent |
getView()
Returns the Swing component associated with this Trull component. |
| Methods inherited from class edu.luc.cs.trull.Rename |
|---|
addEventRenaming, getChildTerminationListener, getDefaultChild, getEventRenamings, getInternalListener, getLocalEvents, propertyChange, removeEventRenaming, setLocalEvent, setLocalEvents, setLocalEvents |
| Methods inherited from class edu.luc.cs.trull.SingleChildCombinator |
|---|
addComponent, getChild, removeComponent, resume, start, stop, suspend |
| Methods inherited from class edu.luc.cs.trull.AbstractCombinator |
|---|
addComponent, addComponent, getComponent, getComponentCount, getComponents, removeAllComponents, removeComponent |
| 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 |
|---|
private VisualComponent counter
private int max
| Constructor Detail |
|---|
public CarryCounter(int max)
| Method Detail |
|---|
public javax.swing.JComponent getView()
VisualComponent
getView in interface VisualComponent
|
Trull | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||