|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.sys.Device
This class provides useful utilities for monitoring/controlling the device or for retrieving native resources for the device.
| Field Summary | |
static int |
BATTERY_AC
This is a possible parameter for getBatteryState(). |
static int |
BATTERY_BACKUP
This is a possible parameter for getBatteryState(). |
static int |
BATTERY_MAIN
This is a possible parameter for getBatteryState(). |
static int |
BATTERY_OPTION_FLAGS
|
static int |
BATTERY_OPTION_POWER_LEFT
|
static int |
BATTERY_STATE_UNKNOWN
This is a possible return value for getBatteryState. |
static IImage |
computer
|
static IImage |
drive
|
static int |
FEATURE_CUSTOM_BUTTONS
Indicates that application custom buttons are present. |
static int |
FEATURE_DIRECTION_PAD
Indicates that a direction (up/down/left/right) pad is present. |
static int |
FEATURE_FULL_AUDIO
Indicates that the device has full audio capabilities. |
static int |
FEATURE_KEYBOARD
Indicates that a keyboard is present. |
static int |
FEATURE_MOUSE
Indicates that a mouse (as distinct from a pen) is present. |
static int |
FEATURE_MOUSE_OR_PEN
Indicates that either a mouse or pen is present. |
static IImage |
folderUp
|
static IImage |
handHeld
|
static int |
idleTimeOut
|
static IImage |
palm
|
static int |
SCREEN_HIGH
|
static int |
SCREEN_LOW
|
static int |
SCREEN_NORMAL
|
static int |
SCREEN_OFF
|
static int |
SCREEN_UNKNOWN
|
static int |
STATE_AWAKE
|
static int |
STATE_OFF
|
static int |
STATE_SUSPENDED
|
static int |
STATE_UNKNOWN
|
| Method Summary | |
static int |
getBatteryState(int battery)
Return the state of the battery. |
static int |
getNativeDrawingSurface(Window window)
Get the native drawing surface for a Window. |
static int |
getNativeWindowControl(Window window)
Get the native window control associated with the Ewe Window. |
static Point |
getPositionInNativeDrawingSurface(Control c)
This locates the x and y offset of the specified Control in its containing Window's drawing surface. |
static int |
getScreen()
Get the state of the screen. |
static Dimension |
getScreenSize()
Get the device screen size. |
static int |
getState()
Get the powered-on state of the device. |
static boolean |
hasFeature(int feature)
Check if the device has a particular feature. |
static boolean |
hasFlag(int vmFlag)
See if a VM_FLAG_XXX value is set for the current VM on this device. |
static boolean |
isMobile()
Return if this device is considered a Mobile Device. |
static boolean |
isSmartPhone()
Returns if this device is considered a SmartPhone Device - one that has a phone style keyboard, 4 way navigation keys, an Action key, a Back/Cancel key and at least two "Soft" keys. |
static boolean |
preventIdleState(boolean startPrevent)
Enter or leave a period where you wish for the Device to not power down due to being in an idle state. |
void |
run()
This is used internally. |
static boolean |
setScreen(int screen)
Set the screen state. |
static boolean |
setState(int state)
Set the powered-on state of the device. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Field Detail |
public static final int STATE_UNKNOWN
public static final int STATE_AWAKE
public static final int STATE_SUSPENDED
public static final int STATE_OFF
public static final int SCREEN_UNKNOWN
public static final int SCREEN_OFF
public static final int SCREEN_LOW
public static final int SCREEN_HIGH
public static final int SCREEN_NORMAL
public static final int BATTERY_MAIN
public static final int BATTERY_BACKUP
public static final int BATTERY_AC
public static final int BATTERY_OPTION_POWER_LEFT
public static final int BATTERY_OPTION_FLAGS
public static final int BATTERY_STATE_UNKNOWN
public static final int FEATURE_MOUSE_OR_PEN
public static final int FEATURE_MOUSE
public static final int FEATURE_KEYBOARD
public static final int FEATURE_DIRECTION_PAD
public static final int FEATURE_CUSTOM_BUTTONS
public static final int FEATURE_FULL_AUDIO
public static int idleTimeOut
public static IImage folderUp
public static IImage drive
public static IImage computer
public static IImage palm
public static IImage handHeld
| Method Detail |
public static boolean hasFlag(int vmFlag)
public static boolean isMobile()
public static boolean isSmartPhone()
public static int getNativeDrawingSurface(Window window)
window - The window.
public static int getNativeWindowControl(Window window)
window - The window.
public static Point getPositionInNativeDrawingSurface(Control c)
c - The control.
public static int getBatteryState(int battery)
battery - one of the BATTERY_XXX OR'ed with one of the BATTERY_OPTION_XXX flags.
public static boolean setState(int state)
state - one of the STATE_XXX values.
public static int getState()
public static boolean setScreen(int screen)
screen - one of the SCREEN_XXX values.
public static int getScreen()
public static Dimension getScreenSize()
public static boolean hasFeature(int feature)
feature - one of the FEATURE_XXX values.
public void run()
run in interface Runnablepublic static boolean preventIdleState(boolean startPrevent)
startPrevent - true to enter the protected period, false to leave it.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||