org.gjt.sp.jedit.buffer
Class BufferChangeAdapter

java.lang.Object
  |
  +--org.gjt.sp.jedit.buffer.BufferChangeAdapter
All Implemented Interfaces:
BufferChangeListener

public abstract class BufferChangeAdapter
extends java.lang.Object
implements BufferChangeListener

An adapter you can subclass to avoid having to implement all the methods of the BufferChangeListener interface.

Since:
jEdit 4.0pre1
Version:
$Id: BufferChangeAdapter.java,v 1.7 2003/02/07 21:57:34 spestov Exp $
Author:
Slava Pestov

Constructor Summary
BufferChangeAdapter()
           
 
Method Summary
 void contentInserted(Buffer buffer, int startLine, int offset, int numLines, int length)
          Called when text is inserted into the buffer.
 void contentRemoved(Buffer buffer, int startLine, int offset, int numLines, int length)
          Called when text is removed from the buffer.
 void foldLevelChanged(Buffer buffer, int start, int end)
          Called when line fold levels change.
 void transactionComplete(Buffer buffer)
          Called after an undo or compound edit has finished.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferChangeAdapter

public BufferChangeAdapter()
Method Detail

foldLevelChanged

public void foldLevelChanged(Buffer buffer,
                             int start,
                             int end)
Called when line fold levels change.

Specified by:
foldLevelChanged in interface BufferChangeListener
Parameters:
buffer - The buffer in question
start - The start line number
end - The end line number
Since:
jEdit 4.0pre1

contentInserted

public void contentInserted(Buffer buffer,
                            int startLine,
                            int offset,
                            int numLines,
                            int length)
Called when text is inserted into the buffer.

Specified by:
contentInserted in interface BufferChangeListener
Parameters:
buffer - The buffer in question
startLine - The first line
offset - The start offset, from the beginning of the buffer
numLines - The number of lines inserted
length - The number of characters inserted
Since:
jEdit 4.0pre1

contentRemoved

public void contentRemoved(Buffer buffer,
                           int startLine,
                           int offset,
                           int numLines,
                           int length)
Called when text is removed from the buffer.

Specified by:
contentRemoved in interface BufferChangeListener
Parameters:
buffer - The buffer in question
startLine - The first line
offset - The start offset, from the beginning of the buffer
numLines - The number of lines removed
length - The number of characters removed
Since:
jEdit 4.0pre1

transactionComplete

public void transactionComplete(Buffer buffer)
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:
transactionComplete in interface BufferChangeListener
Parameters:
buffer - The buffer in question
Since:
jEdit 4.0pre6