public class CollaborationBinderUtil extends Object
CollaborationBinder
.Modifier and Type | Method and Description |
---|---|
static void |
addEditor(TopicConnection topicConnection,
String propertyName,
UserInfo user)
Signals that the user is currently editing the field that is bound to the
property.
|
static void |
addEditor(TopicConnection topicConnection,
String propertyName,
UserInfo user,
int fieldIndex)
Signals that the user is currently editing the field that is bound to the
property.
|
static void |
removeEditor(TopicConnection topicConnection,
String propertyName,
UserInfo user)
Signals that the user is not editing the field that is bound to the
property.
|
static void |
setFieldValue(TopicConnection topicConnection,
String propertyName,
Object value)
Sets the property value in the collaboration binders connected to the
same topic, updating the fields which are bound to that property for all
connected clients.
|
public static void setFieldValue(TopicConnection topicConnection, String propertyName, Object value)
The collaboration binder already takes care of propagating field value changes among collaborating users. This method may be useful when the data changes outside a UI thread, and the new values should be made visible to the users.
topicConnection
- the topic connection, not null
propertyName
- the name of the property to update, not null
value
- the new value to set, can be null
to clear the fieldspublic static void addEditor(TopicConnection topicConnection, String propertyName, UserInfo user)
If the user is already an editor of the field, this method does nothing.
The collaboration binder already takes care of updating the active editors when users focus the fields. This method is needed only if you need to explicitly control the users who are displayed as the active editors.
topicConnection
- the topic connection, not null
propertyName
- the name of the property bound to the edited field, not
null
user
- information of the user to add as the editor of the field, not
null
public static void addEditor(TopicConnection topicConnection, String propertyName, UserInfo user, int fieldIndex)
If the user is already an editor of the field, this method does nothing.
The collaboration binder already takes care of updating the active editors when users focus the fields. This method is needed only if you need to explicitly control the users who are displayed as the active editors.
topicConnection
- the topic connection, not null
propertyName
- the name of the property bound to the edited field, not
null
user
- information of the user to add as the editor of the field, not
null
fieldIndex
- index of the focused element inside the field, for example a
radio button inside a radio button grouppublic static void removeEditor(TopicConnection topicConnection, String propertyName, UserInfo user)
If the user is currently not an editor of the field, this method does nothing.
The collaboration binder already takes care of updating the active editors when users focus the fields. This method is needed only if you need to explicitly control the users who are displayed as the active editors.
topicConnection
- the topic connection, not null
propertyName
- the name of the property bound to the edited field, not
null
user
- information of the user to remove from the editors of the
field, not null
addEditor(TopicConnection, String, UserInfo)
Copyright © 2021. All rights reserved.