Class sap.ui.commons.SliderModule: sap/ui/commons/Slider
The interactive control is displayed either as a horizontal or a vertical line with a pointer and units of measurement. Users can move the pointer along the line to change values with graphical support.
Deprecated API:Since version 1.38. Instead, use the sap.m.Slider
control.
sClassName
and enriches it with the information contained in oClassInfo
.fnFunction
to the change
event of this sap.ui.commons.Slider
.fnFunction
to the liveChange
event of this sap.ui.commons.Slider
.fnFunction
from the change
event of this sap.ui.commons.Slider
.fnFunction
from the liveChange
event of this sap.ui.commons.Slider
.ariaDescribedBy
.ariaLabelledBy
.ariaDescribedBy
.ariaLabelledBy
.Slider
. Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.
The supported settings are:
- Properties
- width : sap.ui.core.CSSSize (default: 100%)
- min : float (default: 0)
- max : float (default: 100)
- value : float (default: 50)
- smallStepWidth : float
- totalUnits : int
- stepLabels : boolean (default: false)
- editable : boolean (default: true)
- enabled : boolean (default: true)
- labels : string[]
- vertical : boolean (default: false)
- height : sap.ui.core.CSSSize (default: 100%)
- Events
- change : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- liveChange : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.
{string} | sId? | ID for the new control, generated automatically if no ID is given |
{object} | mSettings? | Initial settings for the new control |
- Deprecated:
- Since version 1.38. Instead, use the
sap.m.Slider
control.
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{float} | oControlEvent.getParameters.value | Current value of the slider after a change. |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{float} | oControlEvent.getParameters.value | Current value of the slider after a change. |
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of information as described in sap.ui.core.Control.extend.
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
ariaDescribedBy
. {string|sap.ui.core.Control} | vAriaDescribedBy | the ariaDescribedBy to add; if empty, nothing is inserted |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
ariaLabelledBy
. {string|sap.ui.core.Control} | vAriaLabelledBy | the ariaLabelledBy to add; if empty, nothing is inserted |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
fnFunction
to the change
event of this sap.ui.commons.Slider
. When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.commons.Slider
itself.
Value was changed. This event is fired if the value has changed by an user action.
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.commons.Slider itself |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
fnFunction
to the liveChange
event of this sap.ui.commons.Slider
. When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.commons.Slider
itself.
Value was changed. This event is fired during the mouse move. The normal change event is only fired by mouseup.
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.commons.Slider itself |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
fnFunction
from the change
event of this sap.ui.commons.Slider
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
fnFunction
from the liveChange
event of this sap.ui.commons.Slider
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
change
to attached listeners. Expects the following event parameters:
value
of typefloat
Current value of the slider after a change.
{Map} | mArguments? | The arguments to pass along with the event |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
liveChange
to attached listeners. Expects the following event parameters:
value
of typefloat
Current value of the slider after a change.
{Map} | mArguments? | The arguments to pass along with the event |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
ariaDescribedBy
. {sap.ui.core.Control[]} |
ariaLabelledBy
. {sap.ui.core.Control[]} |
editable
. Using the slider interactively requires value "true".
Default value is true
.
{boolean} | Value of property editable |
enabled
. Switches enabled state of the control. Disabled fields have different colors, and can not be focused.
Default value is true
.
{boolean} | Value of property enabled |
height
. Height of the vertical slider.
Default value is 100%
.
- Since:
- 1.7.1
{sap.ui.core.CSSSize} | Value of property height |
labels
. Labels to be displayed instead of numbers. Attribute totalUnits and label count should be the same
Note: To show the labels stepLabels
must be activated.
{string[]} | Value of property labels |
max
. Maximal value of the slider
Note: If min
is larger than max
both values will be switched
Default value is 100
.
{float} | Value of property max |
min
. Minimal value of the slider.
Note: If min
is larger than max
both values will be switched
Default value is 0
.
{float} | Value of property min |
smallStepWidth
. The grip can only be moved in steps of this width.
{float} | Value of property smallStepWidth |
stepLabels
. Display step numbers for the ticks on the slider.
Default value is false
.
{boolean} | Value of property stepLabels |
totalUnits
. Number of units that are displayed by ticks. The PageUp and PageDown keys navigate according to these units.
{int} | Value of property totalUnits |
value
. Current value of the slider. (Position of the grip.)
Note: If the value is not in the valid range (between min
and max
) it will be changed to be in the valid range.
Default value is 50
.
{float} | Value of property value |
vertical
. Orientation of slider
Default value is false
.
- Since:
- 1.7.1
{boolean} | Value of property vertical |
width
. Width of the horizontal slider.
Default value is 100%
.
{sap.ui.core.CSSSize} | Value of property width |
ariaDescribedBy
. {sap.ui.core.Control[]} | An array of the removed elements (might be empty) |
ariaLabelledBy
. {sap.ui.core.Control[]} | An array of the removed elements (might be empty) |
ariaDescribedBy
. {int|string|sap.ui.core.Control} | vAriaDescribedBy | The ariaDescribedByto be removed or its index or ID |
{sap.ui.core.Control} | the removed ariaDescribedBy or null |
ariaLabelledBy
. {int|string|sap.ui.core.Control} | vAriaLabelledBy | The ariaLabelledByto be removed or its index or ID |
{sap.ui.core.Control} | the removed ariaLabelledBy or null |
editable
. Using the slider interactively requires value "true".
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bEditable | New value for property editable |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
enabled
. Switches enabled state of the control. Disabled fields have different colors, and can not be focused.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bEnabled | New value for property enabled |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
height
. Height of the vertical slider.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 100%
.
{sap.ui.core.CSSSize} | sHeight | New value for property height |
- Since:
- 1.7.1
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
labels
. Labels to be displayed instead of numbers. Attribute totalUnits and label count should be the same
Note: To show the labels stepLabels
must be activated.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string[]} | sLabels | New value for property labels |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
max
. Maximal value of the slider
Note: If min
is larger than max
both values will be switched
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 100
.
{float} | fMax | New value for property max |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
min
. Minimal value of the slider.
Note: If min
is larger than max
both values will be switched
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
{float} | fMin | New value for property min |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
smallStepWidth
. The grip can only be moved in steps of this width.
When called with a value of null
or undefined
, the default value of the property will be restored.
{float} | fSmallStepWidth | New value for property smallStepWidth |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
stepLabels
. Display step numbers for the ticks on the slider.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
{boolean} | bStepLabels | New value for property stepLabels |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
totalUnits
. Number of units that are displayed by ticks. The PageUp and PageDown keys navigate according to these units.
When called with a value of null
or undefined
, the default value of the property will be restored.
{int} | iTotalUnits | New value for property totalUnits |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
value
. Current value of the slider. (Position of the grip.)
Note: If the value is not in the valid range (between min
and max
) it will be changed to be in the valid range.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 50
.
{float} | fValue | New value for property value |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
vertical
. Orientation of slider
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
{boolean} | bVertical | New value for property vertical |
- Since:
- 1.7.1
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |
width
. Width of the horizontal slider.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 100%
.
{sap.ui.core.CSSSize} | sWidth | New value for property width |
{sap.ui.commons.Slider} | Reference to this in order to allow method chaining |