All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.sun.java.swing.text.Position

public interface Position
Represents a location within a document. It is intended abstract away implementation details of the document and enable specification of positions within the document that are capable of tracking of change as the document is edited (ie offsets are fragile).


Method Index

 o isAfter(Position)
Compare this location to the given location to see if this location occurs later in the document.
 o isBefore(Position)
Compare this location to the given location to see if this location occurs sooner in the document.
 o isDifferent(Position)
Compare to another location to see if it represents a different place within the document.
 o isSame(Position)
Compare to another location to see if it represents the same place within the document.
 o isSameOrAfter(Position)
Compare this location to the given location to see if this location either occurs later in the document or represents the same location.
 o isSameOrBefore(Position)
Compare this location to the given location to see if this location occurs either sooner in the document, or represents the same location.
 o offset()
Offset within the document.

Methods

 o offset
 public abstract int offset()
Offset within the document. This may not be efficient for some implementations. A relative comparison should be used over absolute offsets where possible.

 o isSame
 public abstract boolean isSame(Position rhs)
Compare to another location to see if it represents the same place within the document.

 o isDifferent
 public abstract boolean isDifferent(Position rhs)
Compare to another location to see if it represents a different place within the document.

 o isAfter
 public abstract boolean isAfter(Position rhs)
Compare this location to the given location to see if this location occurs later in the document.

 o isSameOrAfter
 public abstract boolean isSameOrAfter(Position rhs)
Compare this location to the given location to see if this location either occurs later in the document or represents the same location.

 o isBefore
 public abstract boolean isBefore(Position rhs)
Compare this location to the given location to see if this location occurs sooner in the document.

 o isSameOrBefore
 public abstract boolean isSameOrBefore(Position rhs)
Compare this location to the given location to see if this location occurs either sooner in the document, or represents the same location.


All Packages  Class Hierarchy  This Package  Previous  Next  Index