Packagecom.adobe.rtc.pods
Classpublic class Note
InheritanceNote Inheritance mx.core.UIComponent
ImplementsISessionSubscriber, mx.managers.IFocusManagerComponent

The Note component is a high-level pod component which allows multiple users to collaboratively edit within a text editor. In the model-view-controller sense, the note is the view and controller to the NoteModel's model since it consumes user events, drives them to the model, accepts model events, and updates the view.

In general, users with publisher role and higher can edit the note while users with a viewer role can see the note. The note pod features synchronized text, selection, and scroll position, as well as a list of users who are currently editing.

See also

com.adobe.rtc.pods.noteClasses.NoteModel


Public Properties
 PropertyDefined by
  connectSession : IConnectSession
The IConnectSession with which this component is associated.
Note
  editing : Boolean
[read-only] Determines whether the current user is editing the note.
Note
  groupName : String
Components (pods) are assigned to a group via groupName; if not specified, the component is assigned to the default, public group (the room at large).
Note
  htmlText : String
[read-only] Determines the text in the note.
Note
  isSynchronized : Boolean
[read-only] Returns true if the model is synchronized; otherwise, false.
Note
  model : NoteModel
[read-only] Allows access to the model component of the note.
Note
  sessionDependentItems : Boolean
Specifies whether or not the data in the note will persist after the session ends.
Note
  sharedID : String
Defines the logical location of the component on the service, usually the sharedID of the collectionNode the component uses.
Note
Public Methods
 MethodDefined by
  
Note()
Constructor.
Note
  
clear():void
Clears all text from the note.
Note
  
close():void
Disposes all listeners to the network and framework classes.
Note
  
getUserRole(p_userID:String):int
Returns the role of a given user for the note.
Note
  
redo():void
Performs a redo on the last un-done text edit.
Note
  
setUserRole(p_userID:String, p_userRole:int):void
Sets the role of a given user for the note.
Note
  
subscribe():void
Tells the component to begin synchronizing with the service.
Note
  
undo():void
Performs an undo on the last text edit.
Note
Events
 EventSummaryDefined by
   Dispatched when the note text changes.Note
   Dispatched when the user's role with respect to the component changes.Note
   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.Note
Styles
 StyleDescriptionDefined by
  
fillAlphas
Type: Array   CSS Inheritance: no
Note
  
fillColors
Type: Array   CSS Inheritance: no
Note
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
editingproperty 
editing:Boolean  [read-only]

Determines whether the current user is editing the note.

Implementation
    public function get editing():Boolean
groupNameproperty 
groupName:String  [read-write]

Components (pods) are assigned to a group via groupName; if not specified, the component is assigned to the default, public group (the room at large). Groups are like separate conversations within the room, but each conversation could employ one or more pods; for example, one "conversation" may use a web camera, chat, and whiteboard pod, with each pod using different access and publish models. Users are members of and can only see components within the group they are assigned. Room hosts can see all the groups and all the members in those groups.

Implementation
    public function get groupName():String
    public function set groupName(value:String):void
htmlTextproperty 
htmlText:String  [read-only]

Determines the text in the note.

Implementation
    public function get htmlText():String
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
modelproperty 
model:NoteModel  [read-only]

Allows access to the model component of the note.

Implementation
    public function get model():NoteModel
sessionDependentItemsproperty 
sessionDependentItems:Boolean  [read-write]

Specifies whether or not the data in the note will persist after the session ends.

The default value is false.

Implementation
    public function get sessionDependentItems():Boolean
    public function set sessionDependentItems(value:Boolean):void
sharedIDproperty 
sharedID:String  [read-write]

Defines the logical location of the component on the service, usually the sharedID of the collectionNode the component uses. sharedIDs should be unique within a room if they're expressing two unique locations. Note that this can only be assigned once and it is assigned 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
Constructor detail
Note()constructor
public function Note()

Constructor.

Method detail
clear()method
public function clear():void

Clears all text from the note.

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 note.

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

Returns
int
redo()method 
public function redo():void

Performs a redo on the last un-done text edit.

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

Sets the role of a given user for the note.

Parameters
p_userID:String — The role value to set on the specified user.
 
p_userRole:int — The ID of the user whose role should be 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.

undo()method 
public function undo():void

Performs an undo on the last text edit.

Event detail
changeevent 
Event object type: com.adobe.rtc.events.SharedPropertyEvent

Dispatched when the note text changes.

myRoleChangeevent  
Event object type: com.adobe.rtc.events.CollectionNodeEvent

Dispatched when the user's role with respect to the component changes.

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.





 

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/Note.html