public abstract class CollaborativeObject extends Object implements EventTarget
Model
to create specific types of collaborative objects.| 限定符 | 构造器和说明 |
|---|---|
protected |
CollaborativeObject(Model model) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addEventListener(EventType type,
EventHandler<?> handler,
boolean opt_capture)
Adds an event listener to the event target.
|
void |
addObjectChangedListener(EventHandler<ObjectChangedEvent> handler) |
String |
getId()
Returns the object id.
|
void |
removeEventListener(EventType type,
EventHandler<?> handler,
boolean opt_capture)
Removes an event listener from the event target.
|
void |
removeObjectChangedListener(EventHandler<ObjectChangedEvent> handler) |
String |
toString()
Returns a string representation of this collaborative object.
|
protected CollaborativeObject(Model model)
model - The document model.public void addEventListener(EventType type, EventHandler<?> handler, boolean opt_capture)
EventTargetaddEventListener 在接口中 EventTargettype - The type of the event to listen for.handler - The function to handle the event. The handler can also be an object that
implements the handleEvent method which takes the event object as argument.opt_capture - In DOM-compliant browsers, this determines whether the listener is fired
during the capture or bubble phase of the event.public void addObjectChangedListener(EventHandler<ObjectChangedEvent> handler)
public String getId()
public void removeEventListener(EventType type, EventHandler<?> handler, boolean opt_capture)
EventTargetremoveEventListener 在接口中 EventTargettype - The type of the event to listen for.handler - The function to handle the event. The handler can also be an object that
implements the handleEvent method which takes the event object as argument.opt_capture - In DOM-compliant browsers, this determines whether the listener is fired
during the capture or bubble phase of the event.public void removeObjectChangedListener(EventHandler<ObjectChangedEvent> handler)
Copyright © 2013. All Rights Reserved.