Extension SDK 9.0.5

oracle.jdeveloper.audit.model
Class TextDocumentAdapter.TextBufferTracker

java.lang.Object
  extended byoracle.jdeveloper.audit.model.TextDocumentAdapter.TextBufferTracker
Enclosing class:
TextDocumentAdapter

protected static class TextDocumentAdapter.TextBufferTracker
extends java.lang.Object

A model which tracks edits to a text buffer.


Nested Class Summary
static class TextDocumentAdapter.TextBufferTracker.Edit
          A representation of a single edit.
 
Constructor Summary
protected TextDocumentAdapter.TextBufferTracker()
           
 
Method Summary
 int getDeltaLength(int offset, int length)
          Gets the difference between the original and current lengths of a region in the tracked buffer.
 int getDeltaOffset(int offset)
          Gets the distance between the original and current offsets of a character in the tracked buffer.
 java.util.List getEdits(int offset, int length)
          Gets a list of edits in a region.
 boolean isModified()
          Gets whether the tracked buffer has been modified since tracking began.
 void textInserted(int offset, int count, char[] text)
           
 void textRemoved(int offset, int count, char[] text)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextDocumentAdapter.TextBufferTracker

protected TextDocumentAdapter.TextBufferTracker()
Method Detail

isModified

public boolean isModified()
Gets whether the tracked buffer has been modified since tracking began.


getDeltaOffset

public int getDeltaOffset(int offset)
Gets the distance between the original and current offsets of a character in the tracked buffer.


getDeltaLength

public int getDeltaLength(int offset,
                          int length)
Gets the difference between the original and current lengths of a region in the tracked buffer.

Parameters:
offset - The original offset of the region.
length - The original length of the region.
Returns:
The change in length of the region.

getEdits

public java.util.List getEdits(int offset,
                               int length)
Gets a list of edits in a region.

Parameters:
offset - The original offset of the region.
length - The original length of the region.
Returns:
A list of TextDocumentAdapter.TextBufferTracker.Edits that occurred in the region.

textInserted

public void textInserted(int offset,
                         int count,
                         char[] text)

textRemoved

public void textRemoved(int offset,
                        int count,
                        char[] text)

toString

public java.lang.String toString()

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.