java::awt::event::KeyAdapter Class Reference

Inheritance diagram for java::awt::event::KeyAdapter:

Inheritance graph
java::awt::event::KeyListenerjava::util::EventListenerjava::lang::Interfacejava::lang::Object
[legend]
Collaboration diagram for java::awt::event::KeyAdapter:

Collaboration graph
java::awt::event::KeyListenerjava::util::EventListenerjava::lang::Interfacejava::lang::Object
[legend]

List of all members.


Detailed Description

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 can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a component using the component's addKeyListener method. When a key is pressed, released, or typed (pressed and released), the relevant method in the listener object is invoked, and the KeyEvent is passed to it.

Author:
Carl Quinn
Version:
1.15 01/23/03
See also:
KeyEvent

KeyListener

Tutorial: Writing a Key Listener

Reference: The Java Class Libraries (update file)

Since:
1.1

Public Member Functions

virtual void keyTyped (const KeyEvent &e)
 Invoked when a key has been typed.
virtual void keyPressed (const KeyEvent &e)
 Invoked when a key has been pressed.
virtual void keyReleased (const KeyEvent &e)
 Invoked when a key has been released.

Member Function Documentation

virtual void java::awt::event::KeyAdapter::keyTyped ( const KeyEvent e  )  [virtual]

Invoked when a key has been typed.

See the class description for KeyEvent for a definition of a key typed event.

Implements java::awt::event::KeyListener.

virtual void java::awt::event::KeyAdapter::keyPressed ( const KeyEvent e  )  [virtual]

Invoked when a key has been pressed.

See the class description for KeyEvent for a definition of a key pressed event.

Implements java::awt::event::KeyListener.

virtual void java::awt::event::KeyAdapter::keyReleased ( const KeyEvent e  )  [virtual]

Invoked when a key has been released.

See the class description for KeyEvent for a definition of a key released event.

Implements java::awt::event::KeyListener.


The documentation for this class was generated from the following file:
Generated on Fri May 16 11:56:17 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3