com.stepsoncats.gublists
Class Timeline

java.lang.Object
  |
  +--com.stepsoncats.gublists.Timeline

public class Timeline
extends java.lang.Object

A Timeline is a linked list of time-ordered TimelineEvent objects, with an associated Timer thread which handles each TimelineEvent as its moment arrives.


Constructor Summary
Timeline()
          Construct an empty timeline.
 
Method Summary
 void activate()
          Start the Timeline's timer thread.
 void cancel(TimelineEvent event)
          Remove a scheduled TimelineEvent from the Timeline.
 void schedule(TimelineEvent event)
          Insert a new TimelineEvent into the Timeline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Timeline

public Timeline()
Construct an empty timeline.
Method Detail

schedule

public void schedule(TimelineEvent event)
Insert a new TimelineEvent into the Timeline. The Events in a Timeline are ordered by moment of occurrence, which is computed from the interval specified for each TimelineEvent at the time it is constructed.
Parameters:
event - The TimelineEvent to insert into the Timeline.

cancel

public void cancel(TimelineEvent event)
Remove a scheduled TimelineEvent from the Timeline.
Parameters:
event - The TimelineEvent to remove from the Timeline.

activate

public void activate()
Start the Timeline's timer thread. Until the Timeline is activated, no scheduled TimelineEvents' handlers will be invoked.


Copyright 2003 Steps On Cats