net.rim.device.api.system
Class EventInjector.NavigationEvent

java.lang.Object
  extended by net.rim.device.api.system.EventInjector.Event
      extended by net.rim.device.api.system.EventInjector.NavigationEvent
Enclosing class:
EventInjector

public static class EventInjector.NavigationEvent
extends EventInjector.Event

The event class that defines a Navigation event.

See Also:
EventInjector, EventInjector.Event, EventInjector.KeyCodeEvent, EventInjector.KeyEvent, EventInjector.TrackwheelEvent
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 4.2.0

Field Summary
Category: Signed static int NAVIGATION_CLICK
          A constant representing a navigation click.
Category: Signed static int NAVIGATION_MOVEMENT
          A constant representing a navigation movement.
Category: Signed static int NAVIGATION_UNCLICK
          A constant representing a navigation click released.
 
Constructor Summary
Category: Signed EventInjector.NavigationEvent(int event, int dx, int dy, int status)
          Constructs a new NavigationEvent instance whose time is set to the current device uptime.
 
Method Summary
Category: Signed  int getAmountX()
          Returns the amount to move left/right before the event will occur.
Category: Signed  int getAmountY()
          Returns the amount to move up/down before the event will occur.
Category: Signed  int getStatus()
          Returns the status.
Category: Signed  void setAmount(int dx, int dy)
          Sets the amount to move for the event to occur.
 
Methods inherited from class net.rim.device.api.system.EventInjector.Event
getEvent, getTime, post, setEvent, setStatus, setTimeToCurrent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

NAVIGATION_CLICK

public static final int NAVIGATION_CLICK
A constant representing a navigation click.

See Also:
Constant Field Values
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 4.2.0

NAVIGATION_UNCLICK

public static final int NAVIGATION_UNCLICK
A constant representing a navigation click released.

See Also:
Constant Field Values
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 4.2.0

NAVIGATION_MOVEMENT

public static final int NAVIGATION_MOVEMENT
A constant representing a navigation movement.

See Also:
Constant Field Values
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 4.2.0


Constructor Detail

EventInjector.NavigationEvent

public EventInjector.NavigationEvent(int event,
                                     int dx,
                                     int dy,
                                     int status)
Constructs a new NavigationEvent instance whose time is set to the current device uptime.

Parameters:
event - One of NAVIGATION_CLICK, NAVIGATION_UNCLICK, NAVIGATION_MOVEMENT.
dx - The amount by which to move left/right, positive is right, negative is left. If dx is smaller than -32767 or greater than 32727 unexpected results may occur.
dy - The amount by which to move up/down, positive is down, negative is up. If dy is smaller than -32767 or greater than 32727 unexpected results may occur.
status - Any status flags (as defined by KeypadListener).
Throws:
IllegalArgumentException - If the values for dx or dy are invalid.
See Also:
Characters
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 4.2.0


Method Detail

setAmount

public void setAmount(int dx,
                      int dy)
Sets the amount to move for the event to occur.

Parameters:
dx - The amount by which to move left/right, positive is right, negative is left. If dx is smaller than -32767 or greater than 32727 unexpected results may occur.
dy - The amount by which to move up/down, positive is down, negative is up. If dy is smaller than -32767 or greater than 32727 unexpected results may occur.
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 4.2.0

getAmountX

public int getAmountX()
Returns the amount to move left/right before the event will occur.

Returns:
The magnitude to move left/right.
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 4.2.0

getAmountY

public int getAmountY()
Returns the amount to move up/down before the event will occur.

Returns:
The magnitude to move up/down.
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 4.2.0

getStatus

public int getStatus()
Returns the status.

Overrides:
getStatus in class EventInjector.Event
Returns:
An integer representing the status. Can be any status flags (as defined by KeypadListener).
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 4.2.1





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.