|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Field Summary | |
static String |
TRACK_CHANGES_ELEMENT_NAME
|
static String |
TRACK_CHANGES_NAMESPACE
The namespace used for elements in the serialized XML. |
static String |
XML_VERSION_ATTRIBUTE
|
static String |
XML_VERSION_ATTRIBUTE_VALUE
|
| Method Summary | |
void |
accept(Operation operation,
HTMLDocument document)
Accept an operation. |
void |
addOperationChangeListener(OperationListener listener)
Add an operation change listener to the manager, listening for when the state of operations changes. |
Color |
getColorForUser(String author)
Get the color to use to render changes by author. |
int |
getOperationCount()
Get the number of operations that are currently being tracked. |
Collection |
getOperations()
Get the operations currently being tracked by this operation manager. |
Collection |
getOperationsInRange(int start,
int end)
Get the list of operations that affect the specified range. |
Collection |
getOperationsToRenderInRange(int start,
int end)
Get the list of operations that affect the rendering in the specified range. |
String |
getUsername()
Returns the current user name. |
boolean |
isRemoved(int startOffset,
int endOffset)
Determine if all content in the specified range is marked as removed. |
boolean |
isTrackChangesEnabled()
Returns whether or not changes are currently being tracked. |
Operation |
nextOperation(int afterOffset)
Get the operation whose affected range starts closest to, but after afterOffset. |
Operation |
nextOperation(Operation currentOperation)
Get the next operation after currentOperation, ordered by the start of the affected range. |
Operation |
previousOperation(int beforeOffset)
Get the operation whose affected range starts closest to, but before or equal to beforeOffset. |
Operation |
previousOperation(Operation currentOperation)
Get the operation before currentOperation, ordered by the start of the affected range. |
void |
reject(Operation operation,
HTMLDocument document)
Reject an operation. |
void |
removeOperation(Operation operation)
Remove an operation from the manager without doing anything else. |
void |
removeOperationChangeListener(OperationListener listener)
Remove an operation change listener from the manager. |
| Field Detail |
public static final String TRACK_CHANGES_NAMESPACE
public static final String TRACK_CHANGES_ELEMENT_NAME
public static final String XML_VERSION_ATTRIBUTE_VALUE
public static final String XML_VERSION_ATTRIBUTE
| Method Detail |
public boolean isTrackChangesEnabled()
true if track changes is enabled, otherwise false.public int getOperationCount()
public Collection getOperations()
The operations are ordered by the start of the range in the document they affect.
public Collection getOperationsToRenderInRange(int start,
int end)
Note that if track changes rendering is off, this method will always return an empty collection.
The operations are ordered by the start of the range in the document they affect.
start - the start of the range to check for operations in.end - the end of the range to check for operations in.
public Collection getOperationsInRange(int start,
int end)
The operations are ordered by the start of the range in the document they affect.
start - the start of the range to check for operations in.end - the end of the range to check for operations in.
public void accept(Operation operation,
HTMLDocument document)
throws BadLocationException
operation - the operation to accept. Must have been retrieved from this operation manager.document - the document being edited. This must be the document retrieved from the HTML editing pane.
BadLocationException - if the operation attempts to access or modify an invalid location in the document.
public void reject(Operation operation,
HTMLDocument document)
throws BadLocationException
operation - the operation to reject. Must have been retrieved from this operation manager.document - the document to reverse changes in. This must be the document retrieved from the HTML editing pane.
BadLocationException - if the operation attempts to access or modify an invalid location in the document.public Operation nextOperation(Operation currentOperation)
currentOperation - the operation to get the next operation after, or null to get the first
operation in the document.
Operation after currentOperation.public Operation previousOperation(Operation currentOperation)
currentOperation - the operation to get the operation before, or null to get the last
operation in the document.
Operation before currentOperation.public Operation nextOperation(int afterOffset)
afterOffset - the offset to find the closest operation after.
public Operation previousOperation(int beforeOffset)
beforeOffset - the offset to find the closest operation before.
public Color getColorForUser(String author)
author - the author to get the color for.
public String getUsername()
public void addOperationChangeListener(OperationListener listener)
listener - the OperationListener to receive eventspublic void removeOperationChangeListener(OperationListener listener)
listener - the OperationListener to remove.public void removeOperation(Operation operation)
operation -
public boolean isRemoved(int startOffset,
int endOffset)
startOffset - the start of the range.endOffset - the end of the range.
true if all text in the range is marked as removed, otherwise false.
|
Copyright (c) 2005-2007 Ephox Pty Ltd. All rights reserved. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||