2
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2005 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 module org.eclipse.swt.events.SelectionListener;
|
|
12
|
|
13
|
3
|
14 public import org.eclipse.swt.internal.SWTEventListener;
|
|
15 public import org.eclipse.swt.events.SelectionEvent;
|
2
|
16
|
|
17 /**
|
|
18 * Classes which implement this interface provide methods
|
|
19 * that deal with the events that are generated when selection
|
|
20 * occurs in a control.
|
|
21 * <p>
|
|
22 * After creating an instance of a class that :
|
|
23 * this interface it can be added to a control using the
|
|
24 * <code>addSelectionListener</code> method and removed using
|
|
25 * the <code>removeSelectionListener</code> method. When
|
|
26 * selection occurs in a control the appropriate method
|
|
27 * will be invoked.
|
|
28 * </p>
|
|
29 *
|
|
30 * @see SelectionAdapter
|
|
31 * @see SelectionEvent
|
|
32 */
|
|
33 public interface SelectionListener : SWTEventListener {
|
|
34
|
|
35 /**
|
|
36 * Sent when selection occurs in the control.
|
|
37 * <p>
|
|
38 * For example, selection occurs in a List when the user selects
|
|
39 * an item or items with the keyboard or mouse. On some platforms,
|
|
40 * the event occurs when a mouse button or key is pressed. On others,
|
|
41 * it happens when the mouse or key is released. The exact key or
|
|
42 * mouse gesture that causes this event is platform specific.
|
|
43 * </p>
|
|
44 *
|
|
45 * @param e an event containing information about the selection
|
|
46 */
|
|
47 public void widgetSelected(SelectionEvent e);
|
|
48
|
|
49 /**
|
|
50 * Sent when default selection occurs in the control.
|
|
51 * <p>
|
|
52 * For example, on some platforms default selection occurs in a List
|
|
53 * when the user double-clicks an item or types return in a Text.
|
|
54 * On some platforms, the event occurs when a mouse button or key is
|
|
55 * pressed. On others, it happens when the mouse or key is released.
|
|
56 * The exact key or mouse gesture that causes this event is platform
|
|
57 * specific.
|
|
58 * </p>
|
|
59 *
|
|
60 * @param e an event containing information about the default selection
|
|
61 */
|
|
62 public void widgetDefaultSelected(SelectionEvent e);
|
|
63 }
|