class sap.m.WheelSlider

Control sample: sap.m.WheelSlider
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/m/WheelSlider
Application Component: CA-UI5-CTR

Single select list slider with simple text values, that supports cyclic scrolling and expands/collapses upon user interaction.


Constructor

Constructor for a new WheelSlider.

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.m.WheelSlider(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
isCyclic boolean true

Indicates whether the slider supports cyclic scrolling.

Visibility: public
isExpanded boolean false

Indicates whether the slider is currently expanded.

Visibility: public
label string

Defines the descriptive text for the slider, placed as a label above it.

Visibility: public
selectedKey string

Defines the key of the currently selected value of the slider.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
_arrowDown 0..1 sap.m.Button

The down arrow of the slider.

_arrowUp 0..1 sap.m.Button

The up arrow of the slider.

items 0..n sap.ui.core.Item

The items of the slider.


Events Overview

Event Description
collapsed

Fires when the slider is collapsed.

expanded

Fires when the slider is expanded.

selectedKeyChange

Fires when the selected key changes.

collapsed

Fires when the slider is collapsed.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

expanded

Fires when the slider is expanded.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

selectedKeyChange

Fires when the selected key changes.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
newKey string

The new selected key


Methods Overview

Method Description
addItem

Adds some item to the aggregation items.

attachCollapsed

Attaches event handler fnFunction to the collapsed event of this sap.m.WheelSlider.

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.m.WheelSlider itself.

Fires when the slider is collapsed.

attachExpanded

Attaches event handler fnFunction to the expanded event of this sap.m.WheelSlider.

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.m.WheelSlider itself.

Fires when the slider is expanded.

attachSelectedKeyChange

Attaches event handler fnFunction to the selectedKeyChange event of this sap.m.WheelSlider.

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.m.WheelSlider itself.

Fires when the selected key changes.

destroyItems

Destroys all the items in the aggregation items.

detachCollapsed

Detaches event handler fnFunction from the collapsed event of this sap.m.WheelSlider.

The passed function and listener object must match the ones used for event registration.

detachExpanded

Detaches event handler fnFunction from the expanded event of this sap.m.WheelSlider.

The passed function and listener object must match the ones used for event registration.

detachSelectedKeyChange

Detaches event handler fnFunction from the selectedKeyChange event of this sap.m.WheelSlider.

The passed function and listener object must match the ones used for event registration.

sap.m.WheelSlider.extend

Creates a new subclass of class sap.m.WheelSlider 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.core.Control.extend.

fireCollapsed

Fires event collapsed to attached listeners.

fireExpanded

Fires event expanded to attached listeners.

fireSelectedKeyChange

Fires event selectedKeyChange to attached listeners.

getIsCyclic

Gets current value of property isCyclic.

Indicates whether the slider supports cyclic scrolling.

Default value is true.

getIsExpanded

Gets current value of property isExpanded.

Indicates whether the slider is currently expanded.

Default value is false.

getItems

Gets content of aggregation items.

The items of the slider.

getLabel

Gets current value of property label.

Defines the descriptive text for the slider, placed as a label above it.

sap.m.WheelSlider.getMetadata

Returns a metadata object for class sap.m.WheelSlider.

getSelectedKey

Gets current value of property selectedKey.

Defines the key of the currently selected value of the slider.

indexOfItem

Checks for the provided sap.ui.core.Item in the aggregation items. and returns its index if found or -1 otherwise.

insertItem

Inserts a item into the aggregation items.

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeItem

Removes a item from the aggregation items.

setIsCyclic

Sets a new value for property isCyclic.

Indicates whether the slider supports cyclic scrolling.

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

Default value is true.

setIsExpanded

Sets a new value for property isExpanded.

Indicates whether the slider is currently expanded.

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

Default value is false.

setLabel

Sets a new value for property label.

Defines the descriptive text for the slider, placed as a label above it.

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

setSelectedKey

Sets a new value for property selectedKey.

Defines the key of the currently selected value of the slider.

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

addItem

Adds some item to the aggregation items.

Param Type DefaultValue Description
oItem sap.ui.core.Item

The item to add; if empty, nothing is inserted

attachCollapsed

Attaches event handler fnFunction to the collapsed event of this sap.m.WheelSlider.

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.m.WheelSlider itself.

Fires when the slider is collapsed.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.WheelSlider itself

attachExpanded

Attaches event handler fnFunction to the expanded event of this sap.m.WheelSlider.

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.m.WheelSlider itself.

Fires when the slider is expanded.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.WheelSlider itself

attachSelectedKeyChange

Attaches event handler fnFunction to the selectedKeyChange event of this sap.m.WheelSlider.

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.m.WheelSlider itself.

Fires when the selected key changes.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.WheelSlider itself

destroyItems

Destroys all the items in the aggregation items.

detachCollapsed

Detaches event handler fnFunction from the collapsed event of this sap.m.WheelSlider.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachExpanded

Detaches event handler fnFunction from the expanded event of this sap.m.WheelSlider.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachSelectedKeyChange

Detaches event handler fnFunction from the selectedKeyChange event of this sap.m.WheelSlider.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.m.WheelSlider.extend

Creates a new subclass of class sap.m.WheelSlider 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.core.Control.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

fireCollapsed

Fires event collapsed to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireExpanded

Fires event expanded to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireSelectedKeyChange

Fires event selectedKeyChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

newKey string

The new selected key

getIsCyclic

Gets current value of property isCyclic.

Indicates whether the slider supports cyclic scrolling.

Default value is true.

getIsExpanded

Gets current value of property isExpanded.

Indicates whether the slider is currently expanded.

Default value is false.

getItems

Gets content of aggregation items.

The items of the slider.

getLabel

Gets current value of property label.

Defines the descriptive text for the slider, placed as a label above it.

sap.m.WheelSlider.getMetadata

Returns a metadata object for class sap.m.WheelSlider.

getSelectedKey

Gets current value of property selectedKey.

Defines the key of the currently selected value of the slider.

indexOfItem

Checks for the provided sap.ui.core.Item in the aggregation items. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oItem sap.ui.core.Item

The item whose index is looked for

insertItem

Inserts a item into the aggregation items.

Param Type DefaultValue Description
oItem sap.ui.core.Item

The item to insert; if empty, nothing is inserted

iIndex int

The 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeItem

Removes a item from the aggregation items.

Param Type DefaultValue Description
vItem int string sap.ui.core.Item

The item to remove or its index or id

setIsCyclic

Sets a new value for property isCyclic.

Indicates whether the slider supports cyclic scrolling.

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

Default value is true.

Param Type DefaultValue Description
bIsCyclic boolean true

New value for property isCyclic

setIsExpanded

Sets a new value for property isExpanded.

Indicates whether the slider is currently expanded.

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

Default value is false.

Param Type DefaultValue Description
bIsExpanded boolean false

New value for property isExpanded

setLabel

Sets a new value for property label.

Defines the descriptive text for the slider, placed as a label above it.

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

Param Type DefaultValue Description
sLabel string

New value for property label

setSelectedKey

Sets a new value for property selectedKey.

Defines the key of the currently selected value of the slider.

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

Param Type DefaultValue Description
sSelectedKey string

New value for property selectedKey