BiMouseEvent

This class describes event objects used in mouse events.

All mouse events bubble by default. This means that once all the event listeners have been notified the event propagates to the parent BiComponent. To prevent the event to bubble to the parent call stopPropagation() on the event object.

The currently supported events by BiComponent are:

mousedown
mouseup
click
dblclick
contextmenu - this one is a bit tricky since it might also be dispatched when the user presses the context menu key on their keyboard
mouseover
mouseout
mousemove
mousewheel

When a user double clicks on a component the order of the mouse events is the following:
mousedown
mouseup
click
mousedown
mouseup
click
dblclick

This object should not be created by the user. It is created as needed by the event system.

This class extends BiEvent and therefore all methods and fields available for BiEvent are also available for BiMouseEvent .

Constructor

new BiMouseEvent ( sType,oEvent )

Parameters

NameTypeOptionalDefaultDescripton
sTypeStringThe type (name) of the event.
oEventObjectThis is the internal browser event object.

Properties

NameTypegetsetDescripton
altKeyBooleancheckedWhether the alt key is pressed.
buttonNumbercheckedReturns a number representing the mouse button that is pressed.
clientXNumbercheckedThe position of the mouse pointer relative to the browser viewport.
clientYNumbercheckedThe position of the mouse pointer relative to the browser viewport.
ctrlKeyBooleancheckedWhether the ctrl key is pressed.
metaKeyBooleancheckedWhether the meta key is pressed. The meta key is platform specific. On Mac it's the command key.
offsetXNumbercheckedThe position of the mouse pointer relative to the event target.
offsetYNumbercheckedThe position of the mouse pointer relative to the event target.
relatedTargetBiEventTargetcheckedThe related target is used with mouseover and mouseout events. In a mouseover event the related target is the component that the mouse pointer left and for a mouseout it is the component that the mouse entered.
screenXNumbercheckedThe position of the mouse pointer relative to the screen.
screenYNumbercheckedThe position of the mouse pointer relative to the screen.
shiftKeyBooleancheckedWhether the shift key is pressed.
wheelDeltaNumbercheckedThe amount that the user scrolled the mouse wheel.

Methods

None.

Events

None.

Static Methods

None.

Static Fields

None.

Remarks

This object should not be created by the user. It is created as needed by the event system.