net.rim.device.api.ui
Class Ui

java.lang.Object
  extended by net.rim.device.api.ui.Ui

public final class Ui
extends Object

Provides functionality and data global to the entire UI system.


Field Summary
static int INCREASE_DOWN
          Alt-rolling downwards should produce higher values in rolling controls.
static int INCREASE_UP
          Alt-rolling upwards should produce higher values in rolling controls.
static int MODE_ADVANCED
          Advanced UI user mode.
static int MODE_BEGINNER
          Beginner UI user mode.
static int MODE_NORMAL
          Normal UI user mode.
static int UNITS_cm
          Size is specified in cm (centimeters).
static int UNITS_cpt
          Size is specified in cpt (centipoints).
static int UNITS_m
          Size is specified in m (meters).
static int UNITS_mm
          Size is specified in mm (millimeters).
static int UNITS_pm
          Size is specified in pm (picometers).
static int UNITS_pt
          Size is specified in pt (points).
static int UNITS_px
          Size is specified in pixels.
static int UNITS_Ám
          Size is specified in Ám (micrometers).
 
Method Summary
static int convertSize(int size, int inUnits, int outUnits)
          Converts size unit measurements.
static int getIncreaseDirection()
          Retrieves the direction for rolling controls.
static int getMode()
          Retrieves the UI user mode.
static UiEngine getUiEngine()
          Retrieves this process's UI engine.
static UiEngineInstance getUiEngineInstance()
          Retrieves this process's UI engine.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

MODE_BEGINNER

public static final int MODE_BEGINNER
Beginner UI user mode.

See Also:
Constant Field Values

MODE_NORMAL

public static final int MODE_NORMAL
Normal UI user mode.

See Also:
Constant Field Values

MODE_ADVANCED

public static final int MODE_ADVANCED
Advanced UI user mode.

See Also:
Constant Field Values

INCREASE_UP

public static final int INCREASE_UP
Alt-rolling upwards should produce higher values in rolling controls.

This constant is defined as -1. Examples of controls that use this are ChoiceField and DateField.

See Also:
Constant Field Values

INCREASE_DOWN

public static final int INCREASE_DOWN
Alt-rolling downwards should produce higher values in rolling controls.

This constant is defined as +1. Examples of controls that use this are ChoiceField and DateField.

See Also:
Constant Field Values

UNITS_m

public static final int UNITS_m
Size is specified in m (meters).

The unit meter field is used to define the other unit fields in this class. Use these units to define the size units (UNITS_cm), millimeter (UNIT_mm), micrometer (UNIT_Ám), and picometer (UNIT_pm).

See Also:
Constant Field Values
Since:
BlackBerry API 3.7.0

UNITS_pt

public static final int UNITS_pt
Size is specified in pt (points).

The point convention used is the Postscript point, 0.3527777778 mm (1/72 inch).

See Also:
Constant Field Values
Since:
BlackBerry API 3.7.0

UNITS_px

public static final int UNITS_px
Size is specified in pixels.

It is assumed to have already gone through the appropriate scaling for the device.

See Also:
Constant Field Values
Since:
BlackBerry API 3.7.0

UNITS_cpt

public static final int UNITS_cpt
Size is specified in cpt (centipoints).

The point convention used is the Postscript point, 1 cpt = 0.003527777778 mm (1/7200 in).

See Also:
Constant Field Values
Since:
BlackBerry API 3.7.0

UNITS_cm

public static final int UNITS_cm
Size is specified in cm (centimeters).

See Also:
Constant Field Values
Since:
BlackBerry API 4.0.0

UNITS_mm

public static final int UNITS_mm
Size is specified in mm (millimeters).

See Also:
Constant Field Values
Since:
BlackBerry API 4.0.0

UNITS_Ám

public static final int UNITS_Ám
Size is specified in Ám (micrometers).

See Also:
Constant Field Values
Since:
BlackBerry API 3.7.0

UNITS_pm

public static final int UNITS_pm
Size is specified in pm (picometers).

See Also:
Constant Field Values
Since:
BlackBerry API 4.0.0


Method Detail

convertSize

public static int convertSize(int size,
                              int inUnits,
                              int outUnits)
Converts size unit measurements.

Parameters:
size - Size to convert.
inUnits - Current units for size.
outUnits - Units for converted size.
Returns:
New, converted size.
Throws:
NumericOverflowException - if the converted number is too large or too small to be represented as an integer; less than Integer.MIN_VALUE or greater than Integer.MAX_VALUE.
IllegalArgumentException - if the specified value for at least one of inUnits or outUnits is not valid.
Since:
BlackBerry API 4.0.0

getIncreaseDirection

public static int getIncreaseDirection()
Retrieves the direction for rolling controls.

A returned value of plus one indicates that, in rolling controls, alt-rolling the trackwheel towards the bottom of the device selects "higher" values in the control's list.

A returned value of minus one indicates that, in rolling controls, alt-rolling the trackwheel towards the top of the device selects "higher" values in the control's list.

Returns:
Plus one if alt-rolling towards the bottom of the device produces higher values in rolling controls; minus one if alt-rolling upwards produces higher values.

getMode

public static int getMode()
Retrieves the UI user mode.

Invoke this method to retrieve the currently set UI user mode: one of Ui.MODE_BEGINNER, Ui.MODE_NORMAL, and Ui.MODE_ADVANCED.

In advanced mode, controls should be less intrusive. In normal and beginner mode, controls should assume the user is unfamiliar with the device, and needs more assistance.

Different operating modes are not exposed at the user level. It is intended initially as a back door.

Returns:
Value corresponding to one of this class's static UI user mode members.

getUiEngine

public static UiEngine getUiEngine()
Retrieves this process's UI engine.

Returns:
Engine used by this process.

getUiEngineInstance

public static UiEngineInstance getUiEngineInstance()
Retrieves this process's UI engine.

Returns:
Engine used by this process.
Since:
BlackBerry API 4.7.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