|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectp_abstractions.PaddleControllerAbstraction
public abstract class PaddleControllerAbstraction
Implements KeyListener
Specification of a simple paddle controller for use in a video game.
Typing a character on the keyboard changes direction of movement of the Paddle.
For teaching MVC design pattern.
Constructor Summary | |
---|---|
PaddleControllerAbstraction()
|
Method Summary | |
---|---|
void |
keyPressed(java.awt.event.KeyEvent e)
Should not react to key presses |
void |
keyReleased(java.awt.event.KeyEvent e)
Should not react to key releases |
abstract void |
keyTyped(java.awt.event.KeyEvent e)
Should react to key typing (press and release) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PaddleControllerAbstraction()
Method Detail |
---|
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
e
- is the event generated by the keyboardpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
e
- is the event generated by the keyboardpublic abstract void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
e
- is the event generated by the keyboard
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |