Interface TargetPosition

All Known Implementing Classes:
EndOffEnd, MinDistanceTo, StartOffStart

interface TargetPosition
Defines where the Navigator should place the anchor cell's node in the viewport. Its three implementations are StartOffStart, EndOffEnd, and MinDistanceTo.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TargetPosition
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Visitor Pattern: prevents type-checking the implementation
    clamp(int size)
    Insures this position's item index is between 0 and size
    scrollBy(double delta)
     
    transformByChange(int pos, int removedSize, int addedSize)
    When the list of items, those displayed in the viewport, and those that are not, are modified, transforms this change to account for those modifications.
  • Field Details

  • Method Details

    • transformByChange

      TargetPosition transformByChange(int pos, int removedSize, int addedSize)
      When the list of items, those displayed in the viewport, and those that are not, are modified, transforms this change to account for those modifications.
      Parameters:
      pos - the cell index where the change begins
      removedSize - the amount of cells that were removed, starting from pos
      addedSize - the amount of cells that were added, starting from pos
    • scrollBy

      TargetPosition scrollBy(double delta)
    • accept

      void accept(TargetPositionVisitor visitor)
      Visitor Pattern: prevents type-checking the implementation
    • clamp

      TargetPosition clamp(int size)
      Insures this position's item index is between 0 and size