new Carousel(id, orientationopt)
Ordered list of widgets that can be navigated by moving the list or the selection point
Provides adapter layer to old widget methods
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
id |
string | The id of the carousel, id_CarouselMask will be used as the id for the mask element and id_WidgetStrip will be used as the id of the widget strip element | ||
orientation |
Object |
<optional> |
antie.widgets.carousel.CarouselCore.orientations.VERTICAL | the orientation object of the carousel. Vertical by default, for horizontal pass in antie.widgets.carousel.CarouselCore.orientations.HORIZONTAL |
- Source:
Extends
- antie.widgets.carousel.CarouselCore
Methods
addClass(className)
Adds a CSS class to the widget strip if not already present.
Parameters:
Name | Type | Description |
---|---|---|
className |
String | The class name to add. |
- Source:
appendChildWidget(widget)
Appends a child widget to this widget.
Parameters:
Name | Type | Description |
---|---|---|
widget |
antie.widgets.Widget | The child widget to add. |
- Source:
getActiveChildIndex() → {Integer}
- Source:
- See:
Returns:
index Index of the child widget that is currently active.
- Type
- Integer
getActiveChildWidget()
Get the current active widget.
- Source:
Returns:
The current active widget
getChildWidget(id)
Get a child widget from its unique ID.
Parameters:
Name | Type | Description |
---|---|---|
id |
String | The id of the child widget to return. |
- Source:
Returns:
antie.widgets.Widget of the widget with the given ID, otherwise undefined if the child does not exist.
getChildWidgetCount()
Gets the number of direct child widgets.
- Source:
Returns:
The number of direct child widgets.
getChildWidgets()
Get an array of all this widget's children.
- Source:
Returns:
An array of all this widget's children.
getClasses()
Get an array of class names that this widget strip has.
- Source:
Returns:
An array of class names (Strings)
hasChildWidget(widget)
Checks to see if a specific widget is a direct child of this widget.
Parameters:
Name | Type | Description |
---|---|---|
widget |
antie.widgets.Widget | The widget to check to see if it is a direct child of this widget. |
- Source:
hasClass(className)
Checks to see if the widget strip has a given CSS class.
Parameters:
Name | Type | Description |
---|---|---|
className |
String | The class name to check. |
- Source:
Returns:
Boolean true if the device has the className. Otherwise boolean false.
insertChildWidget(index, widget)
Inserts a child widget at the specified index.
Parameters:
Name | Type | Description |
---|---|---|
index |
Integer | The index where to insert the child widget. |
widget |
antie.widgets.Widget | The child widget to add. |
- Source:
removeChildWidget(widget, retainElementopt)
Removes a specific child widget from this widget.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
widget |
antie.widgets.Widget | The child widget to remove. | |
retainElement |
Boolean |
<optional> |
Pass true to retain the child output element of the given widget |
- Source:
removeChildWidgets()
Remove all child widgets from this widget.
- Source:
removeClass(className)
Removes a CSS class from the widget strip if present.
Parameters:
Name | Type | Description |
---|---|---|
className |
String | The class name to remove. |
- Source:
setActiveChildIndex(index)
Attempts to set focus to the child widget at the given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
Integer | Index of the child widget to set focus to. |
- Source:
- See:
Returns:
Boolean true if the child widget was focusable, otherwise boolean false.
setActiveChildWidget(widget)
Attempt to set focus to the given child widget.
Note: You can only set focus to a focusable widget. A focusable widget is one that
contains an enabled antie.widgets.Button as either a direct or indirect child.
Note: Widgets have 2 independent states: active and focussed. A focussed widget is
either the Button with focus, or any parent of that Button. An active widget is
one which is the active child of its parent Container. When the parent widget
receives focus, focus will be placed on the active child.
Classes 'active' and 'focus' are appended to widgets with these states.
Parameters:
Name | Type | Description |
---|---|---|
widget |
antie.widgets.Widget | The child widget to set focus to. |
- Source:
Returns:
Boolean true if the child widget was focusable, otherwise boolean false.