Class PointerSpeedImpl

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public Point oldPosition
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Point getOldPosition() Gets the pointer's old position.
      Point getCurrentPosition() Gets the pointer's current position.
      Point getVariation() Gets the vector [current position - old position].
      void setCurrentPosition(Point point) Sets the pointer's current position and, consequently, updates the old one.
      • Methods inherited from class java.lang.Object

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

      • PointerSpeedImpl

        PointerSpeedImpl()
    • Method Detail

      • getOldPosition

         Point getOldPosition()

        Gets the pointer's old position.

        Returns:

        a Point instance representing the pointer's old position

      • getCurrentPosition

         Point getCurrentPosition()

        Gets the pointer's current position.

        Returns:

        a Point instance representing the pointer's current position

      • getVariation

         Point getVariation()

        Gets the vector [current position - old position].

        Returns:

        a Point instance whose coordinates are [cP.x - oP.x; cP.y - cP.y]

      • setCurrentPosition

         void setCurrentPosition(Point point)

        Sets the pointer's current position and, consequently, updates the old one.

        Parameters:
        point - is the Point instance representing the pointer's current position