au.com.zip.cs.dev
Class LinedDocumentCursor

java.lang.Object
  extended by au.com.zip.cs.dev.LinedDocumentCursor
All Implemented Interfaces:
Comparable, Position

public class LinedDocumentCursor
extends Object
implements Position, Comparable


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.swing.text.Position
Position.Bias
 
Method Summary
 void adjustForInsertion(int startOffset, int length)
          Adjust a cursor after text has been inserted into the document.
 void adjustForRemoval(int startOffset, int length)
          Adjust a cursor after text has been deleted from the document.
 int compareTo(Object o)
           
 int getOffset()
           
 void init(int o, int n, int lo)
           
 void rmove(int rel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compareTo

public final int compareTo(Object o)
Specified by:
compareTo in interface Comparable

init

public final void init(int o,
                       int n,
                       int lo)

getOffset

public final int getOffset()
Specified by:
getOffset in interface Position

rmove

public final void rmove(int rel)
                 throws BadLocationException
Throws:
BadLocationException

adjustForRemoval

public final void adjustForRemoval(int startOffset,
                                   int length)
Adjust a cursor after text has been deleted from the document.

Parameters:
startOffset - offset of first character deleted
length - number of characters deleted

adjustForInsertion

public final void adjustForInsertion(int startOffset,
                                     int length)
Adjust a cursor after text has been inserted into the document.

Parameters:
startOffset - offset of first character deleted
length - number of characters inserted