Class MouseDblClickedEvent


public class MouseDblClickedEvent extends MouseEvent
Represents a mouse double-click event that occurs when a user double-clicks on an element in the client interface.

This event is fired when the user performs two rapid consecutive clicks on an element. It extends MouseEvent to inherit coordinate tracking capabilities and is dispatched to registered MouseListener instances for processing.

Features:

  • Captures double-click interactions with client coordinates
  • Inherits X and Y coordinate tracking from MouseEvent
  • Integrates with the mouse event listener pattern

Usage:


 // Create a double-click event at coordinates (150, 250)
 MouseDblClickedEvent event = new MouseDblClickedEvent(150, 250);

 // Access inherited coordinate getters
 int x = event.getClientX(); // Returns 150
 int y = event.getClientY(); // Returns 250

 // Dispatch to a listener
 event.dispatchTo(myMouseListener);
 
Since:
2016
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • MouseDblClickedEvent

      public MouseDblClickedEvent(int clientX, int clientY)
      Constructs a new MouseDblClickedEvent with the specified client coordinates.
      Parameters:
      clientX - the X coordinate of the mouse pointer relative to the client viewport
      clientY - the Y coordinate of the mouse pointer relative to the client viewport
  • Method Details

    • dispatchTo

      public void dispatchTo(MouseClickListener listener)
      Dispatches this event to the specified listener for processing.

      This method invokes the listener's onEvent method with this event instance, allowing the listener to handle the mouse double-click event.

      Specified by:
      dispatchTo in class Event<MouseClickListener>
      Parameters:
      listener - the listener to which this event should be dispatched