Constants

CAPTURING_PHASE

CAPTURING_PHASE

The CAPTURING_PHASE constant, defines the integer value for capturing phase event status.

AT_TARGET

AT_TARGET

The AT_TARGET constant, defines the integer value for at-target phase event status.

BUBBLING_PHASE

BUBBLING_PHASE

The BUBBLING_PHASE constant, defines the integer value for bubbling phase event status.

Properties

$altKey

$altKey : boolean

The altKey property, checks if the "ALT" key was pressed when input event is was triggered.

Type

boolean

$component

$component : string

The component property, stores the component id involved in this input event.

Type

string

$ctrlKey

$ctrlKey : boolean

The ctrlKey property, checks if the "CTRL" key was pressed when input event is was triggered.

Type

boolean

$metaKey

$metaKey : boolean

The metaKey property, checks if the "META" key was pressed when input event is was triggered.

Type

boolean

$shiftKey

$shiftKey : boolean

The shiftKey property, checks if the "SHIFT" key was pressed when input event is was triggered.

Type

boolean

$bubbles

$bubbles : boolean

The bubbles property, specifies if a specific event can bubble or not.

Type

boolean

$cancelable

$cancelable : boolean

The cancelable property, specifies if a if a specific event is cancelable.

Type

boolean

$defaultPrevented

$defaultPrevented : boolean

The defaultPrevented property, checks if default is prevented.

Type

boolean

$phase

$phase : integer

The phase property, defines the event phase.

Type

integer

$source

$source : string

The source property, stores the id of element that triggers the event.

Type

string

$target

$target : string

The target property, stores the id of element whose event listener triggers this event.

Type

string

$timeStamp

$timeStamp : integer

The timeStamp property, specifies the number of milliseconds since midnight of January 1, 1970.

Type

integer

$trusted

$trusted : boolean

The trusted property, checks if the event is trusted or not.

Type

boolean

$type

$type : string

The target property, defines the type of event that was triggered.

Type

string

$button

$button : integer

The button property, stores a number that indicates which mouse button was pressed when a mouse event was triggered.

Type

integer

$clickCount

$clickCount : integer

The clickCount property, stores a number that indicates how many times the mouse was clicked in the same area.

Type

integer

$x

$x : integer

The x property, specifies the horizontal coordinate of mouse pointer relative to the source component.

Type

integer

$xOnPage

$xOnPage : integer

The xOnPage property, specifies the horizontal coordinate of mouse pointer according to the document.

Type

integer

$xOnScreen

$xOnScreen : integer

The xOnScreen property, specifies the horizontal coordinate of mouse pointer according to the screen.

Type

integer

$y

$y : integer

The y property, specifies the vertical coordinate of mouse pointer relative to the source component.

Type

integer

$yOnPage

$yOnPage : integer

The yOnPage property, specifies the vertical coordinate of mouse pointer according to the document.

Type

integer

$yOnScreen

$yOnScreen : integer

The xOnScreen property, specifies the horizontal coordinate of mouse pointer according to the screen.

Type

integer

Methods

__construct()

__construct(\StdClass  $event) : \CJAX\Event\MouseEvent

The constructor for MouseEvent class, it initializes basic mouse event properties.

Child classes of InputEvent need to call this parent constructor to ensure complete initialization of event object.

Parameters

\StdClass $event

Returns

\CJAX\Event\MouseEvent

isAltDown()

isAltDown() : boolean

The isAltDown method, returns whether or not the Alt modifier is down on this event.

Returns

boolean

getComponent()

getComponent() 

The getComponent method, obtains the component id associated with this input event.

isControlDown()

isControlDown() : boolean

The isControlDown method, returns whether or not the Control modifier is down on this event.

Returns

boolean

isMetaDown()

isMetaDown() : boolean

The isMetaDown method, returns whether or not the Meta modifier is down on this event.

Returns

boolean

isShiftDown()

isShiftDown() : boolean

The isShiftDown method, returns whether or not the Shift modifier is down on this event.

Returns

boolean

getLocation()

getLocation() : array

The getLocation method, returns the mouse cursor position of the event relative to source component.

This method fetches an array/tuple of x and y coordinates.

Returns

array

canBubble()

canBubble() : boolean

The canBubble method, find out if a specific event can bubble or not.

Returns

boolean

isCancelable()

isCancelable() : boolean

The isCancelable method, find out if a specific event is cancelable.

Returns

boolean

hasDefaultPrevented()

hasDefaultPrevented() : boolean

The hasDefaultPrevented method, checks whether the preventDefault() method was called for the event.

Returns

boolean

getPhase()

getPhase() : integer

The getPhase method, returns a number that indicates which phase of the event flow is currently being evaluated.

Returns

integer

getSource()

getSource() : string

The getSource method, returns the element that triggered the event.

Returns

string

getTarget()

getTarget() : string

The getTarget method, returns the element whose event listeners triggered the event.

Returns

string

getTimeStamp()

getTimeStamp() : integer

The getTimeStamp method, gets the number of milliseconds since midnight of January 1, 1970.

Returns

integer

isTrusted()

isTrusted() : boolean

The isTrusted method, find out if a specific event is trusted.

Returns

boolean

getType()

getType() : string

The isTrusted method, return the type of event that was triggered.

Returns

string

__toString()

__toString() : string

Magic method __toString, acquires the event's information in string format.

Returns

string

getButton()

getButton() : integer

The getButton method, returns which, if any, of the mouse buttons has changed state.

Returns

integer

getClickCount()

getClickCount() : integer

The getClickCount method, returns the number of mouse clicks associated with this event.

Returns

integer

getX()

getX() : integer

The getX method, returns the horizontal x position of the event relative to the source component.

Returns

integer

getXOnPage()

getXOnPage() : integer

The getXOnPage method, returns the horizontal x position of the event on the page.

Returns

integer

getXOnScreen()

getXOnScreen() : integer

The getXOnScreen method, returns the horizontal x position of the event on the screen.

Returns

integer

getY()

getY() : integer

The getY method, returns the vertical y position of the event relative to the source component.

Returns

integer

getYOnPage()

getYOnPage() : integer

The getYOnPage method, returns the vertical y position of the event on the page.

Returns

integer

getYOnScreen()

getYOnScreen() : integer

The getYOnScreen method, returns the vertical y position of the event on the screen.

Returns

integer

getLocationOnPage()

getLocationOnPage() : array

The getLocationOnPage method, returns the mouse cursor position of the event on the page.

This method fetches an array/tuple of x and y coordinates on the page.

Returns

array

getLocationOnScreen()

getLocationOnScreen() : array

The getLocationOnSceen method, returns the mouse cursor position of the event on the screen.

This method fetches an array/tuple of x and y coordinates on the screen.

Returns

array