Java Swing Mouse isLeftButtonAndNoModifiers(final MouseEvent event)

Here you can find the source of isLeftButtonAndNoModifiers(final MouseEvent event)

Description

is Left Button And No Modifiers

License

Apache License

Declaration

static boolean isLeftButtonAndNoModifiers(final MouseEvent event) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.awt.event.InputEvent;
import java.awt.event.MouseEvent;

import javax.swing.SwingUtilities;

public class Main {
    static boolean isLeftButtonAndNoModifiers(final MouseEvent event) {
        final boolean leftMouseButton = SwingUtilities.isLeftMouseButton(event);
        if (leftMouseButton) {
            final int modifiers = event.getModifiers();
            if (InputEvent.BUTTON1_MASK == modifiers) {
                return true;
            }//from   w w w .  j  ava2s.c o m
        }
        return false;
    }
}

Related

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