1 /******************************************************************************* 2 * Copyright (c) 2000, 2004 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>MouseListener</code> interface. 17 * <p> 18 * Classes that wish to deal with <code>MouseEvent</code>s 19 * which occur as mouse buttons are pressed and released can 20 * extend this class and override only the methods which they are 21 * interested in. 22 * </p> 23 * 24 * @see MouseListener 25 * @see MouseEvent 26 */ 27 public abstract class MouseAdapter implements MouseListener { 28 29 /** 30 * Sent when a mouse button is pressed twice within the 31 * (operating system specified) double click period. 32 * The default behavior is to do nothing. 33 * 34 * @param e an event containing information about the mouse double click 35 * 36 * @see org.eclipse.swt.widgets.Display#getDoubleClickTime() 37 */ 38 public void mouseDoubleClick(MouseEvent e) { 39 } 40 41 /** 42 * Sent when a mouse button is pressed. 43 * The default behavior is to do nothing. 44 * 45 * @param e an event containing information about the mouse button press 46 */ 47 public void mouseDown(MouseEvent e) { 48 } 49 50 /** 51 * Sent when a mouse button is released. 52 * The default behavior is to do nothing. 53 * 54 * @param e an event containing information about the mouse button release 55 */ 56 public void mouseUp(MouseEvent e) { 57 } 58 } 59