com.bric.awt
Class ClickEventEnabler
java.lang.Object
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.
|
Method Summary |
static boolean |
install()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
ClickEventEnabler
public ClickEventEnabler()
install
public static boolean install()