org.gnu.gtk.event
Class MouseMotionEvent
- Serializable
public class MouseMotionEvent
This event object is used to identify how mouseMotion has changed. Note:
normally motion events are sent just when some mouse button is pressed. If
you want events also when no button is pressed, you should retrieve the
widget's GdkWindow using Widget.getWindow() and do:
window.setEvents(window.getEvents().or(EventMask.POINTER_MOTION_MASK));
Device | getDevice() - Returns the device where the event originated.
|
boolean | getSendEvent() - Check if the event was sent explicitly (eg using XSendEvent).
|
ModifierType | getState() - Returns a bit-mask representing the state of the modifier keys (e.g.
|
int | getTimeMillis() - Returns the time of the event in milliseconds.
|
Window | getWindow() - The window which received the event.
|
double | getX() - Returns the x coordinate of the pointer relative to the window.
|
double | getXRoot() - Returns the x coordinate of the pointer relative to the root of the
screen.
|
double | getY() - Returns the y coordinate of the pointer relative to the window.
|
double | getYRoot() - Returns the y coordinate of the pointer relative to the root of the
screen.
|
boolean | isHint() - Check if this event is just a hint.
|
boolean | isOfType(MouseMotionEvent.Type test) - Test to compare events.
|
void | refireIfHint() - In the case that this event is a hint, this method triggers the next
event to be fired.
|
MouseMotionEvent
public MouseMotionEvent(Object source,
EventMotion gdkEvent)
getDevice
public Device getDevice()
Returns the device where the event originated.
- the device where the event originated.
getSendEvent
public boolean getSendEvent()
Check if the event was sent explicitly (eg using XSendEvent).
- true if the event was sent explicitly (e.g. using XSendEvent),
false otherwise.
getState
public ModifierType getState()
Returns a bit-mask representing the state of the modifier keys (e.g.
Control, Shift and Alt) and the pointer buttons.
- a bit-mask representing the state of the modifier keys and the
pointer buttons.
getTimeMillis
public int getTimeMillis()
Returns the time of the event in milliseconds.
- the time of the event in milliseconds.
getWindow
public Window getWindow()
The window which received the event.
- the window which received the event.
getX
public double getX()
Returns the x coordinate of the pointer relative to the window.
- the x coordinate of the pointer relative to the window.
getXRoot
public double getXRoot()
Returns the x coordinate of the pointer relative to the root of the
screen.
- the x coordinate of the pointer relative to the root of the
screen.
getY
public double getY()
Returns the y coordinate of the pointer relative to the window.
- the y coordinate of the pointer relative to the window.
getYRoot
public double getYRoot()
Returns the y coordinate of the pointer relative to the root of the
screen.
- the y coordinate of the pointer relative to the root of the
screen.
isHint
public boolean isHint()
Check if this event is just a hint.
- true if this event is just a hint, false otherwise.
refireIfHint
public void refireIfHint()
In the case that this event is a hint, this method triggers the next
event to be fired. If this method isn't called for cases where isHint
returns true, no further MouseMotionEvents will be fired