waba.ui
Class Edit
java.lang.Object
|
+--waba.ui.Control
|
+--waba.ui.Edit
- public class Edit
- extends Control
Edit is a text entry control.
Here is an example showing an edit control being used:
public class MyProgram extends MainWindow
{
Edit edit;
public void onStart()
{
edit = new Edit();
edit.setRect(10, 10, 80, 30);
add(edit);
}
|
Constructor Summary |
Edit()
|
|
Method Summary |
String |
getText()
Returns the text displayed in the edit control. |
void |
onEvent(Event event)
Called by the system to pass events to the edit control. |
void |
onPaint(Graphics g)
Called by the system to draw the edit control. |
void |
setText(String s)
Sets the text displayed in the edit control. |
| Methods inherited from class waba.ui.Control |
addTimer, contains, createGraphics, getFontMetrics, getNext, getParent, getRect, postEvent, removeTimer, repaint, setRect |
Edit
public Edit()
getText
public String getText()
- Returns the text displayed in the edit control.
setText
public void setText(String s)
- Sets the text displayed in the edit control.
onEvent
public void onEvent(Event event)
- Called by the system to pass events to the edit control.
- Overrides:
onEvent in class Control
- Following copied from class:
waba.ui.Control
- Parameters:
event - the event to process- See Also:
Event,
KeyEvent,
PenEvent
onPaint
public void onPaint(Graphics g)
- Called by the system to draw the edit control.
- Overrides:
onPaint in class Control
- Following copied from class:
waba.ui.Control
- Parameters:
g - the graphics object for drawing- See Also:
Graphics