All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface jdsltools.visualization.Timeline

public interface Timeline
Timeline is an abstraction of a visual timeline. It supports starting over with a new timeline, adding an event to the timeline (with the event optionally drawn in a color of the user's choice), and finishing (and presumably drawing) a sequence of events.

It has another role, not obvious from the interface: allowing the user to select one from the events that are displayed, and reporting the user's selection to its client. Hence the client-related methods. The material reported is the Object that the client associated with the event when addEvent(.) was called.

The Points given to addEvent(.) might be entirely or partially ignored by the Timeline. In our application they represent the coordinates of the locator that the student wants highlighted.

Author:
Mark Handy, Lubomir Bourdev, Ryan Shaun Baker

Method Index

 o addEvent(Point, Color, Object)
Add a new event to the timeline.
 o addEvent(Point, Object)
Same as above, without the Color hint.

 o beginOperation()
Reset the Timeline, erase any drawing, and prepare to accept new events in a new timeline.

 o client()
The client on which the Timeline will call selectedEvent(.) when the user selects an event.

 o endOperation()
End the sequence of new, added events (and presumably draw).

 o isAtBottom()
Used to determine if the user is at the current time in the timeline.
 o setClient(TimelineClient)
Set a new client (there is only one at a time).

 o setInfo(String)
 o setTimelinePos(Point)
 o setTimelineToBottom()
 o timelinePos()

Methods

 o addEvent
 public abstract void addEvent(Point locatorPosition,
                               Color eventColor,
                               Object clientData)
Add a new event to the timeline. The Point might be entirely or partially ignored in drawing the timeline, as might the Color. The Object will be reported later to the Timeline's client, in a call to selectedEvent(.).

Parameters:
locatorPosition - Hint as to where to draw the event
eventColor - Hint as to the color in which to draw the event
clientData - Stored and returned in call to TimelineClient.
 o addEvent
 public abstract void addEvent(Point locatorPosition,
                               Object clientData)
Same as above, without the Color hint.

 o beginOperation
 public abstract void beginOperation()
Reset the Timeline, erase any drawing, and prepare to accept new events in a new timeline.

 o endOperation
 public abstract void endOperation()
End the sequence of new, added events (and presumably draw).

 o client
 public abstract TimelineClient client()
The client on which the Timeline will call selectedEvent(.) when the user selects an event.

Returns:
Current client
 o setClient
 public abstract void setClient(TimelineClient client)
Set a new client (there is only one at a time).

Parameters:
client - New TimelineClient
 o isAtBottom
 public abstract boolean isAtBottom()
Used to determine if the user is at the current time in the timeline.

 o timelinePos
 public abstract Point timelinePos()
 o setTimelinePos
 public abstract void setTimelinePos(Point p)
 o setTimelineToBottom
 public abstract void setTimelineToBottom()
 o setInfo
 public abstract void setInfo(String s)

All Packages  Class Hierarchy  This Package  Previous  Next  Index