|
||||||||||
| 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.TextBox
Text box without a border.
BasicWidget,
UserWidget| Field Summary | |
protected int |
breakWidth
available width. |
protected java.lang.String |
delimiters
line break characters (delimiter). |
protected int[] |
lineBreaks
list of line breaks. |
protected int |
startLine
first line to display. |
protected java.lang.String |
text
string content. |
| Fields inherited from class brf.j2me.dynaworks.ui.BasicWidget |
g, h, w, x, y |
| Constructor Summary | |
TextBox(java.lang.String s,
int x,
int y,
int w,
int h)
constructor. |
|
| Method Summary | |
protected void |
computeLineBreaks()
prepare the text by breaking it into lines. |
protected int |
getBreakPos(int width,
java.lang.String buf)
Get the position of a line break so that the text fits into the given width. |
int |
getNumLines()
get the number of lines. |
java.lang.String |
getText()
get the text label. |
void |
paint()
Paint the user control. |
void |
setText(java.lang.String s)
set the text label. |
| 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 |
protected final java.lang.String delimiters
protected java.lang.String text
protected int[] lineBreaks
protected int breakWidth
protected int startLine
| Constructor Detail |
public TextBox(java.lang.String s,
int x,
int y,
int w,
int h)
text - String - content of the text box.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 setText(java.lang.String s)
txt - String - new text content of the control.public java.lang.String getText()
public int getNumLines()
public void paint()
paint in class BasicWidgetprotected void computeLineBreaks()
protected int getBreakPos(int width,
java.lang.String buf)
width - int - maximum width of line.buf - String - content to be split.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||