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
-
addEvent(Point, Color, Object)
-
Add a new event to the timeline.
-
addEvent(Point, Object)
-
Same as above, without the Color hint.
-
beginOperation()
-
Reset the Timeline, erase any drawing, and prepare to accept
new events in a new timeline.
-
client()
-
The client on which the Timeline will call selectedEvent(.)
when the user selects an event.
-
endOperation()
-
End the sequence of new, added events (and presumably draw).
-
isAtBottom()
- Used to determine if the user is at the current time in the timeline.
-
setClient(TimelineClient)
-
Set a new client (there is only one at a time).
-
setInfo(String)
-
-
setTimelinePos(Point)
-
-
setTimelineToBottom()
-
-
timelinePos()
-
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.
addEvent
public abstract void addEvent(Point locatorPosition,
Object clientData)
- Same as above, without the Color hint.
beginOperation
public abstract void beginOperation()
- Reset the Timeline, erase any drawing, and prepare to accept
new events in a new timeline.
endOperation
public abstract void endOperation()
- End the sequence of new, added events (and presumably draw).
client
public abstract TimelineClient client()
- The client on which the Timeline will call selectedEvent(.)
when the user selects an event.
- Returns:
- Current client
setClient
public abstract void setClient(TimelineClient client)
- Set a new client (there is only one at a time).
- Parameters:
- client - New TimelineClient
isAtBottom
public abstract boolean isAtBottom()
- Used to determine if the user is at the current time in the timeline.
timelinePos
public abstract Point timelinePos()
setTimelinePos
public abstract void setTimelinePos(Point p)
setTimelineToBottom
public abstract void setTimelineToBottom()
setInfo
public abstract void setInfo(String s)
All Packages Class Hierarchy This Package Previous Next Index