net.sourceforge.nite.time
Interface TimeHandler

All Known Subinterfaces:
PlayingTimeHandler, ScrollingTimeHandler
All Known Implementing Classes:
AnnotationArea, ExampleTimeHandler, FeeltraceCircle, FeeltraceTimeLine, GridPanel, NITEAudioPlayer, NITEMediaPlayer, NITEVideoPlayer, NMediaHandler, NMediaPlayer, NTextArea, NTranscriptionView, NTree, SegmentReplayer, TimeLabel

public interface TimeHandler

Represents a display that keeps itself synchronized with the current system time, and can reset current system time via its timeHandler. This is intended to cover either displays generated using the stylesheet engine or the NIS generic display.

Author:
jeanc, jonathan, judy

Method Summary
 void acceptTimeChange(double systemTime)
          Accept a new time (generally from another registered TimeHandler).
 void acceptTimeSpanChange(double start, double end)
          Accept a new time span from another registered time handler.
 Clock getClock()
          Return the Clock that is currently syncronising this TimeHandler
 double getMaxTime()
          find the largest end time handled by this TimeHandler.
 void setClock(Clock clock)
          Set the Clock to which this TimeHandler is registered
 void setTime(double time)
          Broadcast a new time.
 void setTimeHighlightColor(java.awt.Color color)
          Change the Color used for all registered TimeHandlers to highlight times
 void setTimeSpan(double start, double end)
          Broadcast a new span to all registered TimeHandlers.
 

Method Detail

acceptTimeChange

void acceptTimeChange(double systemTime)
Accept a new time (generally from another registered TimeHandler). Do what you have to do in this TimeHandler to represent the fact that the global system time is now 'systemTime' (but don't inform the niteclock to pass it on).


setTime

void setTime(double time)
Broadcast a new time. Implement by sending a setSystemTime call to the current Clock.


acceptTimeSpanChange

void acceptTimeSpanChange(double start,
                          double end)
Accept a new time span from another registered time handler. This may involve changing our on-screen appearance to introduce some new time highlights, or playing a stretch of video, depending on the type of handler.


setTimeSpan

void setTimeSpan(double start,
                 double end)
Broadcast a new span to all registered TimeHandlers.


getClock

Clock getClock()
Return the Clock that is currently syncronising this TimeHandler


setClock

void setClock(Clock clock)
Set the Clock to which this TimeHandler is registered


setTimeHighlightColor

void setTimeHighlightColor(java.awt.Color color)
Change the Color used for all registered TimeHandlers to highlight times


getMaxTime

double getMaxTime()
find the largest end time handled by this TimeHandler. This is only really applicable to text areas.