public class MouseHoverAction extends MouseWidgetAction
| Modifier and Type | Field and Description |
|---|---|
protected int |
effectiveWidgetId
the id of the sub-widget which is the mouse hover target
|
private static CentralLogger |
LOG
Logger
|
protected boolean |
registered
flag indicating that handler is registered
|
protected int |
windowId
the id of thw widget's window
|
gd, mouseActions, widget| Constructor and Description |
|---|
MouseHoverAction(Widget<?> widget)
Constructor.
|
MouseHoverAction(Widget<?> widget,
int effectiveWidgetId)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deregister()
De-register the handler
|
GuiDriver |
gd()
Get the GUI driver
|
void |
mouseEntered(java.awt.event.MouseEvent e)
On mouse entered, set the mouse cursor to the effective custom cursor.
|
void |
mouseExited(java.awt.event.MouseEvent e)
On mouse exit, set the mouse cursor to the parent widget cursor.
|
protected MousePtrWrapper |
parentCursor()
Get the custom cursor of the parent widget
|
void |
register()
Register the handler
|
protected void |
setCursor(MousePtrWrapper ptr)
Set the custom mouse pointer
|
java.lang.String |
toString()
Get the String representation of the handler
|
void |
updateCursor()
Update the custom cursor shape
|
int |
wid()
Get the id of the sub-widget which is the mouse hover target
|
Widget<?> |
widget()
Get the widget for which the action is defined
|
int |
windowId()
Get the id of the enclosing window
|
getEventId, hasEventprivate static final CentralLogger LOG
protected final int effectiveWidgetId
protected boolean registered
protected volatile int windowId
public MouseHoverAction(Widget<?> widget, int effectiveWidgetId)
widget - The widget which supports custom mouse cursor.effectiveWidgetId - The id of the sub-widget which is the mouse hover targetpublic MouseHoverAction(Widget<?> widget)
widget - The widget which supports custom mouse cursor.public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenermouseEntered in class java.awt.event.MouseAdaptere - The mouse event.public void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenermouseExited in class java.awt.event.MouseAdaptere - The mouse event.public void updateCursor()
protected MousePtrWrapper parentCursor()
public GuiDriver gd()
public int wid()
public Widget<?> widget()
public int windowId()
public void register()
public void deregister()
protected void setCursor(MousePtrWrapper ptr)
ptr - the custom mouse pointerpublic java.lang.String toString()
toString in class java.lang.Object