|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--javax.microedition.lcdui.Item
|
+--javax.microedition.lcdui.TextField
The text field implementation that allows text to be editied in a form
| Nested Class Summary | |
protected class |
TextField.Peer
Peer class that does the drawing |
| Nested classes inherited from class javax.microedition.lcdui.Item |
|
| Field Summary | |
static int |
ANY
any constraint |
static int |
CONSTRAINT_MASK
Constraint mask |
static int |
EMAILADDR
email address constraint |
static int |
NUMERIC
Numeric constraint |
static int |
PASSWORD
Password constraint |
static int |
PHONENUMBER
A phone number constraint |
static int |
URL
A URL constraint |
| Fields inherited from class javax.microedition.lcdui.Item |
form, highlighted, label, peer |
| Constructor Summary | |
TextField(java.lang.String label,
java.lang.String text,
int maxSize,
int constraints)
Create a new text field given a label, initial text, max size and constraints |
|
| Method Summary | |
void |
delete(int offset,
int length)
Delete characters from the field |
int |
getCaretPosition()
Get the caret position |
int |
getChars(char[] data)
Copy the contents into a character array |
int |
getConstraints()
Get the constraints |
int |
getMaxSize()
Get the maximum size |
java.lang.String |
getString()
Get the string |
void |
insert(char[] data,
int offset,
int length,
int position)
Insert characters at a position |
void |
insert(java.lang.String str,
int position)
Insert a string at a position |
void |
setChars(char[] data,
int offset,
int length)
Set the chars in the text field |
void |
setConstraints(int constraints)
Set the constraints |
int |
setMaxSize(int maxSize)
Set the maximum size |
void |
setString(java.lang.String str)
Set the string |
int |
size()
Get the number of characters currently there |
| Methods inherited from class javax.microedition.lcdui.Item |
getLabel, setLabel |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ANY
public static final int CONSTRAINT_MASK
public static final int EMAILADDR
public static final int NUMERIC
public static final int PASSWORD
public static final int PHONENUMBER
public static final int URL
| Constructor Detail |
public TextField(java.lang.String label,
java.lang.String text,
int maxSize,
int constraints)
label - The label to usetext - The text to usemaxSize - The maximum sizeconstraints - The constraints to use| Method Detail |
public void delete(int offset,
int length)
offset - The offset to delete fromlength - The number of characters to deletepublic int getCaretPosition()
public int getChars(char[] data)
data - Where to copy to
public int getConstraints()
public int getMaxSize()
public java.lang.String getString()
public void insert(char[] data,
int offset,
int length,
int position)
data - The characters to insertoffset - The offset to insert fromlength - The length to insert forposition - The position to insert at
public void insert(java.lang.String str,
int position)
str - The string to insertposition - The position to insert at
public void setChars(char[] data,
int offset,
int length)
data - The charactersoffset - The offset into the arraylength - The length of the arraypublic void setConstraints(int constraints)
constraints - The constraints to usepublic int setMaxSize(int maxSize)
maxSize - The maximum sizepublic void setString(java.lang.String str)
str - The string to setpublic int size()
|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||