public class ClickEventEnabler extends Object
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.
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
ClickEventEnabler()
|
public static double CLICK_EVENT_TOLERANCE
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.
public static boolean printSecurityExceptionOnlyOnce