Package com.day.util.diff
Interface ChangeListener
-
- All Known Implementing Classes:
DefaultChangeListener
,InlineChangeListener
public interface ChangeListener
Listener that is called for each line in a document. SeeDocumentDiff.showChanges(ChangeListener, int)
for details.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CVS_ID
The CVS/SVN id
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onChangeEnd()
Invoked after a change finished.void
onChangeStart(int leftElem, int leftLen, int rightElem, int rightLen)
Invoked before a change starts.void
onDeleted(int leftIdx, int rightIdx, Document.Element elem)
Invoked for a deleted elementvoid
onDocumentsEnd(Document left, Document right)
Invoked after the iteration over the changes finished.void
onDocumentsStart(Document left, Document right)
Invoked before the iteration over the changes start.void
onInserted(int leftIdx, int rightIdx, Document.Element elem)
Invoked for an inserted elementvoid
onUnmodified(int leftIdx, int rightIdx, Document.Element elem)
Invoked for an unmodified element
-
-
-
Field Detail
-
CVS_ID
static final java.lang.String CVS_ID
The CVS/SVN id- See Also:
- Constant Field Values
-
-
Method Detail
-
onDocumentsStart
void onDocumentsStart(Document left, Document right)
Invoked before the iteration over the changes start.- Parameters:
left
- the left documentright
- the right document
-
onDocumentsEnd
void onDocumentsEnd(Document left, Document right)
Invoked after the iteration over the changes finished.- Parameters:
left
- the left documentright
- the right document
-
onChangeStart
void onChangeStart(int leftElem, int leftLen, int rightElem, int rightLen)
Invoked before a change starts.- Parameters:
leftElem
- the index of the left element of this change.leftLen
- the number of changed left elements.rightElem
- the index of the right element of this change.rightLen
- the number of changed right elements.
-
onChangeEnd
void onChangeEnd()
Invoked after a change finished.
-
onUnmodified
void onUnmodified(int leftIdx, int rightIdx, Document.Element elem)
Invoked for an unmodified element- Parameters:
leftIdx
- the index of the left elementrightIdx
- the index of the right elementelem
- the element
-
onDeleted
void onDeleted(int leftIdx, int rightIdx, Document.Element elem)
Invoked for a deleted element- Parameters:
leftIdx
- the index of the left elementrightIdx
- the index of the right elementelem
- the element
-
onInserted
void onInserted(int leftIdx, int rightIdx, Document.Element elem)
Invoked for an inserted element- Parameters:
leftIdx
- the index of the left elementrightIdx
- the index of the right elementelem
- the element
-
-