|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.fmj.ejmf.toolkit.gui.controls.AbstractListenerControl net.sf.fmj.ejmf.toolkit.gui.controls.ChangeListenerControl net.sf.fmj.ejmf.toolkit.gui.controls.StandardProgressControl
public class StandardProgressControl
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.
Field Summary |
---|
Fields inherited from class net.sf.fmj.ejmf.toolkit.gui.controls.AbstractListenerControl |
---|
skin |
Fields inherited from interface net.sf.fmj.ejmf.toolkit.util.TimeSource |
---|
MICROS_PER_SEC, MILLIS_PER_SEC, NANOS_PER_SEC |
Constructor Summary | |
---|---|
StandardProgressControl(Skin skin)
|
|
StandardProgressControl(Skin skin,
Controller controller)
|
Method Summary | |
---|---|
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. |
protected java.awt.Component |
createControlComponent(Skin skin)
Create ProgressSlider |
protected java.util.EventListener |
createControlListener()
Create ChangeListener. |
long |
getConversionDivisor()
This method is used as a divisor to convert getTime to seconds. |
long |
getTime()
As part of TimeSource interface, getTime returns the current media time in nanoseconds. |
protected void |
setControllerHook(Controller controller)
Augments setController by adding itself as as ControllerListener on the Controller and forcing operational state to false. |
void |
setValue(long mediaTime)
Position slider based on mediaTime |
void |
timerUpdate(SourcedTimerEvent e)
This method implements the SourcedTimerListener interface. |
Methods inherited from class net.sf.fmj.ejmf.toolkit.gui.controls.ChangeListenerControl |
---|
addControlListener, removeControlListener, setComponent, setComponentAndListener, setControlListener |
Methods inherited from class net.sf.fmj.ejmf.toolkit.gui.controls.AbstractListenerControl |
---|
getControlComponent, getController, getDefaultControlListener, initListener, isOperational, setComponent, setComponentAndListener, setController, setControlListener, setOperational, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StandardProgressControl(Skin skin, Controller controller)
public StandardProgressControl(Skin skin)
Method Detail |
---|
protected java.awt.Component createControlComponent(Skin skin)
createControlComponent
in class AbstractListenerControl
ProgressSlider
protected void setControllerHook(Controller controller)
setControllerHook
in class AbstractListenerControl
controller
- Controller with which this control is associated.protected java.util.EventListener createControlListener()
createControlListener
in class AbstractListenerControl
public void setValue(long mediaTime)
public void controllerUpdate(ControllerEvent event)
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.
controllerUpdate
in interface ControllerListener
public void timerUpdate(SourcedTimerEvent e)
timerUpdate
in interface SourcedTimerListener
SourcedTimer
public long getTime()
getTime
in interface TimeSource
public long getConversionDivisor()
getConversionDivisor
in interface TimeSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |