Package ro.sync.ecss.extensions.api
Interface DocumentContentChangedEvent
- All Superinterfaces:
AuthorDocumentEvent
- All Known Subinterfaces:
DocumentContentDeletedEvent
,DocumentContentInsertedEvent
@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public interface DocumentContentChangedEvent
extends AuthorDocumentEvent
Event received by an
AuthorListener
when changes have been made
in the content of the AuthorDocument
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Delete fragment event type.static final int
Delete simple text event type.static final int
Insert fragment event type.static final int
Insert node event type.static final int
Insert simple text event type. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the length of the change.int
Returns the start offset at which the change occurred.Returns theAuthorNode
containing the change.int
getType()
Returns the type of this event.boolean
Deprecated.
-
Field Details
-
INSERT_TEXT_EVENT
static final int INSERT_TEXT_EVENTInsert simple text event type.- See Also:
-
INSERT_NODE_EVENT
static final int INSERT_NODE_EVENTInsert node event type.- See Also:
-
INSERT_FRAGMENT_EVENT
static final int INSERT_FRAGMENT_EVENTInsert fragment event type.- See Also:
-
DELETE_TEXT_EVENT
static final int DELETE_TEXT_EVENTDelete simple text event type.- See Also:
-
DELETE_FRAGMENT_EVENT
static final int DELETE_FRAGMENT_EVENTDelete fragment event type.- See Also:
-
-
Method Details
-
getLength
int getLength()Returns the length of the change.- Returns:
- the length of the change. Zero in case of an attribute change.
-
getOffset
int getOffset()Returns the start offset at which the change occurred.- Returns:
- the offset at which the change occurred. 0 in case of an attribute change.
-
getParentNode
AuthorNode getParentNode()Returns theAuthorNode
containing the change.- Returns:
- The node containing the change.
-
isSimpleTextEdit
Deprecated.UsegetType()
to determine the type of edit.Needed to verify if the change was a simple text edit and no node structure was affected.- Returns:
true
if the edit was a simple text edit, no node structure was affected.
-
getType
int getType()Returns the type of this event. It can be one of the constants:INSERT_TEXT_EVENT
,INSERT_FRAGMENT_EVENT
,INSERT_NODE_EVENT
DELETE_TEXT_EVENT
,DELETE_FRAGMENT_EVENT
- Returns:
- The document changed event type.
-
getType()
to determine the type of edit.