public interface BufferListener
This interface is new in jEdit 4.3pre3. The text area was made independent
of the rest of jEdit, and thus this class could no longer depend on
org.gjt.sp.jedit.Buffer
.
While the
BufferUpdate
EditBus message is used for
general buffer state changes, this interface is used for events which are
fired frequently, or for which performance is essential.
Because this interface is subject to change in the future, you
should subclass BufferAdapter
instead of
implementing it directly.
Modifier and Type | Method and Description |
---|---|
void |
bufferLoaded(JEditBuffer buffer)
Called to notify the text area that the buffer has been reloaded.
|
void |
contentInserted(JEditBuffer buffer,
int startLine,
int offset,
int numLines,
int length)
Called when text is inserted into the buffer.
|
void |
contentRemoved(JEditBuffer buffer,
int startLine,
int offset,
int numLines,
int length)
Called when text is removed from the buffer.
|
void |
foldHandlerChanged(JEditBuffer buffer)
Called to notify the text area that folds need to be collapsed if
the "collapseFolds" property is set.
|
void |
foldLevelChanged(JEditBuffer buffer,
int startLine,
int endLine)
Called when line fold levels change.
|
void |
preContentInserted(JEditBuffer buffer,
int startLine,
int offset,
int numLines,
int length)
Called when text is about to be inserted in the buffer.
|
void |
preContentRemoved(JEditBuffer buffer,
int startLine,
int offset,
int numLines,
int length)
Called when text is about to be removed from the buffer, but is
still present.
|
void |
transactionComplete(JEditBuffer buffer)
Called after an undo or compound edit has finished.
|
void foldLevelChanged(JEditBuffer buffer, int startLine, int endLine)
buffer
- The buffer in questionstartLine
- The start line numberendLine
- The end line numbervoid contentInserted(JEditBuffer buffer, int startLine, int offset, int numLines, int length)
buffer
- The buffer in questionstartLine
- The first lineoffset
- The start offset, from the beginning of the buffernumLines
- The number of lines insertedlength
- The number of characters insertedvoid contentRemoved(JEditBuffer buffer, int startLine, int offset, int numLines, int length)
buffer
- The buffer in questionstartLine
- The first lineoffset
- The start offset, from the beginning of the buffernumLines
- The number of lines removedlength
- The number of characters removedvoid preContentInserted(JEditBuffer buffer, int startLine, int offset, int numLines, int length)
buffer
- The buffer in questionstartLine
- The first lineoffset
- The start offset, from the beginning of the buffernumLines
- The number of lines insertedlength
- The number of characters insertedvoid preContentRemoved(JEditBuffer buffer, int startLine, int offset, int numLines, int length)
buffer
- The buffer in questionstartLine
- The first lineoffset
- The start offset, from the beginning of the buffernumLines
- The number of lines to be removedlength
- The number of characters to be removedvoid transactionComplete(JEditBuffer buffer)
buffer
- The buffer in questionvoid foldHandlerChanged(JEditBuffer buffer)
buffer
- The buffer in questionvoid bufferLoaded(JEditBuffer buffer)
buffer
- The buffer in question