Package eu.webtoolkit.jwt
Class WMouseEvent
java.lang.Object
eu.webtoolkit.jwt.WMouseEvent
- All Implemented Interfaces:
WAbstractEvent
A class providing details for a mouse event.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateFromJSEvent
(eu.webtoolkit.jwt.JavaScriptEvent jsEvent) Internal method.Returns the button.Returns the mouse position relative to the document.Returns the distance over which the mouse has been dragged.Returns keyboard modifiers.Returns the mouse position relative to the screen.int
Returns the scroll wheel delta.Returns the mouse position relative to the widget.Returns the mouse position relative to the window.
-
Constructor Details
-
WMouseEvent
public WMouseEvent()Default constructor.
-
-
Method Details
-
getButton
Returns the button.If multiple buttons are currently pressed for a mouse moved or mouse dragged event, then the one with the smallest numerical value is returned.
-
getModifiers
Returns keyboard modifiers.The result is a logical OR of
KeyboardModifier
flags. -
getDocument
Returns the mouse position relative to the document. -
getWindow
Returns the mouse position relative to the window.This differs from documentX() only through scrolling through the document.
-
getScreen
Returns the mouse position relative to the screen. -
getWidget
Returns the mouse position relative to the widget. -
getDragDelta
Returns the distance over which the mouse has been dragged.This is only defined for a
WInteractWidget.mouseWentUp()
event. -
getWheelDelta
public int getWheelDelta()Returns the scroll wheel delta.This is 1 when wheel was scrolled up or -1 when wheel was scrolled down.
This is only defined for a
WInteractWidget.mouseWheel()
event. -
createFromJSEvent
Description copied from interface:WAbstractEvent
Internal method.- Specified by:
createFromJSEvent
in interfaceWAbstractEvent
-