Class FieldRange
java.lang.Object
docking.widgets.fieldpanel.support.FieldRange
- All Implemented Interfaces:
Comparable<FieldRange>
A range consists of a start position within a start row to an end position within an end row
(exclusive).
Conceptually, this class can be thought of as a range of rows (defined by start and end indexes) with sub-positions within those rows. As an example, consider a text selection that begins on some word in a row and ends on another word in a different row.
- See Also:
-
Constructor Summary
ConstructorDescriptionFieldRange
(FieldLocation start, FieldLocation end) FieldRange
(FieldRange range) FieldRange
(org.jdom.Element element) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canMerge
(FieldRange newRange) int
boolean
contains
(FieldLocation loc) checks if the given location is contained in the range.boolean
containsEntirely
(int index) boolean
containsEntirely
(BigInteger index) boolean
org.jdom.Element
getEnd()
getStart()
int
hashCode()
intersect
(FieldRange range) boolean
intersects
(FieldRange range) boolean
isEmpty()
void
merge
(FieldRange newRange) subtract
(FieldRange deleteRange) toString()
-
Constructor Details
-
FieldRange
-
FieldRange
-
FieldRange
public FieldRange(org.jdom.Element element)
-
-
Method Details
-
getElement
public org.jdom.Element getElement() -
getStart
-
getEnd
-
toString
-
contains
checks if the given location is contained in the range.- Parameters:
loc
- the field location.- Returns:
- true if the field range contains the specified location.
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<FieldRange>
-
canMerge
-
merge
-
isEmpty
public boolean isEmpty() -
intersects
-
intersect
-
subtract
-
containsEntirely
public boolean containsEntirely(int index) -
containsEntirely
-