|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.razvan.jzx.BaseComponent
org.razvan.jzx.BaseKeyboard
public class BaseKeyboard
Base class extended by all Keyboard components that comprise the emulator.
There are currently no children of this class, so all keyboard functionality is included in this class.
| Field Summary | |
|---|---|
protected static int |
JOY_DOWN
Joystick DOWN event = Keypad 2 |
protected static int |
JOY_FIRE
Joystick FIRE event = Keypad 0 |
protected static int |
JOY_LEFT
Joystick LEFT event = Keypad 4 |
protected static int |
JOY_RIGHT
Joystick RIGHT event = Keypad 5 |
protected static int |
JOY_UP
Joystick UP event = Keypad 8 |
protected BaseIO |
m_io
Cached reference to the I/O component. |
protected static int[][] |
m_keyTable
Maps ASCII keys to a keyboard row and bit to set/reset. |
protected BaseScreen |
m_screen
|
protected boolean |
m_unshiftCursor
Is the cursor currently in SHIFT mode? |
| Fields inherited from class org.razvan.jzx.BaseComponent |
|---|
m_logger, m_spectrum |
| Constructor Summary | |
|---|---|
BaseKeyboard()
|
|
| Method Summary | |
|---|---|
void |
init(BaseSpectrum spectrum,
ILogger logger)
Cache the reference to the I/O component. |
void |
keyPressed(java.awt.event.KeyEvent kevent)
Modify the I/O ports in accordance with the key that was pressed. |
void |
keyReleased(java.awt.event.KeyEvent kevent)
Modify the I/O ports in accordance with the key that was released. |
void |
keyTyped(java.awt.event.KeyEvent kevent)
Does nothing. |
void |
load(BaseLoader loader)
Does nothing. |
void |
reset()
Does nothing. |
void |
terminate()
Releases the cached I/O component reference. |
| Methods inherited from class org.razvan.jzx.BaseComponent |
|---|
getSpectrum |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int JOY_UP
protected static final int JOY_DOWN
protected static final int JOY_LEFT
protected static final int JOY_RIGHT
protected static final int JOY_FIRE
protected static final int[][] m_keyTable
e.g. m_keyTable['a'] means set/reset bit 0 (0xfe) of keyboard row 1. Keyboard row 8 (in the table below) means "unused". TODO: finish implementing remaining keys
protected boolean m_unshiftCursor
protected BaseIO m_io
This is used to alter the keyboard port array.
protected BaseScreen m_screen
| Constructor Detail |
|---|
public BaseKeyboard()
| Method Detail |
|---|
public void init(BaseSpectrum spectrum,
ILogger logger)
init in class BaseComponentpublic void reset()
reset in class BaseComponentpublic void terminate()
terminate in class BaseComponentpublic void keyTyped(java.awt.event.KeyEvent kevent)
Must exist in order for this class to be able to implement the KeyListener interface.
keyTyped in interface java.awt.event.KeyListenerpublic void keyPressed(java.awt.event.KeyEvent kevent)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent kevent)
keyReleased in interface java.awt.event.KeyListenerpublic void load(BaseLoader loader)
No keyboard state is saved, so there is nothing to load.
load in class BaseComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||