sap.ui.commons.Carousel.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.commons.Carousel 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.
Parameters:
{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 |
Returns:
{function} | Created class / constructor function |
Returns a metadata object for class sap.ui.commons.Carousel.
Returns:
Adds some content to the aggregation content
.
Parameters:
Returns:
Binds aggregation
content
to model data.
See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo
.
Parameters:
{object} | oBindingInfo | The binding information |
Returns:
calculateAndSetSize()
Calculates and sets the size of the carousel, its items and its buttons
Destroys all the content in the aggregation content
.
Returns:
getAnimationDuration(): int
Gets current value of property
animationDuration
.
Duration for animation when navigating through the contents of the Carousel
Default value is 500
.
Returns:
{int} | Value of property animationDuration |
Gets content of aggregation
content
.
Controls which are displayed inside the Carousel
Returns:
getDefaultItemHeight(): int
Gets current value of property
defaultItemHeight
.
Default height of the item in a carousel if no height can be determined
Default value is 150
.
Returns:
{int} | Value of property defaultItemHeight |
getDefaultItemWidth(): int
Gets current value of property
defaultItemWidth
.
Default width of the item in a carousel if no height can be determined
Default value is 150
.
Returns:
{int} | Value of property defaultItemWidth |
getFirstVisibleIndex(): int
Gets current value of property
firstVisibleIndex
.
The index of the element in the content aggreation which is displayed first on rendering
Default value is 0
.
- Since:
- 1.11.0
Returns:
{int} | Value of property firstVisibleIndex |
Returns the focused DOM element
Returns:
{jQuery} | The focused DOM element |
getHandleSize(): int
Gets current value of property
handleSize
.
Determines the size of the handle in pixels. (Height for vertical carousel, width for horizontal carousel)
Default value is 22
.
Returns:
{int} | Value of property handleSize |
Gets current value of property
height
.
Determines the height of the Carousel
Returns:
Gets current value of property
orientation
.
Determines the orientation of the Carousel. Can be either "horizontal" or "vertical"
Default value is horizontal
.
Returns:
getVisibleItems(): int
Gets current value of property
visibleItems
.
If defined, the carousel displays the number of items defined. Items will be resized to fit the area.
Returns:
{int} | Value of property visibleItems |
Gets current value of property
width
.
Determines the width of the Carousel
Returns:
indexOfContent(oContent): int
Checks for the provided sap.ui.core.Control
in the aggregation content
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a content into the aggregation content
.
Parameters:
{sap.ui.core.Control} | oContent | the content to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the content should be inserted at; for a negative value of iIndex , the content is inserted at position 0; for a value greater than the current size of the aggregation, the content is inserted at the last position |
Returns:
onswipeleft(oEvent)
If the device supports touch gestures and left swipe is triggered shows the next carousel item
Parameters:
onswiperight(oEvent)
If the device supports touch gestures and right swipe is triggered shows the previous carousel item
Parameters:
Removes all the controls from the aggregation
content
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a content from the aggregation content
.
Parameters:
Returns:
Sets a new value for property
animationDuration
.
Duration for animation when navigating through the contents of the Carousel
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 500
.
Parameters:
{int} | iAnimationDuration | New value for property animationDuration |
Returns:
Sets a new value for property
defaultItemHeight
.
Default height of the item in a carousel if no height can be determined
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 150
.
Parameters:
{int} | iDefaultItemHeight | New value for property defaultItemHeight |
Returns:
Sets a new value for property
defaultItemWidth
.
Default width of the item in a carousel if no height can be determined
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 150
.
Parameters:
{int} | iDefaultItemWidth | New value for property defaultItemWidth |
Returns:
Setter for property
firstVisibleIndex
.
Default value is 0
Parameters:
{int} | iFirstVisibleIndex | new value for property firstVisibleIndex |
- Since:
- 1.11.0
Returns:
Sets a new value for property
handleSize
.
Determines the size of the handle in pixels. (Height for vertical carousel, width for horizontal carousel)
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 22
.
Parameters:
{int} | iHandleSize | New value for property handleSize |
Returns:
Sets a new value for property
height
.
Determines the height of the Carousel
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
Returns:
Sets a new value for property
orientation
.
Determines the orientation of the Carousel. Can be either "horizontal" or "vertical"
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is horizontal
.
Parameters:
Returns:
Sets a new value for property
visibleItems
.
If defined, the carousel displays the number of items defined. Items will be resized to fit the area.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{int} | iVisibleItems | New value for property visibleItems |
Returns:
Sets a new value for property
width
.
Determines the width of the Carousel
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
Returns:
showElementWithId(sElementId)
Shows the element with the specified Id. This can be only used after the component is rendered.
Parameters:
{string} | sElementId | Id of the element to slide to. |
showNext()
Shows the next item in carousel. This can be only used after the component is rendered.
showPrevious()
Shows the previous item in carousel. This can be only used after the component is rendered.
Unbinds aggregation content
from model data.
Returns: