|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
An Activity performs some simulation in repeated steps.
| Method Summary | |
void |
addAnimationListener(AnimationListener l)
An AnimationEvent is posted to the
event listeners when a finite activity completes or a periodic activity
completes one period of simulation. |
ActivityRunner |
getActivityRunner()
Returns the object that is responsible for calling the performActivity method of this activity. |
boolean |
isFinite()
Returns true if this activity is finite, that is if
it eventually runs to completion. |
void |
performActivity(double secs)
Called periodically to perform the activity's behaviour. |
void |
removeAnimationListener(AnimationListener l)
Removes an animation listener from the activity. |
void |
reset()
Resets the activity so that it restarts its behaviour from its initial state. |
void |
setActivityRunner(ActivityRunner r)
Sets the object that is responsible for calling the performActivity method of this activity. |
| Method Detail |
public boolean isFinite()
true if this activity is finite, that is if
it eventually runs to completion.true if the activity is finite, false
otherwise.public void setActivityRunner(ActivityRunner r)
performActivity method of this activity. This method is
called by ActivityRunner
objects when Activities are added to them.r - The ActivityRunner that will run this activity.public ActivityRunner getActivityRunner()
performActivity method of this activity.
An activity can be paused by removing it from its activity runner
and resumed by adding it to its activity runner again.public void addAnimationListener(AnimationListener l)
AnimationEvent is posted to the
event listeners when a finite activity completes or a periodic activity
completes one period of simulation.l - The listener to add.public void removeAnimationListener(AnimationListener l)
l - The listener to remove.public void reset()
public void performActivity(double secs)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||