org.gjt.sp.jedit.msg
Class BufferChanging

java.lang.Object
  extended by org.gjt.sp.jedit.EBMessage
      extended by org.gjt.sp.jedit.msg.EditPaneUpdate
          extended by org.gjt.sp.jedit.msg.BufferChanging

public class BufferChanging
extends EditPaneUpdate

An EBMessage sent by the EditPane just before the buffer changes. It is also sent by some plugins just before the caret position is changed. In hindsight, a better name for this class would be PositionChanging. Plugins may emit this message just before they perform a Navigation-Like operation, such as jumping the cursor to another location (which may be in the same buffer or not). This is mostly for the benefit of the Navigator plugin, but may be used by other plugins too, such as BufferLocal.

Since:
jEdit 4.3pre4

Field Summary
 
Fields inherited from class org.gjt.sp.jedit.msg.EditPaneUpdate
BUFFER_CHANGED, BUFFER_CHANGING, CREATED, DESTROYED
 
Constructor Summary
BufferChanging(EditPane editPane, Buffer newBuffer)
           
 
Method Summary
 Buffer getBuffer()
           
 
Methods inherited from class org.gjt.sp.jedit.msg.EditPaneUpdate
getEditPane, getWhat, paramString
 
Methods inherited from class org.gjt.sp.jedit.EBMessage
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BufferChanging

public BufferChanging(EditPane editPane,
                      Buffer newBuffer)
Parameters:
editPane - the editPane that sent the message
newBuffer - the buffer that will soon be displayed, or null if this is a jump to the same buffer.
Method Detail

getBuffer

public Buffer getBuffer()
Returns:
the new buffer that is about to be displayed. This value can sometimes be null, in the case where a plugin is changing to another position in the current buffer.