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.
-
MODE_CALC
- Numerical Calculation mode.
-
MODE_EXPR
- Expression evaluation mode.
-
MODE_GRAPH
- Graph plotting mode.
-
mode
- Current mode of the key pad.
-
KeyPad()
- Construct a key pad.
-
action(Event, Object)
- Called when a key is pressed.
-
getKey(String)
- Get a key from a string.
-
reset()
- Reset the keypad to empty input mode.
-
setCurrentMode(int)
- Setup current mode.
-
setDisplay(Display)
- Set calculator display.
-
setEchoArea(TextField)
- Set current key string echo label.
MODE_CALC
public final static int MODE_CALC
- Numerical Calculation mode.
MODE_EXPR
public final static int MODE_EXPR
- Expression evaluation mode.
MODE_GRAPH
public final static int MODE_GRAPH
- Graph plotting mode.
mode
public int mode
- Current mode of the key pad.
KeyPad
public KeyPad()
- Construct a key pad.
setEchoArea
public void setEchoArea(TextField echo)
- Set current key string echo label.
setDisplay
public void setDisplay(Display d)
- Set calculator display.
getKey
public Key getKey(String str)
- Get a key from a string.
reset
public void reset()
- Reset the keypad to empty input mode.
setCurrentMode
public void setCurrentMode(int m)
- Setup current mode. This involves setup correct sensitivity for
all keys on the pad.
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