FileDocCategorySizeDatePackage
TextInputComponent.javaAPI DocphoneME MR2 API (J2ME)3270Wed May 02 18:00:20 BST 2007com.sun.midp.chameleon.input

TextInputComponent

public interface TextInputComponent
An interface which defines the protocol between LCDUI component implementations (TextFieldLFImpl, TextBoxLFImpl) and the TextInputMediator to enable text input from the system's input modes.

Fields Summary
Constructors Summary
Methods Summary
public voidclear(int num)
Clear the particular number of symbols

param
num number of symbols

public voidcommit(java.lang.String input)
This is a direct call from the text input system to immediately commit the given input to this TextInputComponent's state. This call constitutes a change to the value of this TextInputComponent and should result in any of its change listeners being notified.

param
input String needs to be commited

public intgetAvailableSize()
Returns the available size (number of characters) that can be stored in this TextInputComponent.

return
available size in characters

public intgetConstraints()
Retrieve the constraints of this text component as defined by the MIDP TextField API.

return
a bitmask which defines the constraints set on this text component, or 0 if none were set

public javax.microedition.lcdui.DisplaygetDisplay()
Gets the current Display

return
current Display

public java.lang.StringgetInitialInputMode()
Retrieve the initial input mode of this text component as defined by the MIDP TextField API.

return
the initial input mode for this text component or 'null' if none was set

public booleanisClearKey(int keyCode)
Returns true if the keyCode is used as 'clear'

param
keyCode key code
return
true if keu code is Clear one, false otherwise

public voidnotifyModeChanged()
This is a notification from the input session that the selected input mode has changed. If the TextInputComponent is interested, it can query the session for the new InputMode.