|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.rim.device.api.ui.Field
|
+--net.rim.device.api.ui.component.TextField
|
+--net.rim.device.api.ui.component.BasicEditField
|
+--net.rim.device.api.ui.component.PasswordEditField
An editable text field desgined specifically to handle password input.
Behaviour
This field maintains a private real text buffer which it uses to store the
password in clear text. The visible value this field shows to the user is a
string of asterisks equal in length to the real text buffer.
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.
| Fields inherited from class net.rim.device.api.ui.component.BasicEditField |
CONSUME_INPUT, DEFAULT_MAXCHARS, FILTER_DEFAULT, FILTER_EMAIL, FILTER_HEXADECIMAL, FILTER_INTEGER, FILTER_LOWERCASE, FILTER_NUMERIC, FILTER_PHONE, FILTER_PIN_ADDRESS, FILTER_REAL_NUMERIC, FILTER_UPPERCASE, FILTER_URL, JUMP_FOCUS_AT_END, NO_COMPLEX_INPUT, NO_LEARNING, NO_NEWLINE |
| Fields inherited from class net.rim.device.api.ui.Field |
EDITABLE, EDITABLE_MASK, FIELD_BOTTOM, FIELD_HALIGN_MASK, FIELD_HCENTER, FIELD_LEFT, FIELD_RIGHT, FIELD_TOP, FIELD_VALIGN_MASK, FIELD_VCENTER, FOCUSABLE, FOCUSABLE_MASK, HIGHLIGHT_FOCUS, HIGHLIGHT_SELECT, NON_FOCUSABLE, READONLY, USE_ALL_HEIGHT, USE_ALL_WIDTH |
| Constructor Summary | ||
PasswordEditField()
Constructs a new PasswordEditField instance. |
||
PasswordEditField(String label,
String initialValue)
Constructs a PasswordEditField instance with label and initial value. |
||
PasswordEditField(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 |
update(int delta)
Updates this field. |
|
| Methods inherited from class net.rim.device.api.ui.component.BasicEditField |
backspace, backspace, backspace, charAt, clear, displayFieldFullMessage, drawFocus, getCursorPosition, getFilter, getFocusRect, getLabel, getLabelLength, getMaxSize, getPreferredHeight, getPreferredWidth, getText, getText, getText, getTextAbstractString, getTextLength, insert, insert, isSelectable, isSelecting, isSelectionDeleteable, isSymbolScreenAllowed, keyChar, keyControl, keyDown, layout, makeContextMenu, moveFocus, moveFocus, onFocus, onUnfocus, onVisibilityChange, paint, paste, selectionDelete, setCursorPosition, setCursorPosition, setFilter, setFont, setLabel, setMaxSize, setText, setText, toString, wipe |
| Methods inherited from class net.rim.device.api.ui.Field |
drawHighlightRegion, fieldChangeNotify, focusAdd, focusRemove, getChangeListener, getContextMenu, getCookie, getExtent, getExtent, getFieldStyle, getFocusListener, getFont, getHeight, getIndex, getLeafFieldWithFocus, getLeft, getManager, getOriginal, getScreen, getStyle, getTop, getWidth, invalidate, invalidate, isDirty, isEditable, isFocusable, isMuddy, isSelectionCutable, isStyle, isVisible, keyStatus, keyUp, onDisplay, onExposed, onMenuDismissed, onObscured, onUndisplay, selectionCut, setChangeListener, setCookie, setDirty, setEditable, setExtent, setFocus, setFocusListener, setMuddy, setPosition, trackwheelClick, trackwheelUnclick, updateLayout |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PasswordEditField()
This builds a new password edit field with no label and no initial contents.
public PasswordEditField(String label, String initialValue)
This method buidls an editable password field that can hold up to
BasicEditField.DEFAULT_MAXCHARS characters.
Note that your provided text does not itself show up in the created field; this method places your text into a private real text buffer, and 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 PasswordEditField(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 places your text into a private real text buffer, and 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 void selectionCopy(Clipboard cb)
This type of field does not support copy operations.
selectionCopy in class net.rim.device.api.ui.component.TextFieldcb - Clipboard object.public final boolean isSelectionCopyable()
isSelectionCopyable in class net.rim.device.api.ui.component.TextField
protected boolean keyRepeat(int keycode,
int time)
This method consumes all key repeat events, which aren't appropriate for password fields.
keycode - Key being repeated (ignored).time - Number of milliseconds since the device was turned on.protected void update(int delta)
This field's manager invokes this method to prompt this field to update itself. When invoked, this field determines the affected region's new line heights, adjusts the master line length array, adjusts the focus, and resizes the field (if necessary).
update in class BasicEditFielddelta - Number of characters by which the field has changed,
negative or positive (negative means that many characters have been
added.)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2004 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.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.