|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ercp.swt.mobile.MobileDevice
Instances of this class represent the device that is being used. It provides methods that enable applications to learn more about the device specific characteristics and capabilities.
Applications can query what input features and display screens are permanently
part of the device. These are considered local features. Some devices also
allow input mechanisms or screens to be attached to the device at runtime. These
are considered remote features. Since local features do not come and go,
it is sufficient to query for them once. On the other hand, since remote devices
can be added or removed at any time, an application needs to add a
MobileDeviceListener
to be informed of these events.
Local features may also be internal or external. External features are only available when a device is closed. Internal features are only available when a device is opened.
Screen
,
Input
,
MobileDeviceListener
Field Summary | |
static int |
ALERT_CRITICAL
alert level indicating immediate attention is required (ex. |
static int |
ALERT_HIGH_IMPORTANCE
alert level indicating user attention desired (ex. |
static int |
ALERT_LOW_IMPORTANCE
alert level indicating simple notification (ex. |
static int |
EXTERNAL
local feature which is only available when mobile device is closed |
static int |
INTERNAL
local feature which is only available when mobile device is opened |
static int |
LOCAL
feature which is permanently attached to the mobile device and always available |
static int |
REMOTE
feature which is not part of the mobile device unless connected via wire or wireless signal |
static int |
VK_ALWAYS_OFF
virtual keyboard hint indicating keyboard should always be hidden |
static int |
VK_ALWAYS_ON
virtual keyboard hint indicating keyboard should always be visible |
static int |
VK_NORMAL
virtual keyboard hint indicating normal show and hide operation |
Method Summary | |
void |
addMobileDeviceListener(MobileDeviceListener listener)
Adds the listener to the collection of listeners who will be notified when a device configuration change occurs, by calling one of the methods defined in the MobileDeviceListener interface. |
void |
alert(int level)
Alerts the user using device specific mechanisms such as sounds, flashing, or vibration. |
Input[] |
getInputs()
Returns an array of Input objects describing the input features available to the device. |
static MobileDevice |
getMobileDevice()
Returns singleton instance of MobileDevice class. |
Screen[] |
getScreens()
Returns an array of Screen objects describing the display features available to the device. |
boolean |
isOpen()
Returns whether device is opened. |
void |
removeMobileDeviceListener(MobileDeviceListener listener)
Removes the listener from the collection of listeners who will be notified when a device configuration change occurs. |
void |
setVKStatus(int status)
Sets the status of the system virtual keyboard (if one is available). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int LOCAL
public static final int INTERNAL
public static final int EXTERNAL
public static final int REMOTE
public static final int ALERT_LOW_IMPORTANCE
public static final int ALERT_HIGH_IMPORTANCE
public static final int ALERT_CRITICAL
public static final int VK_NORMAL
public static final int VK_ALWAYS_ON
public static final int VK_ALWAYS_OFF
Method Detail |
public void addMobileDeviceListener(MobileDeviceListener listener)
MobileDeviceListener
interface.
screenChanged
is called when a monitor configuration changes.
inputChanged
is called when an input configuration changes.
deviceChanged
is called when the device is opened or closed.
listener
- instance called when device events occur
java.lang.IllegalArgumentException
- SWTError
- removeMobileDeviceListener(org.eclipse.ercp.swt.mobile.MobileDeviceListener)
,
MobileDeviceListener
public void alert(int level)
Level
must be one of ALERT_LOW_IMPORTANCE,
ALERT_HIGH_IMPORTANCE, or ALERT_CRITICAL. The method maps these levels to
device specific features that may also be dependent upon user configuration
or current profile.
level
- constant describing the importance of the alert
java.lang.IllegalArgumentException
- ALERT_LOW_IMPORTANCE
,
ALERT_HIGH_IMPORTANCE
,
ALERT_CRITICAL
public Input[] getInputs()
null
if there are no input features available.
SWTError
- Input
public Screen[] getScreens()
null
if there are no display screens available.
SWTError
- Screen
public static MobileDevice getMobileDevice()
SWTError
- public boolean isOpen()
true
.
public void removeMobileDeviceListener(MobileDeviceListener listener)
listener
- instance called when device events occur
java.lang.IllegalArgumentException
- SWTError
- addMobileDeviceListener(org.eclipse.ercp.swt.mobile.MobileDeviceListener)
,
MobileDeviceListener
public void setVKStatus(int status)
status
- virtual keyboard mode. One of VK_NORMAL, VK_ALWAYS_ON, VK_ALWAYS_OFF
java.lang.IllegalArgumentException
- VK_NORMAL
,
VK_ALWAYS_ON
,
VK_ALWAYS_OFF
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |