Class ui.KeyPad
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ui.KeyPad

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----ui.KeyPad

public class KeyPad
extends Panel
A calculator key pad.

Variable Index

 o MODE_CALC
Numerical Calculation mode.
 o MODE_EXPR
Expression evaluation mode.
 o MODE_GRAPH
Graph plotting mode.
 o mode
Current mode of the key pad.

Constructor Index

 o KeyPad()
Construct a key pad.

Method Index

 o action(Event, Object)
Called when a key is pressed.
 o getKey(String)
Get a key from a string.
 o reset()
Reset the keypad to empty input mode.
 o setCurrentMode(int)
Setup current mode.
 o setDisplay(Display)
Set calculator display.
 o setEchoArea(TextField)
Set current key string echo label.

Variables

 o MODE_CALC
  public final static int MODE_CALC
Numerical Calculation mode.
 o MODE_EXPR
  public final static int MODE_EXPR
Expression evaluation mode.
 o MODE_GRAPH
  public final static int MODE_GRAPH
Graph plotting mode.
 o mode
  public int mode
Current mode of the key pad.

Constructors

 o KeyPad
  public KeyPad()
Construct a key pad.

Methods

 o setEchoArea
  public void setEchoArea(TextField echo)
Set current key string echo label.
 o setDisplay
  public void setDisplay(Display d)
Set calculator display.
 o getKey
  public Key getKey(String str)
Get a key from a string.
 o reset
  public void reset()
Reset the keypad to empty input mode.
 o setCurrentMode
  public void setCurrentMode(int m)
Setup current mode. This involves setup correct sensitivity for all keys on the pad.
 o action
  public boolean action(Event evt,
                        Object arg)
Called when a key is pressed.
Overrides:
action in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index