All Packages Class Hierarchy This Package Previous Next Index
Class ejmf.toolkit.controls.StandardProgressControl
java.lang.Object
|
+----ejmf.toolkit.controls.AbstractListenerControl
|
+----ejmf.toolkit.controls.ChangeListenerControl
|
+----ejmf.toolkit.controls.StandardProgressControl
- public class StandardProgressControl
- extends ChangeListenerControl
- implements ControllerListener, TimeSource, SourcedTimerListener
Progress slider for StandardControlPanel.
This control maintains an internal time which
'ticks'. At each tick, StandardProgressControl maps
media time into a slider value and updates the progress slider.
The timer is provided by ejmf.toolkit.util.SourcedTimer.
StandardProgressControl receieves 'ticks' by virtue of
being a SourcedTimerListener.
-
StandardProgressControl()
-
-
StandardProgressControl(Controller)
-
-
controllerUpdate(ControllerEvent)
-
If the progress slider is operational, the
controllerUpdate method starts and stops its
time based on Start- and StopEvents from the Controller.
-
createControlComponent()
-
Create ProgressSlider
-
createControlListener()
- Create ChangeListener.
-
getConversionDivisor()
- This method is used as a divisor to convert
getTime to seconds.
-
getTime()
- As part of TimeSource interface, getTime returns
the current media time in nanoseconds.
-
setControllerHook(Controller)
- Augments setController by adding itself as
as ControllerListener on the Controller and forcing
operational state to false.
-
setValue(long)
-
Position slider based on mediaTime
-
timerUpdate(SourcedTimerEvent)
- This method implements the SourcedTimerListener interface.
StandardProgressControl
public StandardProgressControl(Controller controller)
StandardProgressControl
public StandardProgressControl()
createControlComponent
protected Component createControlComponent()
- Create ProgressSlider
- Overrides:
- createControlComponent in class AbstractListenerControl
- See Also:
- ProgressSlider
setControllerHook
protected void setControllerHook(Controller controller)
- Augments setController by adding itself as
as ControllerListener on the Controller and forcing
operational state to false. Availability of progress
bar is determined only after Controller is prefetch
and duration is determinate.
- Overrides:
- setControllerHook in class AbstractListenerControl
createControlListener
protected EventListener createControlListener()
- Create ChangeListener. Tracks user movement
of progress slider and update media time
accordingly.
- Overrides:
- createControlListener in class AbstractListenerControl
setValue
public void setValue(long mediaTime)
- Position slider based on mediaTime
controllerUpdate
public void controllerUpdate(ControllerEvent event)
- If the progress slider is operational, the
controllerUpdate method starts and stops its
time based on Start- and StopEvents from the Controller.
If response to MediaTimeSetEvent, the value of the
progress slider is explicitly set.
The controllerUpdate method is also responsible for
setting the operational state of the Control based
on duration value. This is done in response to first
PrefetchCompleteEvent.
timerUpdate
public void timerUpdate(SourcedTimerEvent e)
- This method implements the SourcedTimerListener interface.
Each timer tick causes slider thumbnail to move if a ProgressBar
was built for this control panel.
- See Also:
- SourcedTimer
getTime
public long getTime()
- As part of TimeSource interface, getTime returns
the current media time in nanoseconds.
getConversionDivisor
public long getConversionDivisor()
- This method is used as a divisor to convert
getTime to seconds.
All Packages Class Hierarchy This Package Previous Next Index