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);
  }
 


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

keyboard

public static Keyboard keyboard

calendar

public static Calendar calendar

numbersSet

public static final java.lang.String numbersSet
to be used in the setValidChars method

currencyCharsSet

public static final java.lang.String currencyCharsSet
to be used in the setValidChars method

dateSet

public static final java.lang.String dateSet
to be used in the setValidChars method

NORMAL

public static final byte NORMAL
to be used in the setMode method

DATE

public static final byte DATE
to be used in the setMode method

CURRENCY

public static final byte CURRENCY
to be used in the setMode method
Constructor Detail

Edit

public Edit()
Method Detail

setValidChars

public 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

setMode

public void setMode(byte mode)

isCharValid

protected boolean isCharValid(char c)

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.

onBoundsChanged

protected void onBoundsChanged()
Description copied from class: Control
called after an setRect. added by guich
Overrides:
onBoundsChanged in class 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

onWindowPaintFinished

protected void onWindowPaintFinished()
Description copied from class: Control
called after the window has finished a paint.
Overrides:
onWindowPaintFinished in class Control

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

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Returns the string representation of the object.
Overrides:
toString in class java.lang.Object