de.fhpotsdam.unfolding.interactions
Class KeyboardHandler

java.lang.Object
  extended by de.fhpotsdam.unfolding.events.MapEventBroadcaster
      extended by de.fhpotsdam.unfolding.interactions.KeyboardHandler

public class KeyboardHandler
extends MapEventBroadcaster

Handles keyboard input from the user and broadcasts MapEvents such as zoom and pan.


Field Summary
 
Fields inherited from class de.fhpotsdam.unfolding.events.MapEventBroadcaster
eventDispatcher, maps
 
Constructor Summary
KeyboardHandler(processing.core.PApplet p, java.util.List<UnfoldingMap> maps)
          Creates a KeyboardHandler for the given maps.
KeyboardHandler(processing.core.PApplet p, UnfoldingMap... maps)
          Creates a KeyboardHandler for the given maps.
 
Method Summary
 void keyEvent(processing.event.KeyEvent keyEvent)
           
 void keyPressed(char key, int keyCode)
           
 void keyReleased(char key, int keyCode)
           
 
Methods inherited from class de.fhpotsdam.unfolding.events.MapEventBroadcaster
setEventDispatcher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyboardHandler

public KeyboardHandler(processing.core.PApplet p,
                       UnfoldingMap... maps)
Creates a KeyboardHandler for the given maps.

Parameters:
p - The PApplet.
maps - One or more maps.

KeyboardHandler

public KeyboardHandler(processing.core.PApplet p,
                       java.util.List<UnfoldingMap> maps)
Creates a KeyboardHandler for the given maps.

Parameters:
p - The PApplet.
maps - A list of maps.
Method Detail

keyPressed

public void keyPressed(char key,
                       int keyCode)

keyReleased

public void keyReleased(char key,
                        int keyCode)

keyEvent

public void keyEvent(processing.event.KeyEvent keyEvent)