]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/widgets/Listener.java
Remove invalid SHA-256-Digests
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / widgets / Listener.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2011 IBM Corporation and others.
3  *
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/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.swt.widgets;
15
16
17 /**
18  * Implementers of <code>Listener</code> provide a simple
19  * <code>handleEvent()</code> method that is used internally
20  * by SWT to dispatch events.
21  * <p>
22  * After creating an instance of a class that implements this interface
23  * it can be added to a widget using the
24  * <code>addListener(int eventType, Listener handler)</code> method and
25  * removed using the
26  * <code>removeListener (int eventType, Listener handler)</code> method.
27  * When the specified event occurs, <code>handleEvent(...)</code> will
28  * be sent to the instance.
29  * </p>
30  * <p>
31  * Classes which implement this interface are described within SWT as
32  * providing the <em>untyped listener</em> API. Typically, widgets will
33  * also provide a higher-level <em>typed listener</em> API, that is based
34  * on the standard <code>java.util.EventListener</code> pattern.
35  * </p>
36  * <p>
37  * Note that, since all internal SWT event dispatching is based on untyped
38  * listeners, it is simple to build subsets of SWT for use on memory
39  * constrained, small footprint devices, by removing the classes and
40  * methods which implement the typed listener API.
41  * </p>
42  *
43  * @see Widget#addListener
44  * @see java.util.EventListener
45  * @see org.eclipse.swt.events
46  */
47 public interface Listener {
48
49 /**
50  * Sent when an event that the receiver has registered for occurs.
51  *
52  * @param event the event which occurred
53  */
54 void handleEvent (Event event);
55 }