ch.aplu.jgamegrid
Interface GGKeyListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
GGKeyAdapter

public interface GGKeyListener
extends java.util.EventListener

Declarations of the notification method called when a key is pressed or released.


Method Summary
 boolean keyPressed(java.awt.event.KeyEvent evt)
          Event callback method called when a key is pressed.
 boolean keyReleased(java.awt.event.KeyEvent evt)
          Event callback method called when a key is released.
 

Method Detail

keyPressed

boolean keyPressed(java.awt.event.KeyEvent evt)
Event callback method called when a key is pressed. If the key is held down, there is a delay and the callback is called periodically. If you do not want the initial delay, use a GGKeyRepeatListener.

Parameters:
evt - the KeyEvent that gives information about the key
Returns:
true, if the key is consumed, so following listeners in the GGKeyListener sequence will not get the event

keyReleased

boolean keyReleased(java.awt.event.KeyEvent evt)
Event callback method called when a key is released.

Parameters:
evt - the KeyEvent that gives information about the key
Returns:
true, if the key is consumed, so following listeners in the GGKeyListener sequence will not get the event