public class VolumeControl extends com.google.gwt.user.client.ui.Composite implements com.google.gwt.event.dom.client.MouseUpHandler, HasVolumeChangeHandlers
VolumeChangeHandler
s are notified whenever the slider is adjusted.
.player-VolumeControl { the slider widget }
.player-VolumeControl .volume { the volume level indicator }
.player-VolumeControl .track { the sliders' track indicator }
VolumeChangeHandler
Constructor and Description |
---|
VolumeControl(com.google.gwt.user.client.ui.Image icon,
int sliderHeight)
Constructs
VolumeControl . |
VolumeControl(int sliderHeight)
Constructs
VolumeControl . |
Modifier and Type | Method and Description |
---|---|
com.google.gwt.event.shared.HandlerRegistration |
addVolumeChangeHandler(VolumeChangeHandler handler)
Adds the specified handler to the player.
|
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 |
setPopupStyleName(String styleName)
Assigns a CSS style class name to the volume slider popup panel.
|
void |
setVolume(double volume)
Sets the level of the volume slider control.
|
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 VolumeControl(com.google.gwt.user.client.ui.Image icon, int sliderHeight)
VolumeControl
. The control is displayed as the
specified icon
. An horizontal slider of height sliderHeight
is
displayed when the icon
is clicked on.
The slider popup panel has a fixed width of 50px.
icon
- represents the volume control object.sliderHeight
- the height of the volume slider control.public VolumeControl(int sliderHeight)
VolumeControl
. This constructor is provided for complete CSS styling
support. An horizontal slider of height sliderHeight
is
displayed when this control is clicked on.
The slider popup panel has a fixed width of 50px.
sliderHeight
- the height of the volume slider control.public final void setVolume(double volume)
Note: VolumeChangeListener
s are not notified by this
method.
volume
- value between 0
(silent) 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
protected void initWidget(com.google.gwt.user.client.ui.Widget widget)
initWidget
in class com.google.gwt.user.client.ui.Composite
public com.google.gwt.event.shared.HandlerRegistration addVolumeChangeHandler(VolumeChangeHandler handler)
addVolumeChangeHandler
in interface HasVolumeChangeHandlers
handler
- the handlerVolumeChangeHandler
public void setPopupStyleName(String styleName)
styleName
- CSS style class nameCopyright © 2009-2013. All Rights Reserved.