public class HoverChecker
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
bottom |
private long |
hoverStart |
private int |
left |
private int |
right |
private int |
threshold |
private int |
top |
private Widget |
widget |
Constructor and Description |
---|
HoverChecker(int top,
int bottom,
int left,
int right,
int threshold) |
HoverChecker(Widget widget,
int threshold) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkHover(int mouseX,
int mouseY)
Checks if the mouse is in the hover region.
|
boolean |
checkHover(int mouseX,
int mouseY,
boolean canHover)
Checks if the mouse is in the hover region.
|
void |
resetHoverTimer()
Manually resets the hover timer.
|
void |
updateBounds(int top,
int bottom,
int left,
int right)
Call this method if the intended region has changed such as if the region must follow a scrolling list.
|
private int top
private int bottom
private int left
private int right
private int threshold
private Widget widget
private long hoverStart
public HoverChecker(int top, int bottom, int left, int right, int threshold)
public HoverChecker(Widget widget, int threshold)
public void updateBounds(int top, int bottom, int left, int right)
public boolean checkHover(int mouseX, int mouseY)
public boolean checkHover(int mouseX, int mouseY, boolean canHover)
public void resetHoverTimer()