public abstract class MediaSeekBar extends com.google.gwt.user.client.ui.Composite implements com.google.gwt.event.dom.client.MouseUpHandler, HasSeekChangeHandlers
Provides means of controlling loading and playing progress indicators during media loading and playback respectively.
Modifier and Type | Field and Description |
---|---|
protected com.google.gwt.user.client.ui.AbsolutePanel |
seekTrack |
Constructor and Description |
---|
MediaSeekBar(int height)
Constructs
MediaSeekBar of the specified height. |
Modifier and Type | Method and Description |
---|---|
com.google.gwt.event.shared.HandlerRegistration |
addSeekChangeHandler(SeekChangeHandler handler)
Adds the specified handler to the player.
|
double |
getLoadingProgress()
Returns the progress of the media loading operation
|
double |
getPlayingProgress()
Returns the progress of the media playback operation
|
protected void |
initSeekBar(com.google.gwt.user.client.ui.Widget loadingWidget,
com.google.gwt.user.client.ui.Widget playingWidget)
Initialize the seek bar with the widgets that will be used to indicate
media loading and playback progress respectively.
|
protected void |
initWidget(com.google.gwt.user.client.ui.Widget widget)
Overridden to prevent subclasses from changing the wrapped widget.
|
void |
onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event) |
void |
setLoadingProgress(double loadingProgress)
Set the progress of the media loading operation.
|
void |
setPlayingProgress(double playingProgress)
Set the progress of the media playback operation.
|
claimElement, getWidget, initializeClaimedElement, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
public MediaSeekBar(int height)
MediaSeekBar
of the specified height.height
- the height of the seek bar in pixelsprotected void initWidget(com.google.gwt.user.client.ui.Widget widget)
initSeekBar
instead.initWidget
in class com.google.gwt.user.client.ui.Composite
initSeekBar(com.google.gwt.user.client.ui.Widget, com.google.gwt.user.client.ui.Widget)
protected final void initSeekBar(com.google.gwt.user.client.ui.Widget loadingWidget, com.google.gwt.user.client.ui.Widget playingWidget)
Subclasses should call this method before calling any Widget methods on this object.
loadingWidget
- loading progress indicator widgetplayingWidget
- playback progress indicator widgetpublic final void setLoadingProgress(double loadingProgress)
loadingProgress
- progress should be between 0
(the minimum)
and 1
(the maximum). Any value outside the range will be ignored.public final double getLoadingProgress()
0
(the minimum)
and 1
(the maximum)public final double getPlayingProgress()
0
(the minimum)
and 1
(the maximum)public final void setPlayingProgress(double playingProgress)
playingProgress
- progress should be between 0
(the minimum)
and 1
(the maximum). Any value outside the range will be ignored.public void onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event)
onMouseUp
in interface com.google.gwt.event.dom.client.MouseUpHandler
public final com.google.gwt.event.shared.HandlerRegistration addSeekChangeHandler(SeekChangeHandler handler)
addSeekChangeHandler
in interface HasSeekChangeHandlers
handler
- the handlerSeekChangeHandler
Copyright © 2009-2013. All Rights Reserved.