Class MouseMotionEvent

java.lang.Object
edu.macalester.graphics.events.AbstractEvent
edu.macalester.graphics.events.MouseMotionEvent

public final class MouseMotionEvent extends AbstractEvent
Carries information about the mouse moving from one location to another.
See Also:
  • Constructor Details

    • MouseMotionEvent

      public MouseMotionEvent(MouseEvent sourceEvent, Point previousPosition)
      For internal use. Translates an underlying AWT event to a kilt-graphics event.
  • Method Details

    • getPosition

      public Point getPosition()
      Returns mouse pointer's current location at the time of the event, in CanvasWindow coordinates.
    • getPreviousPosition

      public Point getPreviousPosition()
      Returns mouse pointer's location at the time of the previously reported event, in CanvasWindow coordinates.
    • getDelta

      public Point getDelta()
      Returns the difference between the mouse's previous and current positions.
    • toString

      public String toString()
      Overrides:
      toString in class Object