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 import org.eclipse.swt.internal.SWTEventListener; 15 16 /** 17 * Classes which implement this interface provide methods 18 * that deal with the events that are generated as mouse buttons 19 * are pressed. 20 * <p> 21 * After creating an instance of a class that implements 22 * this interface it can be added to a control using the 23 * <code>addMouseListener</code> method and removed using 24 * the <code>removeMouseListener</code> method. When a 25 * mouse button is pressed or released, the appropriate method 26 * will be invoked. 27 * </p> 28 * 29 * @see MouseAdapter 30 * @see MouseEvent 31 */ 32 public interface MouseListener extends SWTEventListener { 33 34 /** 35 * Sent when a mouse button is pressed twice within the 36 * (operating system specified) double click period. 37 * 38 * @param e an event containing information about the mouse double click 39 * 40 * @see org.eclipse.swt.widgets.Display#getDoubleClickTime() 41 */ 42 public void mouseDoubleClick(MouseEvent e); 43 44 /** 45 * Sent when a mouse button is pressed. 46 * 47 * @param e an event containing information about the mouse button press 48 */ 49 public void mouseDown(MouseEvent e); 50 51 /** 52 * Sent when a mouse button is released. 53 * 54 * @param e an event containing information about the mouse button release 55 */ 56 public void mouseUp(MouseEvent e); 57 } 58