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.
-
Range(Position, Position)
- Construct a range.
-
containsPosition(Position)
-
-
containsRange(Range)
-
-
coversPosition(Position)
-
-
first()
- begining position of the range, guaranteed to be before or the
same as the end of the range.
-
getIntersection(Range)
-
-
intersects(Range)
-
-
isAfter(Range)
-
-
isBefore(Range)
-
-
isDifferent(Range)
-
-
isDisjoint(Range)
-
-
isEmpty()
- Determines if the range is empty (does not represent content).
-
isSame(Range)
-
-
last()
- end position of the range, guaranteed to be after or the same
as the begin of the range.
-
length()
- number of items spaned by the range.
-
toString()
-
Range
public Range(Position p0,
Position p1)
- Construct a range. There are no assumptions on the relationship
of the two positions.
isSame
public boolean isSame(Range rng)
isDifferent
public boolean isDifferent(Range rng)
isBefore
public boolean isBefore(Range rng)
isAfter
public boolean isAfter(Range rng)
first
public Position first()
- begining position of the range, guaranteed to be before or the
same as the end of the range.
last
public Position last()
- end position of the range, guaranteed to be after or the same
as the begin of the range.
isEmpty
public boolean isEmpty()
- Determines if the range is empty (does not represent content).
An empty range is effectively a position.
containsRange
public boolean containsRange(Range rng)
containsPosition
public boolean containsPosition(Position pos)
coversPosition
public boolean coversPosition(Position p)
isDisjoint
public boolean isDisjoint(Range rng)
intersects
public boolean intersects(Range rng)
getIntersection
public Range getIntersection(Range rng)
length
public int length()
- number of items spaned by the range.
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index