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
ConstructorsConstructorDescriptionFieldRange(FieldLocation start, FieldLocation end) FieldRange(FieldRange range) FieldRange(org.jdom.Element element) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanMerge(FieldRange newRange) intbooleancontains(FieldLocation loc) checks if the given location is contained in the range.booleancontainsEntirely(int index) booleancontainsEntirely(BigInteger index) booleanorg.jdom.ElementgetEnd()getStart()inthashCode()intersect(FieldRange range) booleanintersects(FieldRange range) booleanisEmpty()voidmerge(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:
compareToin interfaceComparable<FieldRange>
-
canMerge
-
merge
-
isEmpty
public boolean isEmpty() -
intersects
-
intersect
-
subtract
-
containsEntirely
public boolean containsEntirely(int index) -
containsEntirely
-