Class FieldRange
- java.lang.Object
-
- docking.widgets.fieldpanel.support.FieldRange
-
- All Implemented Interfaces:
java.lang.Comparable<FieldRange>
public class FieldRange extends java.lang.Object implements java.lang.Comparable<FieldRange>
Class to a range consisting 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 startIndex and endindex) with sub-positions within those rows (defined by startField and endField). As an example, consider a text select that begins on some word in a row and ends on another word in a different row.
-
-
Constructor Summary
Constructors Constructor Description FieldRange(FieldLocation start, FieldLocation end)
FieldRange(FieldRange range)
FieldRange(org.jdom.Element element)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canMerge(FieldRange newRange)
int
compareTo(FieldRange o)
boolean
contains(FieldLocation loc)
checks if the given location is contained in the range.boolean
containsEntirely(int index)
boolean
containsEntirely(java.math.BigInteger index)
boolean
equals(java.lang.Object obj)
org.jdom.Element
getElement()
FieldLocation
getEnd()
FieldLocation
getStart()
int
hashCode()
FieldRange
intersect(FieldRange range)
boolean
intersects(FieldRange range)
boolean
isEmpty()
void
merge(FieldRange newRange)
FieldRange
subtract(FieldRange deleteRange)
java.lang.String
toString()
Return string representation for debugging purposes.
-
-
-
Constructor Detail
-
FieldRange
public FieldRange(FieldLocation start, FieldLocation end)
-
FieldRange
public FieldRange(FieldRange range)
-
FieldRange
public FieldRange(org.jdom.Element element)
-
-
Method Detail
-
getElement
public org.jdom.Element getElement()
-
getStart
public FieldLocation getStart()
-
getEnd
public FieldLocation getEnd()
-
toString
public java.lang.String toString()
Return string representation for debugging purposes.- Overrides:
toString
in classjava.lang.Object
-
contains
public boolean contains(FieldLocation loc)
checks if the given location is contained in the range.- Parameters:
row
-column
-- Returns:
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
compareTo
public int compareTo(FieldRange o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<FieldRange>
-
canMerge
public boolean canMerge(FieldRange newRange)
-
merge
public void merge(FieldRange newRange)
-
isEmpty
public boolean isEmpty()
-
intersects
public boolean intersects(FieldRange range)
-
intersect
public FieldRange intersect(FieldRange range)
-
subtract
public FieldRange subtract(FieldRange deleteRange)
-
containsEntirely
public boolean containsEntirely(int index)
-
containsEntirely
public boolean containsEntirely(java.math.BigInteger index)
-
-