java.awt.event
Class KeyAdapter

java.lang.Object
  extended by java.awt.event.KeyAdapter
All Implemented Interfaces:
KeyListener, EventListener
Direct Known Subclasses:
BasicComboBoxUI.KeyHandler, BasicComboPopup.InvocationKeyHandler, BasicTreeUI.KeyHandler

public abstract class KeyAdapter
extends Object
implements KeyListener

This class implements KeyListener and implements all methods with empty bodies. This allows a listener interested in implementing only a subset of the KeyListener interface to extend this class and override only the desired methods.

Since:
1.1
See Also:
KeyEvent, KeyListener

Constructor Summary
KeyAdapter()
          Do nothing default constructor for subclasses.
 
Method Summary
 void keyPressed(KeyEvent event)
          Implements this method in the interface with an empty body.
 void keyReleased(KeyEvent event)
          Implements this method in the interface with an empty body.
 void keyTyped(KeyEvent event)
          Implements this method in the interface with an empty body.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyAdapter

public KeyAdapter()
Do nothing default constructor for subclasses.

Method Detail

keyTyped

public void keyTyped(KeyEvent event)
Implements this method in the interface with an empty body.

Specified by:
keyTyped in interface KeyListener
Parameters:
event - the event, ignored in this implementation

keyPressed

public void keyPressed(KeyEvent event)
Implements this method in the interface with an empty body.

Specified by:
keyPressed in interface KeyListener
Parameters:
event - the event, ignored in this implementation

keyReleased

public void keyReleased(KeyEvent event)
Implements this method in the interface with an empty body.

Specified by:
keyReleased in interface KeyListener
Parameters:
event - the event, ignored in this implementation