|
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.Displayable
|
+--javax.microedition.lcdui.Screen
|
+--javax.microedition.lcdui.TextBox
This provides the implementation for text fields and text boxes
| Nested Class Summary | |
protected class |
TextBox.Peer
Peer class that does the drawing |
| Field Summary |
| Fields inherited from class javax.microedition.lcdui.Screen |
height, offset |
| Fields inherited from class javax.microedition.lcdui.Displayable |
display |
| Constructor Summary | |
TextBox(java.lang.String title,
java.lang.String text,
int maxSize,
int constraints)
Create a new text box given initial sizes, text and contraints |
|
| 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.Screen |
getTicker, getTitle, scrollDown, scrollUp, setTicker, setTitle |
| Methods inherited from class javax.microedition.lcdui.Displayable |
addCommand, isShown, removeCommand, setCommandListener |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TextBox(java.lang.String title,
java.lang.String text,
int maxSize,
int constraints)
title - The title 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 | ||||||||||