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
| Name | Type | Optional | Default | Descripton |
sType | String | The type (name) of the event. | ||
oEvent | Object | This is the internal browser event object. |
Properties
| Name | Type | get | set | Descripton |
altKey | Boolean | ![]() | Whether the alt key is pressed. | |
button | Number | ![]() | Returns a number representing the mouse button that is pressed. | |
clientX | Number | ![]() | The position of the mouse pointer relative to the browser viewport. | |
clientY | Number | ![]() | The position of the mouse pointer relative to the browser viewport. | |
ctrlKey | Boolean | ![]() | Whether the ctrl key is pressed. | |
metaKey | Boolean | ![]() | Whether the meta key is pressed. The meta key is platform specific. On Mac it's the command key. | |
offsetX | Number | ![]() | The position of the mouse pointer relative to the event target. | |
offsetY | Number | ![]() | The position of the mouse pointer relative to the event target. | |
relatedTarget | | ![]() | The 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. | |
screenX | Number | ![]() | The position of the mouse pointer relative to the screen. | |
screenY | Number | ![]() | The position of the mouse pointer relative to the screen. | |
shiftKey | Boolean | ![]() | Whether the shift key is pressed. | |
wheelDelta | Number | ![]() | The 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.
