shp_renderer.events
Class SHPKeyHandler

java.lang.Object
  extended by shp_renderer.events.SHPKeyHandler
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener

public class SHPKeyHandler
extends java.lang.Object
implements java.awt.event.KeyListener

SHPKeyHandler - This event handler responds to key presses such that the user may navigate about the map.

Author:
Richard McKenna

Constructor Summary
SHPKeyHandler(SHPViewer initViewer)
          We must have the app when we construct this object.
 
Method Summary
 void keyPressed(java.awt.event.KeyEvent ke)
          Here is where we respond to key presses.
 void keyReleased(java.awt.event.KeyEvent ke)
           
 void keyTyped(java.awt.event.KeyEvent ke)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SHPKeyHandler

public SHPKeyHandler(SHPViewer initViewer)
We must have the app when we construct this object.

Parameters:
initViewer - The viewer to be updated.
Method Detail

keyPressed

public void keyPressed(java.awt.event.KeyEvent ke)
Here is where we respond to key presses. Note that in this application we only care about key presses, not releases.

Specified by:
keyPressed in interface java.awt.event.KeyListener
Parameters:
ke - All the information about the keys.

keyReleased

public void keyReleased(java.awt.event.KeyEvent ke)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent ke)
Specified by:
keyTyped in interface java.awt.event.KeyListener