Maven module :un.engine : engine-ui :
Class : un.engine.ui.ievent.MouseEvent
Extends/Implements : un.api.event.DefaultEvent
Subclasses : -

A mouse event.
author  Johann Sorel


Variables : BUTTON_1, BUTTON_2, BUTTON_3, TYPE_PRESS, TYPE_RELEASE, TYPE_TYPED, TYPE_WHEEL, TYPE_MOVE, TYPE_ENTER, TYPE_EXIT
Functions : MouseEvent, getType, getButton, getNbClick, getMousePosition, getMouseScreenPosition, getWheelOffset, isDragging, resource, toChars


public int BUTTON_1

public int BUTTON_2

public int BUTTON_3

public int TYPE_PRESS

public int TYPE_RELEASE

public int TYPE_TYPED

public int TYPE_WHEEL

public int TYPE_MOVE

public int TYPE_ENTER

public int TYPE_EXIT



Create a new mouse event.
param  source source of the event
param  type one of MouseEvent.TYPE_X
param  button clicked button, -1 if none
param  nbClick number of mouse button clicks
param  mousePosition mouse position
param  screenPosition mouse screen position
param  wheelOffset wheel movement, 0 for none
param  dragging dragging must be true when the current event is a mouse move while a button is pressed
public void MouseEvent (EventSource source, int type, int button, int nbClick, Tuple mousePosition, Tuple screenPosition, double wheelOffset, boolean dragging)


Mouse event type.
return  int, one of MouseEvent.TYPE_X
public int getType ()


Get the clicked button,
return  int, -1 if not a click event.
public int getButton ()


Get mouse button number of clicks.
return  int, -1 if not a click event.
public int getNbClick ()


Get the mouse position at this event.
return  Tuple, never null
public Tuple getMousePosition ()


Get the mouse screen position at this event.
return  Tuple, never null
public Tuple getMouseScreenPosition ()


Get the number of wheel movements.
return  double, wheel rotation
public double getWheelOffset ()


Indicate if the current operation is a mouse drag.
return  true if drag
public boolean isDragging ()

public MouseEvent resource (EventSource source)

public Chars toChars ()