net.rim.device.api.system
Class EventInjector

java.lang.Object
  extended by net.rim.device.api.system.EventInjector

public final class EventInjector
extends Object

This class and its inner classes (EventInjector.Event, EventInjector.KeyEvent, EventInjector.KeyCodeEvent, EventInjector.TrackwheelEvent, EventInjector.NavigationEvent), EventInjector.TouchEvent), are used to inject events into the system.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

Nested Class Summary
Category: Signed static class EventInjector.Event
          The base class for events.
Category: Signed static class EventInjector.KeyCodeEvent
          The event class that defines a physical key press event.
Category: Signed static class EventInjector.KeyEvent
          The event class that defines a character input event.
Category: Signed static class EventInjector.NavigationEvent
          The event class that defines a Navigation event.
Category: Signed static class EventInjector.TouchEvent
          The event class that defines a touch screen event.
Category: Signed static class EventInjector.TrackwheelEvent
          The event class that defines a Trackwheel event.
 
Method Summary
Category: Signed static void invokeEvent(EventInjector.Event e)
          Invokes the given event by posting the event to the application that is currently accepting input.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

invokeEvent

public static final void invokeEvent(EventInjector.Event e)
Invokes the given event by posting the event to the application that is currently accepting input.

Parameters:
e - the event to invoke. (Note: If you wish to specify an EventInjector.NavigationEvent object with the event type NAVIGATION_UNCLICK as the event to invoke, you must first invoke this method with a NavigationEvent object whose event type is NAVIGATION_CLICK. Otherwise, the NavigationEvent object with event type NAVIGATION_UNCLICK is rejected.)
Throws:
NullPointerException - if e is null.
UnsupportedOperationException - if e is a TouchEvent and touch screen is not supported on the device.
ControlledAccessException - if the calling application does not have the Input Simulation permission.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal