All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.text.Range

java.lang.Object
   |
   +----com.sun.java.swing.text.Range

public class Range
extends Object
Represents a range of content within a document, between and including two positions.


Constructor Index

 o Range(Position, Position)
Construct a range.

Method Index

 o containsPosition(Position)
 o containsRange(Range)
 o coversPosition(Position)
 o first()
begining position of the range, guaranteed to be before or the same as the end of the range.
 o getIntersection(Range)
 o intersects(Range)
 o isAfter(Range)
 o isBefore(Range)
 o isDifferent(Range)
 o isDisjoint(Range)
 o isEmpty()
Determines if the range is empty (does not represent content).
 o isSame(Range)
 o last()
end position of the range, guaranteed to be after or the same as the begin of the range.
 o length()
number of items spaned by the range.
 o toString()

Constructors

 o Range
 public Range(Position p0,
              Position p1)
Construct a range. There are no assumptions on the relationship of the two positions.

Methods

 o isSame
 public boolean isSame(Range rng)
 o isDifferent
 public boolean isDifferent(Range rng)
 o isBefore
 public boolean isBefore(Range rng)
 o isAfter
 public boolean isAfter(Range rng)
 o first
 public Position first()
begining position of the range, guaranteed to be before or the same as the end of the range.

 o last
 public Position last()
end position of the range, guaranteed to be after or the same as the begin of the range.

 o isEmpty
 public boolean isEmpty()
Determines if the range is empty (does not represent content). An empty range is effectively a position.

 o containsRange
 public boolean containsRange(Range rng)
 o containsPosition
 public boolean containsPosition(Position pos)
 o coversPosition
 public boolean coversPosition(Position p)
 o isDisjoint
 public boolean isDisjoint(Range rng)
 o intersects
 public boolean intersects(Range rng)
 o getIntersection
 public Range getIntersection(Range rng)
 o length
 public int length()
number of items spaned by the range.

 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index