Class StartOffStart

    • Constructor Summary

      Constructors 
      Constructor Description
      StartOffStart​(int itemIndex, double offsetFromStart)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void accept​(TargetPositionVisitor visitor)
      Visitor Pattern: prevents type-checking the implementation
      TargetPosition clamp​(int size)
      Insures this position's item index is between 0 and size
      (package private) static int clamp​(int idx, int size)  
      TargetPosition scrollBy​(double delta)  
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • itemIndex

        final int itemIndex
      • offsetFromStart

        final double offsetFromStart
    • Constructor Detail

      • StartOffStart

        StartOffStart​(int itemIndex,
                      double offsetFromStart)
    • Method Detail

      • transformByChange

        public TargetPosition transformByChange​(int pos,
                                                int removedSize,
                                                int addedSize)
        Description copied from interface: TargetPosition
        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.
        Specified by:
        transformByChange in interface TargetPosition
        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
      • clamp

        static int clamp​(int idx,
                         int size)