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
startIndexandendindex) with sub-positions within those rows (defined bystartFieldandendField). 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 booleancanMerge(FieldRange newRange)intcompareTo(FieldRange o)booleancontains(FieldLocation loc)checks if the given location is contained in the range.booleancontainsEntirely(int index)booleancontainsEntirely(java.math.BigInteger index)booleanequals(java.lang.Object obj)org.jdom.ElementgetElement()FieldLocationgetEnd()FieldLocationgetStart()inthashCode()FieldRangeintersect(FieldRange range)booleanintersects(FieldRange range)booleanisEmpty()voidmerge(FieldRange newRange)FieldRangesubtract(FieldRange deleteRange)java.lang.StringtoString()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:
 toStringin classjava.lang.Object
 
- 
contains
public boolean contains(FieldLocation loc)
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
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
compareTo
public int compareTo(FieldRange o)
- Specified by:
 compareToin 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)
 
 - 
 
 -