public class SliderItem extends FormItem implements HasValueChangedHandlers
The slider will generate events as the user interacts with it and changes its value.
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled| Modifier and Type | Field and Description |
|---|---|
static com.smartgwt.mobile.client.internal.theme.ios.SliderCssResourceIOS |
_CSS |
_CONTENT_CHANGED_EVENT_TYPE, _HISTORY_ENABLED, _REQUEST_SCROLL_TO_EVENT_TYPE, id, touched| Constructor and Description |
|---|
SliderItem(java.lang.String name) |
SliderItem(java.lang.String name,
java.lang.String title) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_onEnd(com.google.gwt.user.client.Event event) |
void |
_onStart(com.google.gwt.user.client.Event event,
com.google.gwt.dom.client.Touch touch) |
void |
_setElementValue(java.lang.Object displayValue,
java.lang.Object newValue) |
boolean |
_valueIsChanging()
Call this method in your
Slider.valueChanged handler
to determine whether the value change is due to an ongoing drag interaction (true) or due to a thumb-release, mouse
click, keypress, or programmatic event (false). |
com.google.gwt.event.shared.HandlerRegistration |
addValueChangedHandler(ValueChangedHandler handler)
Add a valueChanged handler.
|
int |
getLength()
Used to set slider height if vertical, slider width if horizontal.
|
float |
getMaxValue()
The maximum slider value.
|
float |
getMinValue()
The minimum slider value.
|
java.lang.Integer |
getNumValues()
The number of discrete values represented by slider.
|
int |
getRoundPrecision()
If
roundValues is false, the slider value will be rounded to
this number of decimal places. |
boolean |
getRoundValues()
Specifies whether the slider value should be rounded to the nearest integer.
|
float |
getStepPercent()
The percentage of the total slider that constitutes one discrete step.
|
boolean |
getVertical()
Indicates whether this is a vertical or horizontal slider.
|
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
protected void |
onMove(com.google.gwt.user.client.Event event) |
void |
setLength(int length)
Used to set slider height if vertical, slider width if horizontal.
|
void |
setMaxValue(float maxValue)
The maximum slider value.
|
void |
setMinValue(float minValue)
The minimum slider value.
|
void |
setNumValues(java.lang.Integer numValues)
The number of discrete values represented by slider.
|
void |
setRoundPrecision(int roundPrecision)
If
roundValues is false, the slider value will be rounded to
this number of decimal places. |
void |
setRoundValues(boolean roundValues)
Specifies whether the slider value should be rounded to the nearest integer.
|
void |
setStepPercent(float stepPercent)
The percentage of the total slider that constitutes one discrete step.
|
void |
setVertical(boolean vertical)
Indicates whether this is a vertical or horizontal slider.
|
boolean |
validate() |
_addValuesSelectedHandler, _checkForEditorExit, _copyFieldConfiguration, _createPicker, _elementBlur, _formatDataType, _getChildFromLocatorSubstring, _getDateFormatter, _getDatetimeFormatter, _getDefaultValue, _getDisplayValue, _getEmptyDisplayValue, _getInnerAttributeFromSplitLocator, _getInputElement, _getMultipleValueSeparator, _getPicker, _getRequired, _getShowHint, _getShowHintInField, _getTimeFormatter, _getValueMap, _handleEditorExit, _handleInput, _isPickerEnabled, _isReadOnly, _isSetToDefaultValue, _mapDisplayToValue, _mapKey, _mapValueToDisplay, _nativeElementBlur, _onValuesSelected, _parseDisplayValue, _refreshDisplayValue, _setElementReadOnly, _shouldApplyStaticTypeFormat, _storeValue, _unmapKey, _updateDateFormatter, _updateValue, _updateValue, addBlurHandler, addChangedHandler, addKeyPressHandler, getCriterion, getDateFormatter, getDatetimeFormatter, getDisplayField, getDisplayFieldName, getEditorValueFormatter, getEditorValueParser, getEmptyDisplayValue, getForm, getHint, getName, getOptionDataSource, getRequired, getShowHint, getTextAlign, getTimeFormatter, getValue, getValueField, getValueFieldName, getValueFormatter, onChanged, onUnload, setDataManager, setDateFormatter, setDatetimeFormatter, setDefaultValue, setDisplayField, setEditorValueFormatter, setEditorValueParser, setElement, setEmptyDisplayValue, setFieldName, setHint, setName, setOptionDataSource, setRequired, setShowHint, setTextAlign, setTimeFormatter, setValue, setValue, setValueField, setValueFormatter, setValueMap, setValueMap, showPicker, showValue, updateCanEditcompareValues, getCanEdit, getDataManager, getFieldName, getRealShowTitle, getShowTitle, getStopOnError, getTitle, getValidators, setCanEdit, setShowTitle, setStopOnError, setTitle, setValidators_add, _booleanValue, _fireContentChangedEvent, _fireContentChangedEvent, _fireRequestScrollToEvent, _getAndroidWindowSoftInputMode, _getAttributeFromSplitLocator, _getFixNavigationBarPositionDuringKeyboardFocus, _getHideTabBarDuringKeyboardFocus, _getInnerElement, _hideAddressBar, _hideAddressBarNow, _insert, _isDifferent, _isHDPIDisplay, _isIOS4OrOlder, _isIOS5, _isIOSMin6_0, _isStandaloneMode, _nativeParseFloat, _removeClassName, _setClassName, _setHandleDisabled, _sinkAnimationEndEvent, _sinkContentChangedEvent, _sinkFocusInEvent, _sinkFocusOutEvent, _sinkInputEvent, _sinkRequestScrollToEvent, _sinkTransitionEndEvent, _triggerDebugger, addChild, addChild, addChild, addClickHandler, addShowContextMenuHandler, destroy, disable, enable, getContextMenu, getID, getInnerHTML, getMargin, hasChild, hasChild, isAndroid, isDisabled, isEnabled, isIPad, isIPhone, isSafari, isStandAlone, isUIWebView, parseDimension, removeChild, removeChild, setContents, setContextMenu, setDisabled, setID, setMargin, setStyleName, split, useIOSNativeScrollingadd, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, removeadd, add, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringpublic static final com.smartgwt.mobile.client.internal.theme.ios.SliderCssResourceIOS _CSS
public SliderItem(java.lang.String name)
public SliderItem(java.lang.String name,
java.lang.String title)
public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent in interface com.google.gwt.user.client.EventListeneronBrowserEvent in class FormItempublic void _onStart(com.google.gwt.user.client.Event event,
com.google.gwt.dom.client.Touch touch)
protected void onMove(com.google.gwt.user.client.Event event)
protected void _onEnd(com.google.gwt.user.client.Event event)
public void setLength(int length)
length - length Default value is 50public int getLength()
public void setMaxValue(float maxValue)
maximum value of the slidermaxValue - the new maximum value. Default value is 100public float getMaxValue()
public void setMinValue(float minValue)
minimum value of the sliderminValue - the new minimum value. Default value is 1public float getMinValue()
public void setNumValues(java.lang.Integer numValues)
minValue and maxValue) will be divided into this many steps. As the thumb is moved along the
track it will only select these values and appear to jump between the steps.
Sets the number of values for the slidernumValues - the new number of values. Default value is nullpublic java.lang.Integer getNumValues()
minValue and maxValue) will be divided into this many steps. As the thumb is moved along the
track it will only select these values and appear to jump between the steps.public void setRoundPrecision(int roundPrecision)
roundValues is false, the slider value will be rounded to
this number of decimal places. If set to null the value will not be rounded
Sets the roundPrecision property of the sliderroundPrecision - new round precision. Default value is 1public int getRoundPrecision()
roundValues is false, the slider value will be rounded to
this number of decimal places. If set to null the value will not be roundedpublic void setRoundValues(boolean roundValues)
roundPrecision.roundValues - roundValues Default value is truepublic final boolean getRoundValues()
roundPrecision.public void _setElementValue(java.lang.Object displayValue,
java.lang.Object newValue)
_setElementValue in class FormItempublic void setStepPercent(float stepPercent)
stepPercent property of the sliderstepPercent - new slider step percent. Default value is 5public float getStepPercent()
public void setVertical(boolean vertical)
vertical property of the slidervertical - is the slider vertical. Default value is truepublic boolean getVertical()
public com.google.gwt.event.shared.HandlerRegistration addValueChangedHandler(ValueChangedHandler handler)
addValueChangedHandler in interface HasValueChangedHandlershandler - the valueChanged handlerHandlerRegistration used to remove this handler@SGWTInternal public boolean _valueIsChanging()
Slider.valueChanged handler
to determine whether the value change is due to an ongoing drag interaction (true) or due to a thumb-release, mouse
click, keypress, or programmatic event (false). You may choose to execute temporary or partial updates while the slider
thumb is dragged, and final updates or persistence of the value in response to the other events.