|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nokia.mid.ui.VirtualKeyboard
Some touch devices can use a virtual keyboard as a replacement for the physical keyboard and thus allow
client to use keypad in Canvas, GameCanvas and CustomItem. Key presses are handled in Canvas' and CustomItems keyPressed
method.
VirtualKeyboard
is an interface that provides access to CustomKeyboardControl
which allows MIDlets to
control visibility, type and mode of the CUSTOM_KEYBOARD
. VirtualKeyboard
also allows MIDlets to register keyboard visibility
listener which will notify clients when SYSTEM_KEYBOARD
or CUSTOM_KEYBOARD
keyboard visibility changes.
Field Summary | |
static int |
CUSTOM_KEYBOARD
Constant for custom keyboard type that is controlled by CustomKeyboardControl . |
static int |
SYSTEM_KEYBOARD
Constant for system keyboard type that is controlled by the Java platform editors for example TextBox keyboard. |
static int |
VKB_MODE_ALPHA_LOWER_CASE
Input Mode: ALPHA_LOWER_CASE - Keypad appearance has lower case alphabetic characters. |
static int |
VKB_MODE_ALPHA_UPPER_CASE
Input Mode: ALPHA_UPPER_CASE - Keypad appearance has upper case alphabetic characters. |
static int |
VKB_MODE_ALPHA_UPPER_CASE_LOCKED
Input Mode: ALPHA_UPPER_CASE_LOCKED - Keypad appearance has upper case alphabetic characters and shift icon shown as locked. |
static int |
VKB_MODE_DEFAULT
Input Mode: DEFAULT. |
static int |
VKB_MODE_NUMERIC
Input Mode: NUMERIC - Keypad appearance has numeric characters only |
static int |
VKB_TYPE_GAME
Keyboard Type: GAME - not currently supported by Virtual Keyboard component. |
static int |
VKB_TYPE_ITUT
Keyboard Type: ITUT. |
Method Summary | |
static CustomKeyboardControl |
getCustomKeyboardControl()
Gets singleton instance of CustomKeyboardControl
Custom keyboard control is used for controlling custom virtual keyboard in touch devices
that can be used when physical keypad is not available. |
static int |
getHeight()
Gets the height of visible virtual keyboard. |
static int |
getWidth()
Gets the width of visible virtual keyboard. |
static int |
getXPosition()
Gets the x rendering position of visible virtual keyboard. |
static int |
getYPosition()
Gets the y rendering position of visible virtual keyboard. |
static void |
hideOpenKeypadCommand(boolean hide)
Called by the MIDlet to disable/enable the state of the default platform open keypad command in Canvas and/or CustomItem menus. |
static boolean |
isVisible()
Gets current visibility state of the virtual keyboard |
static void |
setVisibilityListener(KeyboardVisibilityListener listener)
Sets virtual keyboard visibility listener. |
static void |
suppressSizeChanged(boolean suppressSizeChange)
Suppresses sizeChanged events when virtual keyboard visibility changes. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int CUSTOM_KEYBOARD
CustomKeyboardControl
.
This constant is used in KeyboardVisibilityListener
to indicate which keyboard type had visibility change
public static final int SYSTEM_KEYBOARD
KeyboardVisibilityListener
to indicate which keyboard type had visibility change
public static final int VKB_TYPE_ITUT
public static final int VKB_TYPE_GAME
public static final int VKB_MODE_DEFAULT
public static final int VKB_MODE_NUMERIC
public static final int VKB_MODE_ALPHA_LOWER_CASE
public static final int VKB_MODE_ALPHA_UPPER_CASE
public static final int VKB_MODE_ALPHA_UPPER_CASE_LOCKED
Method Detail |
public static void hideOpenKeypadCommand(boolean hide)
Note: By default, in some touch devices, the open keypad command is always added to Canvases and CustomItem instances.
hide
- the new visibility state of the open keypad command: true if MIDlet
needs this command to be hidden/removed from the menu or false otherwise.public static int getXPosition()
SYSTEM_KEYBOARD
or CUSTOM_KEYBOARD
java.lang.IllegalStateException
- if keyboard data cannot be readpublic static int getYPosition()
SYSTEM_KEYBOARD
or CUSTOM_KEYBOARD
java.lang.IllegalStateException
- if keyboard data cannot be readpublic static int getWidth()
SYSTEM_KEYBOARD
or CUSTOM_KEYBOARD
java.lang.IllegalStateException
- if keyboard data cannot be readpublic static int getHeight()
SYSTEM_KEYBOARD
or CUSTOM_KEYBOARD
java.lang.IllegalStateException
- if keyboard data cannot be readpublic static void setVisibilityListener(KeyboardVisibilityListener listener)
SYSTEM_KEYBOARD
and CUSTOM_KEYBOARD
java.lang.IllegalStateException
- if visibility listener cannot be setpublic static CustomKeyboardControl getCustomKeyboardControl()
CustomKeyboardControl
Custom keyboard control is used for controlling custom virtual keyboard in touch devices
that can be used when physical keypad is not available. CustomKeyboardControl will only control
custom keyboard and does not affect system keyboards.
CustomKeyboardControl
java.lang.IllegalStateException
- if KeyboardControl is not yet instantiatedpublic static boolean isVisible()
java.lang.IllegalStateException
- if visibility state cannot be readpublic static void suppressSizeChanged(boolean suppressSizeChange)
sizeChanged(int, int)
. This setting will affect all system and custom virtual keyboards.
suppressSizeChange
- If true, virtual keyboard visibility changes will not cause sizeChanged. If false, virtual keyboard visibility change causes
sizeChanged.
java.lang.IllegalStateException
- if java platform cannot save setting
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |