Packagecom.adobe.rtc.pods
Classpublic class Roster
InheritanceRoster Inheritance mx.controls.List
ImplementsISessionSubscriber

The Roster is a simple vertically-oriented list of users in the room which can be optionally delimited by their roles. Each user's entry displays an icon based on role, the user's name, and whether or not that user is speaking using VoIP. Each user also has a menu of options which are exposed on rollover by a menuButton defined by the menuDataProviderFunction property.

The Roster uses UserManager's userCollections to populate this list with UserDescriptors.

See also

com.adobe.rtc.sharedManagers.UserManager
com.adobe.rtc.sharedManagers.descriptors.UserDescriptor


Public Properties
 PropertyDefined by
  connectSession : IConnectSession
The IConnectSession with which this component is associated.
Roster
  currentMenuItem : IListItemRenderer
[read-only] Specifies the itemRenderer for the currently displayed user options menu.
Roster
  displaySelection : Boolean = false
whether or not to display selection
Roster
  isSynchronized : Boolean
[read-only] Returns true if the model is synchronized; otherwise, false.
Roster
  itemRenderer : IFactory
[write-only]
Roster
  MENU_AUDIENCE_USER_ICON : Class
[static] The audience user icon used in the default menu that corresponds to UserRoles.VIEWER.
Roster
  menuDataProviderFunction : Function
Specifies a user-supplied function to use in determining the dataProvider of the user options menu for each userDescriptor.
Roster
  MENU_HOST_USER_ICON : Class
[static] The host user icon used in the default menu that corresponds to UserRoles.OWNER.
Roster
  MENU_PARTICIPANT_USER_ICON : Class
[static] The participant user icon used in the default menu that corresponds to UserRoles.PUBLISHER.
Roster
  showMenuButtons : Boolean = true
Whether or not to show menuButtons when there is a rollover event on user entries.
Roster
  showRoleHeaders : Boolean = true
whether or not to show header rows for each role
Roster
Public Methods
 MethodDefined by
  
Roster
  
close():void
Disposes all listeners to the network and framework classes.
Roster
  
getUserRole(p_userID:String):int
Returns the role of a given user for the room as a whole; it is equivalent to UserManager.getUserRole().
Roster
  
setUserRole(p_userID:String, p_userRole:int):void
Sets the role of a given user for the room as a whole; it is equivalent to UserManager.setUserRole().
Roster
  
subscribe():void
Tells the component to begin synchronizing with the service.
Roster
Events
 EventSummaryDefined by
   Dispatched when a user's items are synchronized.Roster
   Dispatched when a user's options menu has an item clicked.Roster
Styles
 StyleDescriptionDefined by
  
iconSize
Type: uint   Format: Length   CSS Inheritance: no
Size of the user icon. The default value is 20.
Roster
  
menuButtonStyleName
Type: string   CSS Inheritance: no
StyleName for the MenuButton which appears in highlighted rows.
Roster
Public Constants
 ConstantDefined by
  REMOVE_USER : String = "RemoveUser"
[static] Constant used in the default menuDataProviderFunction to indicate that the user should be removed.
Roster
  ROLE_CHANGE : String = "RoleChange"
[static] Constant used in the default menuDataProviderFunction to indicate that the user's role should be changed.
Roster
Property detail
connectSessionproperty
connectSession:IConnectSession  [read-write]

The IConnectSession with which this component is associated. Note that this may only be set once before subscribe() is called; re-sessioning of components is not supported. Defaults to the first IConnectSession created in the application.

Implementation
    public function get connectSession():IConnectSession
    public function set connectSession(value:IConnectSession):void
currentMenuItemproperty 
currentMenuItem:IListItemRenderer  [read-only]

Specifies the itemRenderer for the currently displayed user options menu.

Implementation
    public function get currentMenuItem():IListItemRenderer
displaySelectionproperty 
public var displaySelection:Boolean = false

whether or not to display selection

The default value is false.

isSynchronizedproperty 
isSynchronized:Boolean  [read-only]

Returns true if the model is synchronized; otherwise, false.

This property can be used as the source for data binding.

Implementation
    public function get isSynchronized():Boolean
itemRendererproperty 
itemRenderer:IFactory  [write-only]

Implementation
    public function set itemRenderer(value:IFactory):void
MENU_AUDIENCE_USER_ICONproperty 
public static var MENU_AUDIENCE_USER_ICON:Class

The audience user icon used in the default menu that corresponds to UserRoles.VIEWER.

menuDataProviderFunctionproperty 
public var menuDataProviderFunction:Function

Specifies a user-supplied function to use in determining the dataProvider of the user options menu for each userDescriptor. The function takes a userDescriptor and returns a dataProvider suitable for a menu, for example, myDPFunction(p_user:UserDescriptor):Object. In order to prevent any menu from being shown for this user, it returns null.

MENU_HOST_USER_ICONproperty 
public static var MENU_HOST_USER_ICON:Class

The host user icon used in the default menu that corresponds to UserRoles.OWNER.

MENU_PARTICIPANT_USER_ICONproperty 
public static var MENU_PARTICIPANT_USER_ICON:Class

The participant user icon used in the default menu that corresponds to UserRoles.PUBLISHER.

showMenuButtonsproperty 
public var showMenuButtons:Boolean = true

Whether or not to show menuButtons when there is a rollover event on user entries.

The default value is true.

showRoleHeadersproperty 
public var showRoleHeaders:Boolean = true

whether or not to show header rows for each role

The default value is true.

Constructor detail
Roster()constructor
public function Roster()
Method detail
close()method
public function close():void

Disposes all listeners to the network and framework classes. Recommended for proper garbage collection of the component.

getUserRole()method 
public function getUserRole(p_userID:String):int

Returns the role of a given user for the room as a whole; it is equivalent to UserManager.getUserRole().

Parameters
p_userID:String — The user ID for the user being queried.

Returns
int
setUserRole()method 
public function setUserRole(p_userID:String, p_userRole:int):void

Sets the role of a given user for the room as a whole; it is equivalent to UserManager.setUserRole().

Parameters
p_userID:String — The user's user ID whose role should be set.
 
p_userRole:int — The role value to set.
subscribe()method 
public function subscribe():void

Tells the component to begin synchronizing with the service. For UIComponent-based components such as this one, subscribe() is called automatically upon being added to the displayList. For "headless" components, this method must be called explicitly.

Event detail
synchronizationChangeevent 
Event object type: com.adobe.rtc.events.UserEvent

Dispatched when a user's items are synchronized.

userMenuItemClickevent  
Event object type: mx.events.MenuEvent

Dispatched when a user's options menu has an item clicked. Use currentMenuItem to determine with which ListItemRenderer the menu is associated.

Constant detail
REMOVE_USERconstant
public static const REMOVE_USER:String = "RemoveUser"

Constant used in the default menuDataProviderFunction to indicate that the user should be removed.

ROLE_CHANGEconstant 
public static const ROLE_CHANGE:String = "RoleChange"

Constant used in the default menuDataProviderFunction to indicate that the user's role should be changed.





 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/labs/acrobatcom/com/adobe/rtc/pods/Roster.html