|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.fmj.ejmf.toolkit.gui.controls.TimeDisplayControl
public class TimeDisplayControl
A read-only Control that displays media time.
Creates a SourcedTimer to generate ticks that trigger Control to look at media time, convert it to a string and display it.
Registers as SourcedTimerListener and ControllerListener. As ControllerListener, TimerDisplayControl listens for start/restart and stop events to correctly turn SourcedTimer on and off.
SourcedTimer,
SourcedTimerListener,
TimeSource| Field Summary |
|---|
| Fields inherited from interface net.sf.fmj.ejmf.toolkit.util.TimeSource |
|---|
MICROS_PER_SEC, MILLIS_PER_SEC, NANOS_PER_SEC |
| Constructor Summary | |
|---|---|
TimeDisplayControl(Controller controller)
Create a TimeDisplayControl for displaying the current media time of the Controller passed as an argument. |
|
TimeDisplayControl(Controller controller,
SourcedTimer timer)
Create a TimeDisplayControl for displaying the current media time of the Controller passed as an argument. |
|
| Method Summary | |
|---|---|
void |
controllerUpdate(ControllerEvent e)
Listen for start/stop events and start/stop SourceTimer in response. |
java.awt.Component |
getControlComponent()
Return the control component. |
long |
getConversionDivisor()
Report value such that getTime()/number equals seconds. |
long |
getTime()
Report media time from associated Controller. |
void |
timerUpdate(SourcedTimerEvent e)
Respond to 'tick' from SourcedTimer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimeDisplayControl(Controller controller)
controller - The Controller with which to associate
control.
public TimeDisplayControl(Controller controller,
SourcedTimer timer)
The timer is used as the SourcedTimer.
This form of the constructor allows reuse of an existing
SourcedTimer.
controller - javax.media.Controllertimer - ejmf.toolkit.util.SourcedTimerSourcedTimer| Method Detail |
|---|
public java.awt.Component getControlComponent()
getControlComponent in interface Controlpublic void timerUpdate(SourcedTimerEvent e)
timerUpdate in interface SourcedTimerListenere - a SourcedTimerEvent containing TimeSource
that generated tick.public void controllerUpdate(ControllerEvent e)
controllerUpdate in interface ControllerListenere - A controller event used to determine start/stop
state of timer.public long getTime()
getTime in interface TimeSourcepublic long getConversionDivisor()
getTime()/number equals seconds.
getConversionDivisor in interface TimeSourcegetTime()/number equals
seconds.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||