net.sourceforge.spedit.core
Class XMLDocument.Position

java.lang.Object
  |
  +--net.sourceforge.spedit.core.XMLDocument.Position
All Implemented Interfaces:
Position
Enclosing class:
XMLDocument

public static class XMLDocument.Position
extends Object
implements Position

Implements the Swing position interface in order to keep track of changes that occur in an XMLDocument. Basically a position will help keep track of a specific offset in the logical view (raw text) of the XMLDocument, taking into account future modification to the XMLDocument content.


Inner classes inherited from class javax.swing.text.Position
Position.Bias
 
Field Summary
protected  Position.Bias bias
           
protected  int offset
           
 
Constructor Summary
XMLDocument.Position(int offset)
           
XMLDocument.Position(int offset, Position.Bias bias)
           
 
Method Summary
 int getOffset()
           
 boolean isBackward()
          Tells if this position points on the character before the given offset.
 boolean isForward()
          Tells if this position points on the character after the given offset.
 void setBiasBackward()
           
 void setBiasForward()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

offset

protected int offset

bias

protected Position.Bias bias
Constructor Detail

XMLDocument.Position

public XMLDocument.Position(int offset)

XMLDocument.Position

public XMLDocument.Position(int offset,
                            Position.Bias bias)
Method Detail

getOffset

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

setBiasForward

public void setBiasForward()

setBiasBackward

public void setBiasBackward()

isForward

public boolean isForward()
Tells if this position points on the character after the given offset.

isBackward

public boolean isBackward()
Tells if this position points on the character before the given offset.

toString

public String toString()
Overrides:
toString in class Object