public class CountModel
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
private int |
count
The current counter value.
|
private static int |
MAX
Initial counter value.
|
private java.beans.PropertyChangeSupport |
pcs
Allows views to listen to generic changes in the model.
|
private boolean |
suspended
The suspend / resume flag.
|
Constructor and Description |
---|
CountModel() |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Attaches listeners to the model.
|
int |
getCount() |
boolean |
getSuspended() |
void |
run() |
void |
setSuspended(boolean suspended)
Sets the value of
suspend |
private static final int MAX
private int count
private final java.beans.PropertyChangeSupport pcs
private boolean suspended
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- public int getCount()
count
.public boolean getSuspended()
suspend
.public void run()
run
in interface java.lang.Runnable
public void setSuspended(boolean suspended)
suspend
suspended
- The new value for suspend