|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.piccolo.activities.PActivityScheduler
public class PActivityScheduler
PActivityScheduler is responsible for maintaining a list of activities. It is given a chance to process these activities from the PRoot's processInputs() method. Most users will not need to use the PActivityScheduler directly, instead you should look at:
Constructor Summary | |
---|---|
PActivityScheduler(PRoot rootNode)
Constructs an instance of PActivityScheduler. |
Method Summary | |
---|---|
void |
addActivity(PActivity activity)
Adds the given activity to the scheduler if not already found. |
void |
addActivity(PActivity activity,
boolean processLast)
Add this activity to the scheduler. |
List |
getActivitiesReference()
Returns a reference to the current activities list. |
protected Timer |
getActivityTimer()
Returns the activity timer. |
boolean |
getAnimating()
Return true if any of the scheduled activities are animations. |
PRoot |
getRoot()
Returns the node from which all activities will be attached. |
void |
processActivities(long currentTime)
Process all scheduled activities for the given time. |
void |
removeActivity(PActivity activity)
Removes the given activity from the scheduled activities. |
void |
removeAllActivities()
Removes all activities from the list of scheduled activities. |
protected void |
startActivityTimer()
Starts the current activity timer. |
protected void |
stopActivityTimer()
Stops the current activity timer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PActivityScheduler(PRoot rootNode)
rootNode
- root node of all activities to be performed. All nodes
being animated should have this node as an ancestor.Method Detail |
---|
public PRoot getRoot()
public void addActivity(PActivity activity)
activity
- activity to be scheduledpublic void addActivity(PActivity activity, boolean processLast)
activity
- activity to be scheduledprocessLast
- whether or not this activity should be performed after
all other scheduled activitiespublic void removeActivity(PActivity activity)
activity
- the activity to be removedpublic void removeAllActivities()
public List getActivitiesReference()
public void processActivities(long currentTime)
currentTime
- the current unix time in milliseconds.public boolean getAnimating()
protected void startActivityTimer()
protected void stopActivityTimer()
protected Timer getActivityTimer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |