com.webrenderer.se.event.internal
Class KeyAdapter

java.lang.Object
  extended by com.webrenderer.se.event.internal.KeyAdapter
All Implemented Interfaces:
KeyListener, java.util.EventListener

public abstract class KeyAdapter
extends java.lang.Object
implements KeyListener

An abstract adapter class for receiving keyboard events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a KeyEvent listener and override the methods for the events of interest. (If you implement the KeyListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a browser using the browser's addKeyListener method. When a keyboard event occurs, the relevant method in the listener object is invoked and the KeyEvent is passed to it.


Constructor Summary
KeyAdapter()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyAdapter

public KeyAdapter()
Method Detail

onKeyDown

public void onKeyDown(KeyEvent e)
Description copied from interface: KeyListener
Invoked when a key is pushed down.

Specified by:
onKeyDown in interface KeyListener

onKeyUp

public void onKeyUp(KeyEvent e)
Description copied from interface: KeyListener
Invoked when a key is released.

Specified by:
onKeyUp in interface KeyListener

onKeyPress

public void onKeyPress(KeyEvent e)
Description copied from interface: KeyListener
Invoked when a character is typed.

Specified by:
onKeyPress in interface KeyListener