|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.ui.Trackball
public final class Trackball
Provides low-level access to trackball on supporting BlackBerry devices.
Methods are provided for getting and/or setting trackball characteristics,
such as sensitivity and filters. Sensitivity determines how far a user
must roll the trackball along the X or Y axis before a navigation event
is dispatched to the software layer. Physical trackball movement is measured
by the hardware in "ticks", similar to the way mouse movement is measured in
"mickeys". When the number of ticks along an axis surpasses the system's or
the application's threshold, a navigation event along that axis is dispatched
to the software layer and the tick count is reset to zero. The higher the
sensitivity, the smaller the threshold. Tick counts are typically reset to
zero after a certain amount of idle time. This prevents a small "nudge" from
generating a navigation event if the user had previously rolled the trackball
by an amount insufficient to surpass the tick threshold. See
Trackball.FILTER_NO_TIME_WINDOW
for an exception to this rule.
Filters are used to alter trackball movement as detected by hardware before it is dispatched to software. This is typically used to filter out noise or unwanted movements. However, it can also be used to change other settings, such as acceleration. In this case the movement reported to software is increasingly more than the actual movement detected by hardware, as long as the user continually rolls the trackball. In other words, the sensitivity temporarily increases as the user rolls the trackball without pausing. See the descriptions of the FILTER_* constants for more details.
Field Summary | ||
---|---|---|
static int |
FILTER_ACCELERATION
Acceleration filter. |
|
static int |
FILTER_DEFAULT
Default filter. |
|
static int |
FILTER_NO_TIME_WINDOW
No time window filter. |
|
static int |
FILTER_XY_SNAP
X/Y snap filter. |
|
static int |
SENSITIVITY_OFF
Sensitivity setting for off. |
|
static int |
SENSITIVITY_UNSET
Sensitivity setting for being unset. |
Method Summary | ||
---|---|---|
static int |
getFilter()
Retrieves the trackball movement filter for the calling process. |
|
static int |
getFilterForSystem()
Retrieves the trackball movement filter for the system. |
|
static int |
getSensitivityIncrement()
Retrieves the smallest meaningful increment to the sensitivity value. |
|
static int |
getSensitivityX()
Retrieves the X-axis sensitivity setting for the calling process. |
|
static int |
getSensitivityXForSystem()
Retrieves the X-axis sensitivity setting for the system. |
|
static int |
getSensitivityY()
Retrieves the Y-axis sensitivity setting for the calling process. |
|
static int |
getSensitivityYForSystem()
Retrieves the Y-axis sensitivity setting for the system. |
|
static boolean |
isFeedbackAudibleForSystem()
Determines whether or not there is an audible click associated with rolling the trackball. |
|
static boolean |
isOpticalSupported()
Determines whether or not the device supports an optical trackball or trackpad. |
|
static boolean |
isSupported()
Determines whether or not the system supports a trackball device. |
|
static void |
setFilter(int filter)
Sets the trackball movement filter for the calling process. |
|
static void |
setSensitivityX(int sensitivity)
Sets the X-axis sensitivity for the calling process. |
|
static void |
setSensitivityY(int sensitivity)
Sets the Y-axis sensitivity for the calling process. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SENSITIVITY_UNSET
public static final int SENSITIVITY_OFF
public static final int FILTER_DEFAULT
public static final int FILTER_XY_SNAP
public static final int FILTER_NO_TIME_WINDOW
public static final int FILTER_ACCELERATION
Method Detail |
---|
public static int getFilter()
public static int getFilterForSystem()
public static int getSensitivityIncrement()
public static int getSensitivityX()
Trackball.SENSITIVITY_UNSET
or Trackball.SENSITIVITY_OFF
.public static int getSensitivityXForSystem()
public static int getSensitivityY()
Trackball.SENSITIVITY_UNSET
or Trackball.SENSITIVITY_OFF
.public static int getSensitivityYForSystem()
public static boolean isFeedbackAudibleForSystem()
public static boolean isSupported()
public static boolean isOpticalSupported()
true
if the device supports an optical trackball or trackball;
false
otherwise.public static void setFilter(int filter)
filter
- A bitmask of the FILTER_* constants.
IllegalArgumentException
- if filter
is not a bitmask of the FILTER_* constants.public static void setSensitivityX(int sensitivity)
sensitivity
- Percentage value, Trackball.SENSITIVITY_UNSET
or Trackball.SENSITIVITY_OFF
.
IllegalArgumentException
- if sensitivity
is not between 0-100, and is not SENSITIVITY_UNSET
or SENSITIVITY_OFF.public static void setSensitivityY(int sensitivity)
sensitivity
- Percentage value, Trackball.SENSITIVITY_UNSET
or Trackball.SENSITIVITY_OFF
.
IllegalArgumentException
- if sensitivity
is not between 0-100, and is not SENSITIVITY_UNSET
or SENSITIVITY_OFF.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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