fr.umlv.remix
Interface KeyHandler


public interface KeyHandler

The KeyHandler which will be called by the Arena in case of key events such as key pressed, released or typed


Method Summary
 javax.swing.JFrame getParentFrame()
          returns the JFrame which will be listening for KeyEvent.
 void keyPressed(char key)
          keyPressed is called when a key is pressed.
 void keyReleased(char key)
          keyReleased is called when a key is released.
 void keyTyped(char key)
          keyTyped is called when a key has been typed.
 

Method Detail

getParentFrame

javax.swing.JFrame getParentFrame()
returns the JFrame which will be listening for KeyEvent.

Returns:
a JFrame

keyPressed

void keyPressed(char key)
keyPressed is called when a key is pressed.

Parameters:
key - is the character associated with the key in this event. For example, the KEY_TYPED event for shift + "a" returns the value for "A". It corresponds to the Unicode character defined for this key event. If no valid Unicode character exists for this key event, CHAR_UNDEFINED is returned.

keyReleased

void keyReleased(char key)
keyReleased is called when a key is released.

Parameters:
key - is the character associated with the key in this event. For example, the KEY_TYPED event for shift + "a" returns the value for "A". It corresponds to the Unicode character defined for this key event. If no valid Unicode character exists for this key event, CHAR_UNDEFINED is returned.

keyTyped

void keyTyped(char key)
keyTyped is called when a key has been typed.

Parameters:
key - is the character associated with the key in this event. For example, the KEY_TYPED event for shift + "a" returns the value for "A". It corresponds to the Unicode character defined for this key event. If no valid Unicode character exists for this key event, CHAR_UNDEFINED is returned.