net.rim.device.api.ui.input
Class TouchscreenSettings

java.lang.Object
  extended by net.rim.device.api.ui.input.InputSettings
      extended by net.rim.device.api.ui.input.TouchscreenSettings

public final class TouchscreenSettings
extends InputSettings

TouchscreenSettings contains a set of attributes associated with a touch screen device (see Touchscreen, TouchEvent, TouchGesture). TouchscreenSettings allows a Screen or a UiApplication to customize the generation of touch input events by the user such as swipe sensitivity, tap tolerance, and detection of pinch gestures.

To create an empty set of touch screen attributes to be populated with InputSettings.set(int, int), invoke TouchscreenSettings.createEmptySet().

Since:
BlackBerry API 6.0.0

Field Summary
static int DETECT_FACE_PROXIMITY
          Enables or disables face proximity detection in the OS.
static int DETECT_HOVER
          Setting to enable or disable the generation of HOVER gestures: 0 to disable, 1 to enable.
static int DETECT_PINCH
          Setting to enable or disable the generation of PINCH gestures: 0 to disable, 1 to enable.
static int DETECT_SWIPE
          Setting to enable or disable the generation of SWIPE gestures: 0 to disable, 1 to enable.
static int HOVER_PERIOD
          Interval in milliseconds at which HOVER gestures are generated.
static int MOVE_THRESHOLD
          Key for the Setting for the threshold in pixels at which MOVE events are generated.
static int SWIPE_SENSITIVITY
          Key for the Setting for Sensitivity or ease at which SWIPE gestures are generated: 6 for high (easy) to 0 for low (difficult).
static int TAP_INTERVAL
          Interval in milliseconds within which a subsequent TAP gesture must occur to be considered a DOUBLE_TAP gesture.
static int TAP_TOLERANCE
          Radius in pixels within which a subsequent TAP gesture must occur to be considered a DOUBLE_TAP gesture.
 
Method Summary
static InputSettings createEmptySet()
          Implements InputSettings.createEmptySet().
 
Methods inherited from class net.rim.device.api.ui.input.InputSettings
get, remove, removeAll, set
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

DETECT_SWIPE

public static final int DETECT_SWIPE
Setting to enable or disable the generation of SWIPE gestures: 0 to disable, 1 to enable.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

DETECT_HOVER

public static final int DETECT_HOVER
Setting to enable or disable the generation of HOVER gestures: 0 to disable, 1 to enable.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

DETECT_PINCH

public static final int DETECT_PINCH
Setting to enable or disable the generation of PINCH gestures: 0 to disable, 1 to enable.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

DETECT_FACE_PROXIMITY

public static final int DETECT_FACE_PROXIMITY
Enables or disables face proximity detection in the OS. When face proximity detection is enabled, and a face is detected on or near the screen, the screen is shut off, and no touch events are sent to the Applications. Face detection is disabled by default, and automatically turned on by the phone App during a phone call. 0 to disable, 1 to enable.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

MOVE_THRESHOLD

public static final int MOVE_THRESHOLD
Key for the Setting for the threshold in pixels at which MOVE events are generated. For example, set MOVE_THRESHOLD to 20 to receive a MOVE event at every 20 pixels. Minimum threshold is 1 pixel. Maximum threshold is 50 pixels. This is NOT the threshold itself. This is the 'key' used to set the threshold.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

SWIPE_SENSITIVITY

public static final int SWIPE_SENSITIVITY
Key for the Setting for Sensitivity or ease at which SWIPE gestures are generated: 6 for high (easy) to 0 for low (difficult). This is NOT the sensitivity value itself. This is the 'key' used to set the sensitivity value.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

HOVER_PERIOD

public static final int HOVER_PERIOD
Interval in milliseconds at which HOVER gestures are generated. For example, set HOVER_PERIOD to 500 to receive HOVER gestures every 500 milliseconds. Minimum period is 100 milliseconds. Maximum period is 1000 milliseconds. This is NOT the period value itself. This is the 'key' used to set the period value.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

TAP_INTERVAL

public static final int TAP_INTERVAL
Interval in milliseconds within which a subsequent TAP gesture must occur to be considered a DOUBLE_TAP gesture. For example, set TAP_INTERVAL to to 250 to receive a DOUBLE_TAP when the user initiates a second TAP within 250 milliseconds of the first tap. Depends also on TouchscreenSettings.TAP_TOLERANCE. Minimum interval is 100 milliseconds. Maximum interval is 500 milliseconds. This is NOT the interval value itself. This is the 'key' used to set the interval value.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

TAP_TOLERANCE

public static final int TAP_TOLERANCE
Radius in pixels within which a subsequent TAP gesture must occur to be considered a DOUBLE_TAP gesture. For example, set TAP_TOLERANCE to 50 to receive a DOUBLE_TAP when the user initiates a second TAP within 50 pixels of the first tap. Depends also on TouchscreenSettings.TAP_INTERVAL. Minimum tolerance is 10 pixels. Maximum tolerance is 100 pixels. This is NOT the tolerance value itself. This is the 'key' used to set the tolerance value.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0


Method Detail

createEmptySet

public static InputSettings createEmptySet()
Implements InputSettings.createEmptySet(). Creates an empty InputSettings object to be populated with touch screen attributes and values using set().

Returns:
Empty InputSettings object for a touch screen device.
Since:
BlackBerry API 6.0.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