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 |
java.lang.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(java.lang.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 |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Edit
public Edit()
getText
public java.lang.String getText()
- Returns the text displayed in the edit control.
setText
public void setText(java.lang.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
- Tags copied from class: 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
- Tags copied from class: Control
- Parameters:
g
- the graphics object for drawing- See Also:
Graphics