com.webrenderer.event
Interface KeyListener

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

public interface KeyListener
extends java.util.EventListener

The listener interface for receiving keyboard events such as key presses.

This listener should not be confused with java.awt.event.KeyListener. You should explicitly use com.webrenderer.event.KeyListener

e.g:
browser.addKeyListener(new com.webrenderer.event.KeyListener(){...});

The class that is interested in processing a keyboard event either implements this interface (and all the methods it contains) or extends the abstract KeyAdapter class (overriding only the methods of interest).

The listener object created from that class is then registered with an IBrowserCanvas using the addKeyListener method.


Method Summary
 void onKeyDown(KeyEvent e)
          Invoked when a key is pushed down.
 void onKeyPress(KeyEvent e)
          Invoked when a character is typed.
 void onKeyUp(KeyEvent e)
          Invoked when a key is released.
 

Method Detail

onKeyDown

public void onKeyDown(KeyEvent e)
Invoked when a key is pushed down.


onKeyUp

public void onKeyUp(KeyEvent e)
Invoked when a key is released.


onKeyPress

public void onKeyPress(KeyEvent e)
Invoked when a character is typed.