p_abstractions
Class PaddleControllerAbstraction

java.lang.Object
  extended by p_abstractions.PaddleControllerAbstraction
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener
Direct Known Subclasses:
PaddleController

public abstract class PaddleControllerAbstraction
extends java.lang.Object
implements java.awt.event.KeyListener

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.

Version:
1.0.0
Author:
J Paul Gibson

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

PaddleControllerAbstraction

public PaddleControllerAbstraction()
Method Detail

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Should not react to key presses

Specified by:
keyPressed in interface java.awt.event.KeyListener
Parameters:
e - is the event generated by the keyboard

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Should not react to key releases

Specified by:
keyReleased in interface java.awt.event.KeyListener
Parameters:
e - is the event generated by the keyboard

keyTyped

public abstract void keyTyped(java.awt.event.KeyEvent e)
Should react to key typing (press and release)

Specified by:
keyTyped in interface java.awt.event.KeyListener
Parameters:
e - is the event generated by the keyboard