|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--waba.ui.Control | +--waba.ui.Edit
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); }
Field Summary | |
static Calendar |
calendar
|
static byte |
CURRENCY
to be used in the setMode method |
static java.lang.String |
currencyCharsSet
to be used in the setValidChars method |
static byte |
DATE
to be used in the setMode method |
static java.lang.String |
dateSet
to be used in the setValidChars method |
static Keyboard |
keyboard
|
static byte |
NORMAL
to be used in the setMode method |
static java.lang.String |
numbersSet
to be used in the setValidChars method |
Fields inherited from class waba.ui.Control |
BOTTOM,
CENTER,
controlCount,
enabled,
FILL,
fm,
font,
height,
LEFT,
name,
next,
parent,
PREFERRED,
prev,
RIGHT,
TOP,
width,
x,
y |
Constructor Summary | |
Edit()
|
Method Summary | |
java.lang.String |
getText()
Returns the text displayed in the edit control. |
protected boolean |
isCharValid(char c)
|
protected void |
onBoundsChanged()
called after an setRect. added by guich |
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. |
protected void |
onWindowPaintFinished()
called after the window has finished a paint. |
void |
setMode(byte mode)
|
void |
setText(java.lang.String s)
Sets the text displayed in the edit control. |
void |
setValidChars(java.lang.String validCharsString)
sets the valid chars that can be entered in this edit. if null is passed, any char can be entered. (case insensitive). added by guich |
java.lang.String |
toString()
Returns the string representation of the object. |
Methods inherited from class waba.ui.Control |
addTimer,
contains,
createGraphics,
getAbsoluteRect,
getFontMetrics,
getNext,
getParent,
getPreferredHeight,
getPreferredWidth,
getRect,
isEnabled,
isVisible,
postEvent,
removeTimer,
repaint,
repaintNow,
setEnabled,
setFont,
setRect,
setRect,
setVisible |
Methods inherited from class java.lang.Object |
hashCode |
Field Detail |
public static Keyboard keyboard
public static Calendar calendar
public static final java.lang.String numbersSet
public static final java.lang.String currencyCharsSet
public static final java.lang.String dateSet
public static final byte NORMAL
public static final byte DATE
public static final byte CURRENCY
Constructor Detail |
public Edit()
Method Detail |
public void setValidChars(java.lang.String validCharsString)
public void setMode(byte mode)
protected boolean isCharValid(char c)
public java.lang.String getText()
public void setText(java.lang.String s)
protected void onBoundsChanged()
public void onEvent(Event event)
event
- the event to processEvent
,
KeyEvent
,
PenEvent
protected void onWindowPaintFinished()
public void onPaint(Graphics g)
g
- the graphics object for drawingGraphics
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |