|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--brf.j2me.dynaworks.ui.BasicWidget
|
+--brf.j2me.dynaworks.ui.TextField
Text field with caret.
BasicWidget,
UserWidget| Inner Class Summary | |
class |
TextField.Caret
thread object for blinking caret. |
| Field Summary | |
private TextField.Caret |
caret
Thread object and position of blinking caret. |
private java.lang.String |
charset
ASCII characters |
private java.lang.String |
content
text field content. |
private boolean |
focus
do we have focus? |
| Fields inherited from class brf.j2me.dynaworks.ui.BasicWidget |
g, h, w, x, y |
| Constructor Summary | |
TextField(java.lang.String text,
int x,
int y,
int w,
int h)
constructor. |
|
| Method Summary | |
java.lang.String |
getText()
get the text from the control. |
ActionEvent |
handleKeyDown(int keyCode)
Handle a "keyDown" event. |
boolean |
hasFocus()
Does the control have the focus? |
void |
loseFocus()
control is losing the focus. |
void |
paint()
Paint the user control. |
void |
setFocus()
set the focus on this control |
void |
setText(java.lang.String txt)
set the text for this control. |
| Methods inherited from class brf.j2me.dynaworks.ui.BasicWidget |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
| Field Detail |
private final java.lang.String charset
private java.lang.String content
private boolean focus
private TextField.Caret caret
| Constructor Detail |
public TextField(java.lang.String text,
int x,
int y,
int w,
int h)
text - String - content of the text field.x - int - x coordinate of upper-left corner.y - int - y coordinate of upper-left corner.w - int - width of the control.h - int - height of the control.| Method Detail |
public void setFocus()
setFocus in class BasicWidgetpublic boolean hasFocus()
hasFocus in class BasicWidgetpublic void loseFocus()
loseFocus in class BasicWidgetpublic void setText(java.lang.String txt)
txt - String - text for this control.public java.lang.String getText()
public ActionEvent handleKeyDown(int keyCode)
handleKeyDown in class BasicWidgetkey - int - key send to the control.ActionEventpublic void paint()
paint in class BasicWidget
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||