java.lang.Object
org.gjt.sp.jedit.buffer.BufferAdapter
- All Implemented Interfaces:
BufferListener
- Direct Known Subclasses:
ElasticTabStopBufferListener
An adapter you can subclass to avoid having to implement all the methods
of the
BufferListener interface.- Since:
- jEdit 4.3pre3
- Version:
- $Id: BufferAdapter.java 25040 2020-03-26 23:31:48Z kpouer $
- Author:
- Slava Pestov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbufferLoaded(JEditBuffer buffer) Called to notify the text area that the buffer has been reloaded.voidcontentInserted(JEditBuffer buffer, int startLine, int offset, int numLines, int length) Called when text is inserted into the buffer.voidcontentRemoved(JEditBuffer buffer, int startLine, int offset, int numLines, int length) Called when text is removed from the buffer.voidfoldHandlerChanged(JEditBuffer buffer) Called to notify the text area that folds need to be collapsed if the "collapseFolds" property is set.voidfoldLevelChanged(JEditBuffer buffer, int start, int end) Called when line fold levels change.voidpreContentInserted(JEditBuffer buffer, int startLine, int offset, int numLines, int length) Called when text is about to be inserted in the buffer.voidpreContentRemoved(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.voidtransactionComplete(JEditBuffer buffer) Called after an undo or compound edit has finished.
-
Constructor Details
-
BufferAdapter
public BufferAdapter()
-
-
Method Details
-
foldLevelChanged
Called when line fold levels change.- Specified by:
foldLevelChangedin interfaceBufferListener- Parameters:
buffer- The buffer in questionstart- The start line numberend- The end line number- Since:
- jEdit 4.3pre3
-
contentInserted
public void contentInserted(JEditBuffer buffer, int startLine, int offset, int numLines, int length) Called when text is inserted into the buffer.- Specified by:
contentInsertedin interfaceBufferListener- Parameters:
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 inserted- Since:
- jEdit 4.3pre3
-
preContentInserted
public void preContentInserted(JEditBuffer buffer, int startLine, int offset, int numLines, int length) Called when text is about to be inserted in the buffer.- Specified by:
preContentInsertedin interfaceBufferListener- Parameters:
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 inserted- Since:
- jEdit 4.3pre11
-
preContentRemoved
public 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.- Specified by:
preContentRemovedin interfaceBufferListener- Parameters:
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 removed- Since:
- jEdit 4.3pre3
-
contentRemoved
Called when text is removed from the buffer.- Specified by:
contentRemovedin interfaceBufferListener- Parameters:
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 removed- Since:
- jEdit 4.3pre3
-
transactionComplete
Called after an undo or compound edit has finished. The text area uses this event to queue up and collapse cleanup operations so they are only run once during a long transaction (such as a "Replace All" operation.)- Specified by:
transactionCompletein interfaceBufferListener- Parameters:
buffer- The buffer in question- Since:
- jEdit 4.3pre3
-
foldHandlerChanged
Called to notify the text area that folds need to be collapsed if the "collapseFolds" property is set. This method is called after the buffer has been loaded, and also if the user changes the fold handler.- Specified by:
foldHandlerChangedin interfaceBufferListener- Parameters:
buffer- The buffer in question- Since:
- jEdit 4.3pre3
-
bufferLoaded
Called to notify the text area that the buffer has been reloaded.- Specified by:
bufferLoadedin interfaceBufferListener- Parameters:
buffer- The buffer in question- Since:
- jEdit 4.3pre3
-