Interface NativeMouseListener

All Superinterfaces:
EventListener
All Known Subinterfaces:
NativeMouseInputListener
All Known Implementing Classes:
NativeHookDemo, NativeMouseAdapter, NativeMouseInputAdapter, SwingMouseAdapter, SwingMouseWheelAdapter

public interface NativeMouseListener extends EventListener
The listener interface for receiving systemwide NativeMouseEvents. (To track native mouse moves, use the NativeMouseMotionListener.)

The class that is interested in processing a NativeMouseEvent implements this interface, and the object created with that class is registered with the GlobalScreen using the GlobalScreen.addNativeMouseListener(com.github.kwhat.jnativehook.mouse.NativeMouseListener) method. When the NativeMouseMotion event occurs, that object's appropriate method is invoked.

Since:
1.0
Version:
2.0
Author:
Alexander Barker (alex@1stleg.com)
See Also:
  • Method Details

    • nativeMouseClicked

      default void nativeMouseClicked(NativeMouseEvent nativeEvent)
      Invoked when a mouse button has been clicked (pressed and released) without being moved.
      Parameters:
      nativeEvent - the native mouse event.
    • nativeMousePressed

      default void nativeMousePressed(NativeMouseEvent nativeEvent)
      Invoked when a mouse button has been pressed
      Parameters:
      nativeEvent - the native mouse event.
    • nativeMouseReleased

      default void nativeMouseReleased(NativeMouseEvent nativeEvent)
      Invoked when a mouse button has been released
      Parameters:
      nativeEvent - the native mouse event.