Single select list slider with simple text values, that supports cyclic scrolling and expands/collapses upon user interaction.
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 |
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 |
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. |
Event | Description |
---|---|
collapsed |
Fires when the slider is collapsed. |
expanded |
Fires when the slider is expanded. |
selectedKeyChange |
Fires when the selected key changes. |
Fires when the slider is collapsed.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Method | Description |
---|---|
addItem |
Adds some item to the aggregation items. |
attachCollapsed |
Attaches event handler When called, the context of the event handler (its Fires when the slider is collapsed. |
attachExpanded |
Attaches event handler When called, the context of the event handler (its Fires when the slider is expanded. |
attachSelectedKeyChange |
Attaches event handler When called, the context of the event handler (its Fires when the selected key changes. |
destroyItems |
Destroys all the items in the aggregation items. |
detachCollapsed |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachExpanded |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSelectedKeyChange |
Detaches event handler 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
|
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 |
getIsExpanded |
Gets current value of property isExpanded. Indicates whether the slider is currently expanded. Default value is |
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 |
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 Default value is |
setIsExpanded |
Sets a new value for property isExpanded. Indicates whether the slider is currently expanded. When called with a value of Default value is |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Fires event collapsed to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event expanded to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
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 |
Gets current value of property isCyclic.
Indicates whether the slider supports cyclic scrolling.
Default value is true
.
Gets current value of property isExpanded.
Indicates whether the slider is currently expanded.
Default value is false
.
Gets current value of property label.
Defines the descriptive text for the slider, placed as a label above it.
Gets current value of property selectedKey.
Defines the key of the currently selected value of the slider.
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 |
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 |
Removes all the controls from the aggregation items.
Additionally, it unregisters them from the hosting UIArea.
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 |
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 |
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 |
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 |
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 |