Java Swing Mouse isDoubleClick(MouseEvent evt)

Here you can find the source of isDoubleClick(MouseEvent evt)

Description

Checks if MouseEvent is a double-click.

License

Open Source License

Parameter

Parameter Description
evt the <code>MouseEvent</code>

Return

true if event represents a double-click, false if not

Declaration

public static boolean isDoubleClick(MouseEvent evt) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.event.MouseEvent;

import javax.swing.SwingUtilities;

public class Main {
    /**//from ww  w  .  ja  v  a 2 s.  c om
     * Checks if <code>MouseEvent</code> is a double-click.
     * @param evt the <code>MouseEvent</code>
     * @return true if event represents a double-click, false if not
     */
    public static boolean isDoubleClick(MouseEvent evt) {
        return (SwingUtilities.isLeftMouseButton(evt) && evt.getClickCount() == 2);
    }
}

Related

  1. disableDoubleMouseClick(Component c)
  2. forwardMouseWheelEvent(JScrollPane target, MouseWheelEvent evt)
  3. getDeepestComponentAt(final MouseEvent aEvent)
  4. inInsets(MouseEvent me)
  5. installMouseListener(Component cmp, MouseListener mouseListener, boolean removePrevious)
  6. isLeftButtonAndNoModifiers(final MouseEvent event)
  7. isLeftMouseButton(MouseEvent anEvent)
  8. isLeftMouseButton(MouseEvent e)
  9. isPopupTrigger(final MouseEvent e)