Help Center

Local Navigation

Object: UIEvent

Availability

BlackBerry® Device Software version 4.6 or later

Extends

Event

Extended by

KeyboardEvent, MouseEvent, TextEvent

The UIEvent object represents a user interface event, generated by user interaction with a BlackBerry device input method, such as the trackball or trackwheel, or the BlackBerry device keypad.

To create an instance of a UIEvent, you must invoke Document.createEvent() with an input parameter of ”UIEvent”.

UIEvent properties

Property name

Type

Description

Status

Availability

detail

long

Returns detail information about the event.

read only

4.6 or later

view

AbstractView

Returns a reference to the AbstractView that generated the event.

read only

4.6 or later

User interface events

Event type

Bubbles

Cancelable

Description

DOMFocusIn

yes

no

Occurs when an EventTarget receives focus.

DOMFocusOut

yes

no

Occurs when an EventTarget loses focus.

DOMActivate

yes

yes

Occurs when an EventTarget is activated though a keyboard press or trackball or trackwheel click.

This event type includes the following context information:

UIEvent.detail

UIEvent methods

Method name

Description

Availability

initUIEvent()

Initializes the value of a UIEvent.

4.6 or later

Method: UIEvent.initUIEvent()

Availability

BlackBerry® Device Software version 4.6 or later

The initUIEvent() method initializes the value of a UIEvent created by Document.createEvent().

Syntax

UIEvent.initUIEvent( typeArg, canBubbleArg, cancelableArg, viewArg, detailArg )

Parameters

Parameter

Type

Description

typeArg

String

Specifies the event type.

canBubbleArg

boolean

When true, this parameter indicates that the event can bubble.

cancelableArg

boolean

When true, this parameter indicates that the event can be cancelled.

viewArg

AbstractView

Specifies the window or frame that is generating the event.

detailArg

long

Specifies the code for the event detail.

Return values

None.

Exceptions

None.

Next topic: Object: Window

Was this information helpful? Send us your comments.