Packagecom.adobe.rtc.collaboration
Classpublic class SharedCursorPane
InheritanceSharedCursorPane Inheritance mx.core.UIComponent
ImplementsISessionSubscriber

SharedCursorPane is a UIComponent that, when stretched over a region, tracks the cursor positions of any user with role of UserRoles.PUBLISHER or higher within it and reports that position to other users. The pane is also responsible for rendering the remote cursors corresponding to these positions.



Public Properties
 PropertyDefined by
  collectionNode : CollectionNode
SharedCursorPane allows developers to "piggyback" the message traffic of the pane on an existing CollectionNode.
SharedCursorPane
  connectSession : IConnectSession
The IConnectSession with which this component is associated; it defaults to the first IConnectSession created in the application.
SharedCursorPane
  defaultCursorClass : Class
[static] The default class used for rendering remote pointers.
SharedCursorPane
  isSynchronized : Boolean
[read-only] Returns true is synchronized; false if not synchronized.
SharedCursorPane
  labelField : String
The field of UserDescriptor you want to show as label with your cursor.
SharedCursorPane
  labelFunction : Function
The function you want to set as labelFunction
SharedCursorPane
  myCursorClass : Class
Class to use for the current user's cursor.
SharedCursorPane
  nodeName : String
When specifying an existing CollectionNode, nodeName specifies a nodeName to use within that collectionNode for all message traffic.
SharedCursorPane
  pollInterval : int = 500
The time in milliseconds of the polling interval for cursor positions.
SharedCursorPane
  sharedID : String
Defines the logical location of the component on the service; typically this assigns the sharedID of the collectionNode used by the component.
SharedCursorPane
  sizingMode : String
Property for sharing mode.
SharedCursorPane
Public Methods
 MethodDefined by
  
close():void
Closes any event listeners and network operations.
SharedCursorPane
  
Gets the NodeConfiguration of the shared cursor node.
SharedCursorPane
  
getUserRole(p_userID:String):int
Returns the role of a given user for sharing cursors.
SharedCursorPane
  
setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):void
Sets the NodeConfiguration.
SharedCursorPane
  
setUserRole(p_userID:String, p_role:Number, p_nodeName:String = null):void
Sets the role of a given user for sharing cursors in the component's group specified by groupName.
SharedCursorPane
  
subscribe():void
Tells the component to begin synchronizing with the service.
SharedCursorPane
Protected Methods
 MethodDefined by
  
SharedCursorPane
Events
 EventSummaryDefined by
   Dispatched when the component either loses its connection to the session or regains it and has finished re-synchronizing itself to the rest of the room.SharedCursorPane
Public Constants
 ConstantDefined by
  ABSOLUTE_MODE : String = "absolute"
[static] Constant for supplying sizingMode settings.
SharedCursorPane
  RELATIVE_MODE : String = "relative"
[static] Constant for supplying sizingMode settings.
SharedCursorPane
Property detail
collectionNodeproperty
collectionNode:CollectionNode  [read-write]

SharedCursorPane allows developers to "piggyback" the message traffic of the pane on an existing CollectionNode. The name of the node to use may also be specified using the nodeName property. This avoids CollectionNode proliferation for a component that requires only one node. If not set, SharedCursorPane creates its own CollectionNode.

Implementation
    public function get collectionNode():CollectionNode
    public function set collectionNode(value:CollectionNode):void

See also

nodeName
connectSessionproperty 
connectSession:IConnectSession  [read-write]

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

Implementation
    public function get connectSession():IConnectSession
    public function set connectSession(value:IConnectSession):void
defaultCursorClassproperty 
public static var defaultCursorClass:Class

The default class used for rendering remote pointers.

isSynchronizedproperty 
isSynchronized:Boolean  [read-only]

Returns true is synchronized; false if not synchronized.

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

Implementation
    public function get isSynchronized():Boolean
labelFieldproperty 
labelField:String  [read-write]

The field of UserDescriptor you want to show as label with your cursor. You can also show custom fields

The default value is displayname.

Implementation
    public function get labelField():String
    public function set labelField(value:String):void
labelFunctionproperty 
labelFunction:Function  [read-write]

The function you want to set as labelFunction

Implementation
    public function get labelFunction():Function
    public function set labelFunction(value:Function):void
myCursorClassproperty 
myCursorClass:Class  [read-write]

Class to use for the current user's cursor. This will be sent to other users who will use it in rendering that user's remote cursor.

Implementation
    public function get myCursorClass():Class
    public function set myCursorClass(value:Class):void
nodeNameproperty 
nodeName:String  [read-write]

When specifying an existing CollectionNode, nodeName specifies a nodeName to use within that collectionNode for all message traffic. Defaults to "Shared_Cursors".

Implementation
    public function get nodeName():String
    public function set nodeName(value:String):void
pollIntervalproperty 
public var pollInterval:int = 500

The time in milliseconds of the polling interval for cursor positions. Note that setting this to a higher number reduces network message traffic but also reduces responsiveness. Setting it to a lower number uses more bandwidth.

sharedIDproperty 
sharedID:String  [read-write]

Defines the logical location of the component on the service; typically this assigns the sharedID of the collectionNode used by the component. sharedIDs should be unique within a room if they're expressing two unique locations. Note that this can only be assigned once before subscribe() is called. For components with an id property, sharedID defaults to that value.

Implementation
    public function get sharedID():String
    public function set sharedID(value:String):void
sizingModeproperty 
sizingMode:String  [read-write]

Property for sharing mode. There are two modes of sharing, ABSOLUTE_MODE and RELATIVE_MODE. In ABSOLUTE_MODE you get the exact position of the cursor of the sharing user. In RELATIVE_MODE you get the relative position with respect to the size of your own cursor pane. Default mode is RELATIVE_MODE.

Implementation
    public function get sizingMode():String
    public function set sizingMode(value:String):void
Method detail
close()method
public function close():void

Closes any event listeners and network operations. Using this function is recommended for garbage collection.

getNodeConfiguration()method 
public function getNodeConfiguration():NodeConfiguration

Gets the NodeConfiguration of the shared cursor node.

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

Returns the role of a given user for sharing cursors.

Parameters
p_userID:String — The user ID of the user whose role we should get.

Returns
int
onUserDescriptorFetch()method 
protected function onUserDescriptorFetch(p_evt:UserEvent):voidParameters
p_evt:UserEvent
setNodeConfiguration()method 
public function setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):void

Sets the NodeConfiguration.

Parameters
p_nodeConfiguration:NodeConfiguration — The node Configuration of the SharedCursor node.
setUserRole()method 
public function setUserRole(p_userID:String, p_role:Number, p_nodeName:String = null):void

Sets the role of a given user for sharing cursors in the component's group specified by groupName.

Parameters
p_userID:String — The user ID of the user whose role should be set.
 
p_role:Number — The role value to assign to the user with this user ID.
 
p_nodeName:String (default = null) — The nodename to set the role on, if nothing is specified, it applies to the entire collectionNode.
subscribe()method 
public function subscribe():void

Tells the component to begin synchronizing with the service. For UIComponent-based components such as this one, this 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.CollectionNodeEvent

Dispatched when the component either loses its connection to the session or regains it and has finished re-synchronizing itself to the rest of the room.

Constant detail
ABSOLUTE_MODEconstant
public static const ABSOLUTE_MODE:String = "absolute"

Constant for supplying sizingMode settings. In ABSOLUTE_MODE, the position of the cursors is determined in absolute pixel values.

RELATIVE_MODEconstant 
public static const RELATIVE_MODE:String = "relative"

Constant for supplying sizingMode settings. In RELATIVE_MODE, the position of the cursors is determined relative to the size of the sharedCursorPane.





 

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/collaboration/SharedCursorPane.html