Package org.eclipse.swt.events
Class KeyAdapter
- java.lang.Object
-
- org.eclipse.swt.events.KeyAdapter
-
- All Implemented Interfaces:
KeyListener
public abstract class KeyAdapter extends java.lang.Object implements KeyListener
This adapter class provides default implementations for the methods described by theKeyListenerinterface.Classes that wish to deal with
KeyEvents can extend this class and override only the methods which they are interested in.- Since:
- 1.2
- See Also:
KeyListener,KeyEvent
-
-
Constructor Summary
Constructors Constructor Description KeyAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidkeyPressed(KeyEvent e)Sent when a key is pressed on the system keyboard.voidkeyReleased(KeyEvent e)Sent when a key is released on the system keyboard.
-
-
-
Method Detail
-
keyPressed
public void keyPressed(KeyEvent e)
Sent when a key is pressed on the system keyboard. The default behavior is to do nothing.- Specified by:
keyPressedin interfaceKeyListener- Parameters:
e- an event containing information about the key press
-
keyReleased
public void keyReleased(KeyEvent e)
Sent when a key is released on the system keyboard. The default behavior is to do nothing.- Specified by:
keyReleasedin interfaceKeyListener- Parameters:
e- an event containing information about the key release
-
-