|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.ui.Field
net.rim.device.api.ui.component.TextFieldBase
net.rim.device.api.input.InputHelperBase
net.rim.device.api.input.InputHelper
net.rim.device.api.input.PasswordInputHelper
public class PasswordInputHelper
An editable text field designed specifically to handle password input.
Behaviour
This field stores the password as plain text but draws it as
a series of asterisks, one for each character cluster (group
of characters treated as one after diacritics and ligatures
have been handled).
This field does not have any automatic input replacement, so the typed text is exactly what is typed. AutoCaps, AutoText, AutoPeriod, and any other transformation are turned off. Also, holding a key and rolling the wheel is not allowed.
This field does not support copy or cut operations.
By default, this field supports all the available characters. You can restrict this by applying a TextFilter.
Field Summary |
---|
Fields inherited from class net.rim.device.api.input.InputHelperBase |
---|
CONSUME_INPUT, NO_NEWLINE |
Constructor Summary | ||
---|---|---|
PasswordInputHelper()
Constructs a new PasswordEditField instance. |
||
PasswordInputHelper(String label,
String initialValue)
Constructs a PasswordEditField instance with label and initial value. |
||
PasswordInputHelper(String label,
String initialValue,
int maxNumChars,
long style)
Constructs a smaller PasswordEditField object. |
Method Summary | ||
---|---|---|
boolean |
isSelectionCopyable()
Determines if this field supports copy operations. |
|
protected boolean |
keyRepeat(int keycode,
int time)
Consumes key repeat events. |
|
void |
selectionCopy(Clipboard cb)
Does nothing. |
|
protected void |
setText(String text,
int context)
Sets the text value for this field, with indication of the source of this action. |
Methods inherited from class net.rim.device.api.input.InputHelper |
---|
getLookupProperties, getVariantIterator, notifyLookupPropertiesChanged |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.rim.device.api.im.ITextInputStyle |
---|
getPreferredInputLocale, getTextInputStyle, isEditable, isUnicodeInputAllowed, updateInputStyle |
Constructor Detail |
---|
public PasswordInputHelper()
This builds a new password edit field with no label and no initial contents.
public PasswordInputHelper(String label, String initialValue)
This method builds an editable password field that can hold up to
EditField#DEFAULT_MAXCHARS
characters.
Note that your provided text does not itself show up in the created field; this method shows a string of asterisks of the same length to the user.
label
- Label for this field.initialValue
- Initial password value for this field.public PasswordInputHelper(String label, String initialValue, int maxNumChars, long style)
This method builds an editable password field that can hold a number of characters up to the amount you specify.
Note that your provided text does not itself show up in the created field; this method shows a string of asterisks of the same length to the user.
label
- Label for this field.initialValue
- Initial password value for this field.maxNumChars
- Maximum number of characters this field can hold.style
- Style for this field: this value will be combined with the
EDITABLE
and NO_NEWLINE
styles.Method Detail |
---|
public final boolean isSelectionCopyable()
isSelectionCopyable
in class InputHelperBase
protected boolean keyRepeat(int keycode, int time)
This method consumes all key repeat events, which aren't appropriate for password fields except the speakerphone key when trackball is supported or media keys.
keyRepeat
in class Field
keycode
- Key being repeated (ignored).time
- Number of milliseconds since the device was turned on.
public final void selectionCopy(Clipboard cb)
This type of field does not support copy operations.
selectionCopy
in class InputHelperBase
cb
- Clipboard object.protected void setText(String text, int context) throws IllegalArgumentException
InputHelperBase
setText
in class InputHelperBase
text
- New string value for this field; if null, this method clears
the field.context
- Information specifying the origin of the change.
IllegalArgumentException
- If the text cannot be entered
into an edit field.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.