com.nokia.mid.ui
Class VirtualKeyboard

java.lang.Object
  extended by com.nokia.mid.ui.VirtualKeyboard

public class VirtualKeyboard
extends java.lang.Object

Full touch devices can use a virtual keyboard as a replacement for the physical keyboard and thus allow textual input. VirtualKeyboard is an interface that provides access and control over the virtual keyboard. Because the virtual keyboard control panel covers parts of the display which would otherwise be available to the application, MIDlets may choose to only display the panel at certain times, e.g. when the MIDlet requires textual input from the user, this is made possible with * CustomKeyboardControl.launch(). The platform supports a number of different virtual keyboards, these are: VirtualKeyboard#ITUT VirtualKeyboard#GAME The input mode of the keyboard can be set, options are: VirtualKeyboard#DEFAULT VirtualKeyboard#NUMERIC VirtualKeyboard#ALPHA_LOWER_CASE VirtualKeyboard#ALPHA_UPPER_CASE VirtualKeyboard#ALPHA_UPPER_CASE_LOCKED


Field Summary
static int CUSTOM_KEYBOARD
          Keyboard Type: CUSTOM.
static int SYSTEM_KEYBOARD
          Keyboard Type: SYSTEM.
static int VKB_MODE_ALPHA_LOWER_CASE
          Input Mode: ALPHA_LOWER_CASE - User can enter only lower case alphabetic characters.
static int VKB_MODE_ALPHA_UPPER_CASE
          Input Mode: ALPHA_UPPER_CASE - User can enter only upper case alphabetic characters.
static int VKB_MODE_ALPHA_UPPER_CASE_LOCKED
          Input Mode: ALPHA_UPPER_CASE_LOCKED - User can enter only upper case alphabetic characters.
static int VKB_MODE_DEFAULT
          Input Mode: DEFAULT.
static int VKB_MODE_NUMERIC
          Input Mode: NUMERIC - User can enter only integer values.
static int VKB_TYPE_GAME
          Keyboard Type: GAME.
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 this VirtualKeyboard.
static int getWidth()
          Gets the width of this VirtualKeyboard.
static int getXPosition()
          Gets the x rendering position of this VirtualKeyboard.
static int getYPosition()
          Gets the y rendering position of this VirtualKeyboard.
static void hideOpenKeypadCommand(boolean hide)
          Called by the MIDlet to disables/enables the state of the default platform open keypad command in Canvas and/or CustomItem menus.
static boolean isVisible()
          Query the visibility value of VirtualKeyboard.
static void setVisibilityListener(KeyboardVisibilityListener listener)
          set the VisibilityListener
static void suppressSizeChanged(boolean suppress)
          Suppress sizeChanged events when visibility changes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CUSTOM_KEYBOARD

public static final int CUSTOM_KEYBOARD
Keyboard Type: CUSTOM.

See Also:
Constant Field Values

SYSTEM_KEYBOARD

public static final int SYSTEM_KEYBOARD
Keyboard Type: SYSTEM.

See Also:
Constant Field Values

VKB_TYPE_ITUT

public static final int VKB_TYPE_ITUT
Keyboard Type: ITUT.

See Also:
Constant Field Values

VKB_TYPE_GAME

public static final int VKB_TYPE_GAME
Keyboard Type: GAME.

See Also:
Constant Field Values

VKB_MODE_DEFAULT

public static final int VKB_MODE_DEFAULT
Input Mode: DEFAULT.

See Also:
Constant Field Values

VKB_MODE_NUMERIC

public static final int VKB_MODE_NUMERIC
Input Mode: NUMERIC - User can enter only integer values.

See Also:
Constant Field Values

VKB_MODE_ALPHA_LOWER_CASE

public static final int VKB_MODE_ALPHA_LOWER_CASE
Input Mode: ALPHA_LOWER_CASE - User can enter only lower case alphabetic characters.

See Also:
Constant Field Values

VKB_MODE_ALPHA_UPPER_CASE

public static final int VKB_MODE_ALPHA_UPPER_CASE
Input Mode: ALPHA_UPPER_CASE - User can enter only upper case alphabetic characters.

See Also:
Constant Field Values

VKB_MODE_ALPHA_UPPER_CASE_LOCKED

public static final int VKB_MODE_ALPHA_UPPER_CASE_LOCKED
Input Mode: ALPHA_UPPER_CASE_LOCKED - User can enter only upper case alphabetic characters.

See Also:
Constant Field Values
Method Detail

getCustomKeyboardControl

public 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. CustomKeyboardControl will only control custom keyboard and does not affect system keyboards. Returns: singleton instance of CustomKeyboardControl Throws: java.lang.IllegalStateException - if KeyboardControl is not yet instantiated


hideOpenKeypadCommand

public static void hideOpenKeypadCommand(boolean hide)
Called by the MIDlet to disables/enables the state of the default platform open keypad command in Canvas and/or CustomItem menus. After setting this to hidden the open keypad command will not appear in any Canvas or CustomItem menu. Note: By default, in Full touch devices, the open keypad command is always added to Canvases and CustomItem instances.

Parameters:
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.

isVisible

public static boolean isVisible()
Query the visibility value of VirtualKeyboard.


getXPosition

public static int getXPosition()
Gets the x rendering position of this VirtualKeyboard.

Returns:
the x-position of the keyboard
Throws:
java.lang.IllegalStateException - if no VirtualKeyboard has been created.

getYPosition

public static int getYPosition()
Gets the y rendering position of this VirtualKeyboard.

Returns:
the y-position of the keyboard
Throws:
java.lang.IllegalStateException - if no VirtualKeyboard has been created.

getWidth

public static int getWidth()
Gets the width of this VirtualKeyboard.

Returns:
the width in pixels of the keyboard
Throws:
java.lang.IllegalStateException - if no VirtualKeyboard has been created.

getHeight

public static int getHeight()
Gets the height of this VirtualKeyboard.

Returns:
the height in pixels of the keyboard
Throws:
java.lang.IllegalStateException - if no VirtualKeyboard has been created.

setVisibilityListener

public static void setVisibilityListener(KeyboardVisibilityListener listener)
set the VisibilityListener


suppressSizeChanged

public static void suppressSizeChanged(boolean suppress)
Suppress sizeChanged events when visibility changes



Copyright © 2012 Nokia Corporation. All rights reserved.

Nokia is registered trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Oracle Corporation. Other product and company names mentioned herein may be trademarks or trade names of their respective owners. This document is confidential information of Nokia Corporation.

Disclaimer
The information in this document is provided "as is," with no warranties whatsoever, including any warranty of merchantability, fitness for any particular purpose, or any warranty otherwise arising out of any proposal, specification, or sample. Furthermore, information provided in this document is preliminary, and may be changed substantially prior to final release.

Nokia Corporation disclaims all liability, including liability for infringement of any proprietary rights, relating to this document and implementation of any information presented in this document.

Nokia Corporation retains the right to make changes to this document at any time, without notice.

License
Subject to above disclaimer, a license is hereby granted to use this documentation solely under existing Limited License Agreement and non-disclosure agreement between the companies for the agreed application development for Series 40 Nokia phones. No other licenses e.g. to any intellectual property rights are granted herein. Any use of the screen shots of this documentation, including any icons thereof, is subject to Nokia's prior written approval.