public static class IlvTextSelection.Range extends Object
IlvTextInterface. The range might be empty
or collapsed, both have different means according to the using context.| Modifier and Type | Field and Description |
|---|---|
int |
from
The start index of the interval, must be less than or equal to
the
to parameter. |
int |
to
The end index of the interval, must be greater than or equal to
the
from parameter. |
| Constructor and Description |
|---|
Range()
Create an empty range.
|
Range(int index)
Creates a collapsed range.
|
Range(int from,
int to)
Create a range for the specified interval.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isCollapsed()
Tells if the range is collapsed, that means the
from and the
to index are the same. |
boolean |
isEmpty()
Tells if the range is empty, that means the interval is not valid.
|
void |
setRange(IlvTextSelection.Range range)
Copies from another
Range object. |
void |
setRange(int from,
int to)
Specifies the interval of the range.
|
String |
toString()
Converts the range to a string, examples: [1:20], [4:4].
|
public int from
to parameter.public int to
from parameter.public Range()
public Range(int from,
int to)
from - The start index of the interval, must be less than or equal to
the to parameter.to - The end index of the interval, must be greater than or equal to
the from parameter.public Range(int index)
index - The start and the end index.public void setRange(int from,
int to)
from - The start index of the interval, should be less than or equal to
the to parameter.to - The end index of the interval, should be grater than or equal to
the from parameter.public void setRange(IlvTextSelection.Range range)
Range object.range - The source Range object.public boolean isEmpty()
public boolean isCollapsed()
from and the
to index are the same.© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.