Package eu.webtoolkit.jwt
Class WMouseEvent
java.lang.Object
eu.webtoolkit.jwt.WMouseEvent
- All Implemented Interfaces:
WAbstractEvent
public class WMouseEvent extends java.lang.Object implements WAbstractEvent
A class providing details for a mouse event.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WMouseEvent.Button
Enumeration for the mouse button. -
Constructor Summary
Constructors Constructor Description WMouseEvent()
Default constructor. -
Method Summary
Modifier and Type Method Description WAbstractEvent
createFromJSEvent(eu.webtoolkit.jwt.JavaScriptEvent jsEvent)
Internal method.WMouseEvent.Button
getButton()
Returns the button.Coordinates
getDocument()
Returns the mouse position relative to the document.Coordinates
getDragDelta()
Returns the distance over which the mouse has been dragged.java.util.EnumSet<KeyboardModifier>
getModifiers()
Returns keyboard modifiers.Coordinates
getScreen()
Returns the mouse position relative to the screen.int
getWheelDelta()
Returns the scroll wheel delta.Coordinates
getWidget()
Returns the mouse position relative to the widget.Coordinates
getWindow()
Returns the mouse position relative to the window.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-