Packagecom.brightcove.api.components
Classpublic class ListWidget
InheritanceListWidget Inheritance UIObject Inheritance Component Inheritance flash.events.EventDispatcher
Subclasses List, TileList

Abstract base class for UI list in the player, such as List and TileList.



Public Properties
 PropertyDefined By
 Inheritedcomponent : Object
[read-only] Returns a reference to the wrapped API element in the player, which can be used to get access to new methods that might not be defined within this version of the SWC.
Component
Public Methods
 MethodDefined By
  
ListWidget(element:Object)
Constructor.
ListWidget
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void
[override] Adds a listener for an event.
UIObject
 Inherited
getAlpha():Number
Returns the alpha value of the component.
Component
  
Returns whether continuous play is enabled for the list, which automatically advances upon completion of an item.
ListWidget
 Inherited
getBlendMode():String
Returns the blend mode of the component.
UIObject
 Inherited
Returns the interface for the layout container of the element.
Component
 Inherited
getCSS():String
Returns the CSS used for this component instance.
UIObject
  
getData():Array
Returns the data currently rendered within the list.
ListWidget
  
getDataAtIndex(index:uint):Object
Returns the data stored at the specified index.
ListWidget
 Inherited
getDefinition():String
Returns the XML (BEML) definition of the component.
Component
 Inherited
getEnabled():Boolean
Returns whether component is enabled.
UIObject
 Inherited
getHeight():Number
Returns the pixel height of the component.
Component
 Inherited
getID():String
Returns the ID of the component, as defined in the XML.
Component
 Inherited
Returns whether the component is included in layout calculations and rendering in parent layout box.
Component
 Inherited
getIndex():int
Returns the index of this element in its parent's elements array.
Component
 Inherited
Returns the interface for the layout element that is the next sibling to this element in the parent containers's element array.
Component
 Inherited
getNodeName():String
Returns the node name of the element.
Component
  
Returns the number of items currently managed in the list.
ListWidget
 Inherited
Returns the interface for the layout element that is the previous sibling to this element in the parent containers's element array.
Component
 Inherited
getRotation():Number
Returns the rotation of the component.
UIObject
  
Returns the data stored at the currently selected index.
ListWidget
  
Returns the index of the currently selected item in the list, or -1.
ListWidget
 Inherited
getVisible():Boolean
Returns whether the component is visible.
Component
 Inherited
getWidth():Number
Returns the pixel width of the component.
Component
 Inherited
getX(global:Boolean = false):Number
Returns the position of the component on the x axis.
Component
 Inherited
getY(global:Boolean = false):Number
Returns the position of the component on the y axis.
Component
 Inherited
move(x:Number, y:Number, global:Boolean = false):void
Sets the x,y coordinates of the component.
Component
  
next():void
Selects the next item in the list.
ListWidget
  
previous():void
Selects the previous item in the list.
ListWidget
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[override] Removes a listener for an event.
UIObject
 Inherited
setAlpha(alpha:Number):void
Sets the alpha value of the component.
Component
  
setAutomaticAdvance(automaticAdvance:Boolean):void
Enables/disables continuous play for the list, which automatically advances upon completion of an item.
ListWidget
 Inherited
setBlendMode(mode:String):void
Sets the blend mode of the component.
UIObject
  
setData(data:Array):void
Sets the data to be rendered within the list.
ListWidget
 Inherited
setEnabled(enable:Boolean):void
Enables/disables component for events.
UIObject
 Inherited
setIncludeInLayout(includeInLayout:Boolean):void
Sets whether the component is included in layout calculations and rendering in parent layout box.
Component
 Inherited
setRotation(rotation:Number):void
Sets the rotation of the component.
UIObject
  
setSelectedIndex(index:int):void
Sets the currently selected item in the list by passing its index.
ListWidget
 Inherited
setSize(width:Number, height:Number):void
Sets the pixel dimensions for the wrapped component.
Component
 Inherited
setStyles(styles:String):void
Overrides specific styles for a component by accepting a semicolon-delimited list of style names and colors.
UIObject
 Inherited
setVisible(visible:Boolean):void
Sets whether the component is visible.
Component
  
showPlaylist(id:Number):Boolean
Sets the data to be rendered within the list by a playlist ID, which results in the videos displayed.
ListWidget
Protected Methods
 MethodDefined By
 Inherited
redispatchEvent(event:Event):void
Sends the specified event, usually sent from a handler in order to bubble up non-bubbling events.
UIObject
Events
 Event Summary Defined By
 InheritedDispatched when a UI element in the player is clicked.Component
 InheritedDispatched when a UI element in the player is rolled off.Component
 InheritedDispatched when a UI element in the player is rolled over.Component
 InheritedDispatched when a property changes in a bindable component.Component
Constructor Detail
ListWidget()Constructor
public function ListWidget(element:Object)

Constructor.

Parameters
element:Object — layout element to wrap and delegate all calls to.
Method Detail
getAutomaticAdvance()method
public function getAutomaticAdvance():Boolean

Returns whether continuous play is enabled for the list, which automatically advances upon completion of an item.

Returns
Boolean — True if videos automatically advance upon completion.
getData()method 
public function getData():Array

Returns the data currently rendered within the list.

Returns
Array — The data rendered within the list, as an array of items.
getDataAtIndex()method 
public function getDataAtIndex(index:uint):Object

Returns the data stored at the specified index.

Parameters

index:uint — index position of the item to retrieve data from.

Returns
Object — The data stored at the specified index.
getNumItems()method 
public function getNumItems():uint

Returns the number of items currently managed in the list.

Returns
uint — The number of items in the list, incuding non-visible.
getSelectedData()method 
public function getSelectedData():Object

Returns the data stored at the currently selected index.

Returns
Object — The data stored at the currently selected index.
getSelectedIndex()method 
public function getSelectedIndex():int

Returns the index of the currently selected item in the list, or -1.

Returns
int — The index of the currently selected item.
next()method 
public function next():void

Selects the next item in the list.

previous()method 
public function previous():void

Selects the previous item in the list.

setAutomaticAdvance()method 
public function setAutomaticAdvance(automaticAdvance:Boolean):void

Enables/disables continuous play for the list, which automatically advances upon completion of an item.

Parameters

automaticAdvance:Boolean — if videos should be played continuously, linearly.

setData()method 
public function setData(data:Array):void

Sets the data to be rendered within the list. For lists that are set to display media (videos or playlists) in the player, the array can simply be a collection of objects with valid IDs of media that have already been loaded into the player. The player will translate these objects into the actual media objects (e.g., tabs.setData([{id:123}, {id:345}, {id:567}]);).

Parameters

data:Array — data to render within the list, as an array of items.

setSelectedIndex()method 
public function setSelectedIndex(index:int):void

Sets the currently selected item in the list by passing its index.

Parameters

index:int — index of the item to select in the list.

showPlaylist()method 
public function showPlaylist(id:Number):Boolean

Sets the data to be rendered within the list by a playlist ID, which results in the videos displayed.

Parameters

id:Number — ID of the playlist to render.

Returns
Boolean — Whether the playlist was found and rendered.