|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.monkeycoder.monkeynes.gui.NesControllerKeyListener
This class converts key events into the appropriate button presses on a controller.
Originally part of the MonkeyNES project.
| Constructor Summary | |
NesControllerKeyListener(NesController inPad1,
NesController inPad2)
Creates a new NesControllerKeyListener and tells it what controllers are in the 2 controller ports. |
|
| Method Summary | |
void |
keyPressed(KeyEvent ke)
Called when a key presseed event occurs. |
void |
keyReleased(KeyEvent ke)
Called when a key released event occurs. |
void |
keyTyped(KeyEvent ke)
Called when a key typed event occurs. |
void |
setPowerOn(boolean inPower)
Called to tell the key listener whether power is on or off. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NesControllerKeyListener(NesController inPad1,
NesController inPad2)
inPad1 - The controller plugged into port 1.inPad2 - The controller plugged into port 2.| Method Detail |
public void setPowerOn(boolean inPower)
inPower - The new power state for this listener.public void keyPressed(KeyEvent ke)
keyPressed in interface KeyListenerke - The key event that just happened.public void keyReleased(KeyEvent ke)
keyReleased in interface KeyListenerke - The key event that just happened.public void keyTyped(KeyEvent ke)
keyTyped in interface KeyListenerke - The key event that just happened.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||