1 /*******************************************************************************
2 * Copyright (c) 2000, 2016 IBM Corporation and others.
4 * This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
9 * SPDX-License-Identifier: EPL-2.0
12 * IBM Corporation - initial API and implementation
13 *******************************************************************************/
14 package org.eclipse.swt.events;
18 * This adapter class provides default implementations for the
19 * methods described by the <code>SelectionListener</code> interface.
21 * Classes that wish to deal with <code>SelectionEvent</code>s can
22 * extend this class and override only the methods which they are
26 * An alternative to this class are the static helper methods
27 * {@link SelectionListener#widgetSelectedAdapter(java.util.function.Consumer)}
29 * {@link SelectionListener#widgetDefaultSelectedAdapter(java.util.function.Consumer)},
30 * which accept a lambda expression or a method reference that implements the event consumer.
33 * @see SelectionListener
35 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
37 public abstract class SelectionAdapter implements SelectionListener {
40 * Sent when selection occurs in the control.
41 * The default behavior is to do nothing.
43 * @param e an event containing information about the selection
46 public void widgetSelected(SelectionEvent e) {
50 * Sent when default selection occurs in the control.
51 * The default behavior is to do nothing.
53 * @param e an event containing information about the default selection
56 public void widgetDefaultSelected(SelectionEvent e) {