class sap.ui.commons.RangeSlider

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/commons/RangeSlider
Application Component: CA-UI5-CTR

The interactive control is displayed either as a horizontal or a vertical line with two pointers and units of measurement. Users can move the pointers along the line to change a range with graphical support.


Constructor

Constructor for a new RangeSlider.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

new sap.ui.commons.RangeSlider(sId?, mSettings?)
Param Type Default Value Description
sId? string

ID for the new control, generated automatically if no ID is given

mSettings? object

Initial settings for the new control


Properties

Name Type Default Value Description
value2 float 80

Current second value of the slider. (Position of the second 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. If it is smaller than value it will be set to the same value.

Visibility: public

Borrowed Properties

Name Type Default Value Description
editable boolean true

Using the slider interactively requires value "true".

Visibility: public
enabled boolean true

Switches enabled state of the control. Disabled fields have different colors, and can not be focused.

Visibility: public
height sap.ui.core.CSSSize 100%

Height of the vertical slider.

Since: 1.7.1.

Visibility: public
labels string[]

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.

Visibility: public
max float 100

Maximal value of the slider

Note: If min is larger than max both values will be switched

Visibility: public
min float 0

Minimal value of the slider.

Note: If min is larger than max both values will be switched

Visibility: public
smallStepWidth float

The grip can only be moved in steps of this width.

Visibility: public
stepLabels boolean false

Display step numbers for the ticks on the slider.

Visibility: public
totalUnits int

Number of units that are displayed by ticks. The PageUp and PageDown keys navigate according to these units.

Visibility: public
value float 50

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.

Visibility: public
vertical boolean false

Orientation of slider

Since: 1.7.1.

Visibility: public
width sap.ui.core.CSSSize 100%

Width of the horizontal slider.

Visibility: public

Methods Overview

Method Description
sap.ui.commons.RangeSlider.extend

Creates a new subclass of class sap.ui.commons.RangeSlider with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.commons.Slider.extend.

sap.ui.commons.RangeSlider.getMetadata

Returns a metadata object for class sap.ui.commons.RangeSlider.

getValue2

Gets current value of property value2.

Current second value of the slider. (Position of the second 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. If it is smaller than value it will be set to the same value.

Default value is 80.

setValue2

Sets a new value for property value2.

Current second value of the slider. (Position of the second 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. If it is smaller than value it will be set to the same value.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 80.

sap.ui.commons.RangeSlider.extend

Creates a new subclass of class sap.ui.commons.RangeSlider with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.commons.Slider.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

sap.ui.commons.RangeSlider.getMetadata

Returns a metadata object for class sap.ui.commons.RangeSlider.

getValue2

Gets current value of property value2.

Current second value of the slider. (Position of the second 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. If it is smaller than value it will be set to the same value.

Default value is 80.

setValue2

Sets a new value for property value2.

Current second value of the slider. (Position of the second 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. If it is smaller than value it will be set to the same value.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 80.

Param Type DefaultValue Description
fValue2 float 80

New value for property value2