net.sourceforge.nite.time
Interface Clock

All Known Implementing Classes:
DefaultClock

public interface Clock

Represents the clock that keeps the current time for the entire synchronized set of display windows.

Author:
jeanc, jonathan

Method Summary
 void deregisterTimeHandler(TimeHandler display)
          Deregister a TimeHandler so that it can no longer set and get times from this Clock
 void ensureVisible(java.awt.Container desk)
          ensure visibility of interface
 void ensureVisible(java.awt.Rectangle rect, java.awt.Container desk)
          ensure visibility of interface, providing location
 javax.swing.JInternalFrame getDisplay()
          Return the visual display of this clock (as a control strip)
 double getSystemTime()
          Return the current system time
 int getWindSkip()
          get the number of seconds the fast-forward and rewind buttons jump
 void pause()
          pass a pause message to any ClockFace ui component, causing any media files to be paused
 void play()
          pass a play message to any ClockFace ui component, causing any media files to start playing
 void registerMaxTime(int max, PlayingTimeHandler display)
          Called by registered displays to allow the slider to be set correctly.
 void registerTimeHandler(TimeHandler display)
          Register a TimeHandler that will henceforth be able to set and get times from this Clock
 void setMasterPlayer(PlayingTimeHandler pth)
          set the PlayingTimeHandler that controls time for this Clock
 void setSystemTime(double newTime)
          Receive a change in the system time and pass it on to all registered TimeHandlers
 void setSystemTime(double newTime, TimeHandler handler)
          Receive a change in the system time and pass it on to all registered TimeHandlers other than the handler passed as an argument
 void setTimeSpan(double start, double end)
          Receive notification of a new span and pass the new span to all registered TimeHandlers.
 void setTimeSpan(double start, double end, boolean play)
          Receive notification of a new span and pass the new span to all registered TimeHandlers; the third argument specifies whether the segment is 'played' in real time by the clock.
 void setTimeSpan(double start, double end, TimeHandler h)
          Receive notification of a new span and pass the new span to all registered TimeHandlers other than the one passed as an argument.
 void setTimeSpan(double start, double end, TimeHandler h, boolean play)
          Receive notification of a new span and pass the new span to all registered TimeHandlers other than the one passed as an argument; the third argument specifies whether the segment is 'played' in real time by the clock.
 void setWindSkip(int seconds)
          set the number of seconds the fast-forward and rewind buttons jump
 

Method Detail

registerTimeHandler

void registerTimeHandler(TimeHandler display)
Register a TimeHandler that will henceforth be able to set and get times from this Clock


deregisterTimeHandler

void deregisterTimeHandler(TimeHandler display)
Deregister a TimeHandler so that it can no longer set and get times from this Clock


setSystemTime

void setSystemTime(double newTime)
Receive a change in the system time and pass it on to all registered TimeHandlers


setSystemTime

void setSystemTime(double newTime,
                   TimeHandler handler)
Receive a change in the system time and pass it on to all registered TimeHandlers other than the handler passed as an argument


setTimeSpan

void setTimeSpan(double start,
                 double end)
Receive notification of a new span and pass the new span to all registered TimeHandlers. This version plays the segment through in real time; if you don't want that behaviour, use the version with a third (boolean) argument to turn off the playing behaviour.


setTimeSpan

void setTimeSpan(double start,
                 double end,
                 boolean play)
Receive notification of a new span and pass the new span to all registered TimeHandlers; the third argument specifies whether the segment is 'played' in real time by the clock.


setTimeSpan

void setTimeSpan(double start,
                 double end,
                 TimeHandler h)
Receive notification of a new span and pass the new span to all registered TimeHandlers other than the one passed as an argument. This version plays the segment through in real time; if you don't want that behaviour, use the version with a fourth (boolean) argument to turn off the playing behaviour.


setTimeSpan

void setTimeSpan(double start,
                 double end,
                 TimeHandler h,
                 boolean play)
Receive notification of a new span and pass the new span to all registered TimeHandlers other than the one passed as an argument; the third argument specifies whether the segment is 'played' in real time by the clock.


getSystemTime

double getSystemTime()
Return the current system time


getDisplay

javax.swing.JInternalFrame getDisplay()
Return the visual display of this clock (as a control strip)


registerMaxTime

void registerMaxTime(int max,
                     PlayingTimeHandler display)
Called by registered displays to allow the slider to be set correctly.


setWindSkip

void setWindSkip(int seconds)
set the number of seconds the fast-forward and rewind buttons jump


getWindSkip

int getWindSkip()
get the number of seconds the fast-forward and rewind buttons jump


ensureVisible

void ensureVisible(java.awt.Container desk)
ensure visibility of interface


ensureVisible

void ensureVisible(java.awt.Rectangle rect,
                   java.awt.Container desk)
ensure visibility of interface, providing location


play

void play()
pass a play message to any ClockFace ui component, causing any media files to start playing


pause

void pause()
pass a pause message to any ClockFace ui component, causing any media files to be paused


setMasterPlayer

void setMasterPlayer(PlayingTimeHandler pth)
set the PlayingTimeHandler that controls time for this Clock