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

java.lang.Object
  extended by net.rim.device.api.ui.input.InputSettings
Direct Known Subclasses:
NavigationDeviceSettings, TouchscreenSettings

public abstract class InputSettings
extends Object

InputSettings contains a set of attributes associated with a specific input device, such as a keypad, trackball, or touch screen (see TouchscreenSettings). For a list of supported input devices, see net.rim.device.api.ui.input.

InputSettings can be applied to individual Screen objects (see Screen.addInputSettings(InputSettings)) or to a UiApplication (see UiEngineInstance.addInputSettings(InputSettings)). InputSettings applied to a Screen override InputSettings applied to a UiApplication, which in turn override system-wide settings:

Since:
BlackBerry API 6.0.0

Method Summary
 int get(int attribute)
          Returns the value associated with the specified input attribute.
 int remove(int attribute)
          Removes the value associated with the specified input attribute.
 void removeAll()
          Removes all values contained within this InputSettings object.
 int set(int attribute, int value)
          Sets the value for the specified input attribute.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

get

public int get(int attribute)
Returns the value associated with the specified input attribute. The value can be set by invoking InputSettings.set(int, int).

Parameters:
attribute - Attribute for a given input device, for example, TouchscreenSettings.SWIPE_SENSITIVITY.
Returns:
The value of attribute if set; otherwise -1.
Since:
BlackBerry API 6.0.0

set

public int set(int attribute,
               int value)
Sets the value for the specified input attribute. The value can be returned by invoking InputSettings.get(int) or removed by invoking InputSettings.remove(int). All values are clamped to attribute limits.

Parameters:
attribute - Attribute for a given input device, for example, TouchscreenSettings.SWIPE_SENSITIVITY.
value - Value to associate with attribute.
Returns:
Previous value associated with attribute, or -1 if attribute had no previous associated value.
Throws:
IllegalArgumentException - If attribute is not associated with this input device.
Since:
BlackBerry API 6.0.0

remove

public int remove(int attribute)
Removes the value associated with the specified input attribute. The value can be set by invoking InputSettings.set(int, int).

Parameters:
attribute - Attribute for a given input device, for example, TouchscreenSettings.SWIPE_SENSITIVITY.
Returns:
Previous value associated with attribute, or -1 if attribute had no previous associated value.
Since:
BlackBerry API 6.0.0

removeAll

public void removeAll()
Removes all values contained within this InputSettings object.

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