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.
-
-
Constructor Summary
Constructors Constructor Description WMouseEvent()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WAbstractEventcreateFromJSEvent(eu.webtoolkit.jwt.JavaScriptEvent jsEvent)Internal method.MouseButtongetButton()Returns the button.CoordinatesgetDocument()Returns the mouse position relative to the document.CoordinatesgetDragDelta()Returns the distance over which the mouse has been dragged.java.util.EnumSet<KeyboardModifier>getModifiers()Returns keyboard modifiers.CoordinatesgetScreen()Returns the mouse position relative to the screen.intgetWheelDelta()Returns the scroll wheel delta.CoordinatesgetWidget()Returns the mouse position relative to the widget.CoordinatesgetWindow()Returns the mouse position relative to the window.
-
-
-
Method Detail
-
getButton
public MouseButton 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
public java.util.EnumSet<KeyboardModifier> getModifiers()
Returns keyboard modifiers.The result is a logical OR of
KeyboardModifierflags.
-
getDocument
public Coordinates getDocument()
Returns the mouse position relative to the document.
-
getWindow
public Coordinates getWindow()
Returns the mouse position relative to the window.This differs from documentX() only through scrolling through the document.
-
getScreen
public Coordinates getScreen()
Returns the mouse position relative to the screen.
-
getWidget
public Coordinates getWidget()
Returns the mouse position relative to the widget.
-
getDragDelta
public Coordinates 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
public WAbstractEvent createFromJSEvent(eu.webtoolkit.jwt.JavaScriptEvent jsEvent)
Description copied from interface:WAbstractEventInternal method.- Specified by:
createFromJSEventin interfaceWAbstractEvent
-
-