|
JavaScript Development Tools Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
org.eclipse.wst.jsdt.core.BufferChangedEvent
public class BufferChangedEvent
A buffer changed event describes how a buffer has changed. These events are
used in IBufferChangedListener notifications.
For text insertions, getOffset is the offset
of the first inserted character, getText is the
inserted text, and getLength is 0.
For text removals, getOffset is the offset
of the first removed character, getText is null,
and getLength is the length of the text that was removed.
For replacements (including IBuffer.setContents),
getOffset is the offset
of the first replaced character, getText is the replacement
text, and getLength is the length of the original text
that was replaced.
When a buffer is closed, getOffset is 0, getLength
is 0, and getText is null.
This class is not intended to be instantiated or subclassed by clients. Instances of this class are automatically created by the JavaScript model.
Provisional API: This class/interface is part of an interim API that is still under development and expected to
change significantly before reaching stability. It is being made available at this early stage to solicit feedback
from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
(repeatedly) as the API evolves.,
Serialized Form| Field Summary |
|---|
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
BufferChangedEvent(IBuffer buffer,
int offset,
int length,
java.lang.String text)
Creates a new buffer changed event indicating that the given buffer has changed. |
|
| Method Summary | |
|---|---|
IBuffer |
getBuffer()
Returns the buffer which has changed. |
int |
getLength()
Returns the length of text removed or replaced in the buffer, or 0 if text has been inserted into the buffer. |
int |
getOffset()
Returns the index of the first character inserted, removed, or replaced in the buffer. |
java.lang.String |
getText()
Returns the text that was inserted, the replacement text, or null if text has been removed. |
| Methods inherited from class java.util.EventObject |
|---|
getSource, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BufferChangedEvent(IBuffer buffer,
int offset,
int length,
java.lang.String text)
buffer - the given bufferoffset - the given offsetlength - the given lengthtext - the given text| Method Detail |
|---|
public IBuffer getBuffer()
public int getLength()
0 in case of insertion).public int getOffset()
public java.lang.String getText()
null if text has been removed.
null
in case of deletion).
|
JavaScript Development Tools Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||