public class ForwardingTextBufferListener extends java.lang.Object implements TextBufferListener
This class implements the weak listener semantics documented by the
TextBuffer interface. However, it should be noted that those
semantics essentially no longer apply for text buffers obtained from a
an IDE TextNode because the text node keeps a duplicate list
of listeners with strong references.
EDIT_BEGIN_ATTRIBUTE, EDIT_END_ATTRIBUTE, EOL_TYPE_ATTRIBUTE, MODIFIED_ATTRIBUTE, READ_ONLY_ATTRIBUTE, RELOAD_END_ATTRIBUTE, RELOAD_START_ATTRIBUTE| Constructor and Description |
|---|
ForwardingTextBufferListener(TextBuffer buffer) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTextBufferListener(TextBufferListener listener) |
void |
attributeUpdate(TextBuffer buffer,
int attribute)
Provides notification regarding a change to one of the buffer
attributes.
|
void |
insertUpdate(TextBuffer buffer,
int offset,
int count,
char[] insertedData)
Provides notification about an insertion into the
TextBuffer. |
void |
removeTextBufferListener(TextBufferListener listener) |
void |
removeUpdate(TextBuffer buffer,
int offset,
int count,
char[] removedData)
Provides notification about a removal from the
TextBuffer. |
public ForwardingTextBufferListener(TextBuffer buffer)
public void addTextBufferListener(TextBufferListener listener)
public void removeTextBufferListener(TextBufferListener listener)
public void attributeUpdate(TextBuffer buffer, int attribute)
TextBufferListenerattributeUpdate in interface TextBufferListenerbuffer - the TextBuffer that changed.attribute - the attribute that changedpublic void insertUpdate(TextBuffer buffer, int offset, int count, char[] insertedData)
TextBufferListenerTextBuffer.insertUpdate in interface TextBufferListenerbuffer - the TextBuffer that changed.offset - the offset where the insert took placecount - the number of characters inserted (insertedData.length)insertedData - an array of the removed characters.public void removeUpdate(TextBuffer buffer, int offset, int count, char[] removedData)
TextBufferListenerTextBuffer.removeUpdate in interface TextBufferListenerbuffer - the TextBuffer that changed.offset - the offset of the first removed character.count - the number of characters removed (removedData.length)removedData - an array of the removed characters