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.
offset
protected int offset
bias
protected Position.Bias bias
XMLDocument.Position
public XMLDocument.Position(int offset)
XMLDocument.Position
public XMLDocument.Position(int offset,
Position.Bias bias)
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