1 /******************************************************************************* 2 * Copyright (c) 2000, 2003 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.swt.events; 12 13 14 /** 15 * This adapter class provides default implementations for the 16 * methods described by the <code>KeyListener</code> interface. 17 * <p> 18 * Classes that wish to deal with <code>KeyEvent</code>s can 19 * extend this class and override only the methods which they are 20 * interested in. 21 * </p> 22 * 23 * @see KeyListener 24 * @see KeyEvent 25 */ 26 public abstract class KeyAdapter implements KeyListener { 27 28 /** 29 * Sent when a key is pressed on the system keyboard. 30 * The default behavior is to do nothing. 31 * 32 * @param e an event containing information about the key press 33 */ 34 public void keyPressed(KeyEvent e) { 35 } 36 37 /** 38 * Sent when a key is released on the system keyboard. 39 * The default behavior is to do nothing. 40 * 41 * @param e an event containing information about the key release 42 */ 43 public void keyReleased(KeyEvent e) { 44 } 45 } 46