|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectp_abstractions.PaddleControllerAbstraction
p_controllers.PaddleController
public class PaddleController
Extends PaddleControllerAbstraction
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 | |
---|---|
PaddleController(PaddleSpecification rvPaddle)
|
Method Summary | |
---|---|
void |
keyTyped(java.awt.event.KeyEvent e)
Change direction when a key is typed |
Methods inherited from class p_abstractions.PaddleControllerAbstraction |
---|
keyPressed, keyReleased |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PaddleController(PaddleSpecification rvPaddle)
rvPaddle
- is the model to be controlled by the controllerMethod Detail |
---|
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
keyTyped
in class PaddleControllerAbstraction
e
- is the event generated by the keyboard
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |