Skip to main content


com.bric.awt
Class ClickEventEnabler

java.lang.Object
  
extended by com.bric.awt.ClickEventEnabler
public class ClickEventEnabler
extends java.lang.Object

This class lets mouseClicked events be triggered even if the mouse moves a few pixels.

By default Java only triggers mouseClicked messages when the mouse doesn't move between mousePressed and mouseReleased. Trackpads and touchpads, however, are less precise: as they grow in numbers, we need to allow a few extra pixels to trigger a mouseClicked event.


Field Summary
static double CLICK_EVENT_TOLERANCE
          The distance between the point where the mouse is pressed and where it is released that is allowed to constitute a "click".
static boolean printSecurityExceptionOnlyOnce
           
 
Constructor Summary
ClickEventEnabler()
           
 
Method Summary
static boolean install()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLICK_EVENT_TOLERANCE

public static double CLICK_EVENT_TOLERANCE
The distance between the point where the mouse is pressed and where it is released that is allowed to constitute a "click".

Java by default effectively gives you a 0-pixel tolerance. The field is initialized to 10, but you're welcome to change it as needed.


printSecurityExceptionOnlyOnce

public static boolean printSecurityExceptionOnlyOnce
Constructor Detail

ClickEventEnabler

public ClickEventEnabler()
Method Detail

install

public static boolean install()


 
 
Close
loading
Please Confirm
Close