Class FieldRange

java.lang.Object
docking.widgets.fieldpanel.support.FieldRange
All Implemented Interfaces:
Comparable<FieldRange>

public class FieldRange extends Object implements 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 Details

  • Method Details

    • getElement

      public org.jdom.Element getElement()
    • getStart

      public FieldLocation getStart()
    • getEnd

      public FieldLocation getEnd()
    • toString

      public String toString()
      Overrides:
      toString in class 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(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(FieldRange o)
      Specified by:
      compareTo in interface 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(BigInteger index)