|
|||||||||
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 ch.aplu.gidlet.MTextBox
public class MTextBox
TextBox display for full screen input and output. Text may be edited using the
platform's editing capabilities.
A soft button 'Exit' is shown. Hitting the corresponding key will
call the Gidlet's doExit(). If you do not need this button,
invoke removeExitButton().
If you implement your own CommandListener and call setCommandListener(), the internal
CommandListener is disabled.
main() serves as entry point for the user programm. It is called in the run-method
of a separate thread and should terminate to avoid non-terminated threads.
Creation may take place within main() or when declaring instance variables
of the application program.
Constructor Summary | |
---|---|
MTextBox(java.lang.String title)
Constructs a MTextBox with given title and no initial text. |
|
MTextBox(java.lang.String title,
java.lang.String text)
Constructs a MTextBox with given title and given initial text. |
Method Summary | |
---|---|
void |
addOkButton()
Adds an OK soft button with label "OK". |
void |
addOkButton(java.lang.String label)
Adds an OK soft button with given label. |
void |
appendText(java.lang.String text)
Appends given text to current content. |
java.lang.String |
getText()
Returns current content. |
void |
removeExitButton()
Removes Exit soft button. |
void |
removeOkButton()
Removes Ok soft button. |
void |
setText(java.lang.String text)
Writes given text replacing the previous content. |
void |
show()
Shows the form display if it is not yet visible or it was previously hidden by another display. |
void |
show(boolean wait)
Shows the form display if it is not yet visible or it was previously hidden by another display. |
Methods inherited from class javax.microedition.lcdui.TextBox |
---|
delete, getCaretPosition, getChars, getConstraints, getMaxSize, getString, insert, insert, setChars, setConstraints, setInitialInputMode, setMaxSize, setString, setTicker, setTitle, size |
Methods inherited from class javax.microedition.lcdui.Displayable |
---|
addCommand, getHeight, getTicker, getTitle, getWidth, isShown, removeCommand, setCommandListener, sizeChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MTextBox(java.lang.String title, java.lang.String text)
public MTextBox(java.lang.String title)
Method Detail |
---|
public void show()
public void show(boolean wait)
public java.lang.String getText()
public void setText(java.lang.String text)
public void appendText(java.lang.String text)
public void addOkButton()
public void addOkButton(java.lang.String label)
public void removeExitButton()
public void removeOkButton()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |