Class AbstractMouseEvent

    • Constructor Detail

      • AbstractMouseEvent

        public AbstractMouseEvent​(java.lang.Object source,
                                  java.lang.Object target,
                                  Rectangle targetBounds,
                                  Rectangle viewportBounds,
                                  Point mousePosition,
                                  Key... keys)
        Source and target constructor.
        Parameters:
        source - The object on which the event initially occurred.
        target - The target of the event.
        targetBounds - The absolute bounds of the event target.
        viewportBounds - The absolute bounds of the viewport.
        mousePosition - The position of the mouse relative to the viewport.
        keys - The keys that were pressed when this event was generated.
        Throws:
        java.lang.NullPointerException - if the given source, target, target bounds, viewport bounds, mouse position, and/or keys is null.
    • Method Detail

      • getTarget

        public java.lang.Object getTarget()
        Specified by:
        getTarget in interface com.globalmentor.event.TargetedEvent
      • getMousePosition

        public Point getMousePosition()
        Specified by:
        getMousePosition in interface MouseEvent
        Returns:
        The position of the mouse relative to the viewport.