com.stepsoncats.gublists
Class TimelineEvent

java.lang.Object
  |
  +--com.stepsoncats.gublists.LklistElt
        |
        +--com.stepsoncats.gublists.TimelineEvent

public abstract class TimelineEvent
extends LklistElt

A TimelineEvent is an element in a Timeline. TimelineEvent is an abstract base class; each subclass of TimelineEvent must implement the handleEvent method in a manner that's appropriate to the nature of the event.


Constructor Summary
TimelineEvent()
          Construct a TimelineEvent that will occur immediately after its insertion into a Timeline.
TimelineEvent(long interval)
          Construct a TimelineEvent that will occur in interval milliseconds.
 
Method Summary
abstract  long handleEvent()
          Perform whatever application-specific processing is appropriate upon the occurrence of this TimelineEvent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimelineEvent

public TimelineEvent(long interval)
Construct a TimelineEvent that will occur in interval milliseconds. At the time of occurrence of the event (provided the event has been inserted into a Timeline) its handleEvent method will be invoked.
Parameters:
interval - The number of milliseconds after which the event will occur.

TimelineEvent

public TimelineEvent()
Construct a TimelineEvent that will occur immediately after its insertion into a Timeline. The handleEvent method of the event will be invoked at that time.
Method Detail

handleEvent

public abstract long handleEvent()
Perform whatever application-specific processing is appropriate upon the occurrence of this TimelineEvent.
Returns:
The interval (in milliseconds) after which the event is scheduled to recur. If this is a non-recurring event, then the method should return zero to prevent it from being resheduled.


Copyright 2003 Steps On Cats