]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/events/MouseTrackAdapter.java
52664798e82605542eef452085670bf67ee90982
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / events / MouseTrackAdapter.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2017 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.events;
15
16
17 /**
18  * This adapter class provides default implementations for the
19  * methods described by the <code>MouseTrackListener</code> interface.
20  * <p>
21  * Classes that wish to deal with <code>MouseEvent</code>s which
22  * occur as the mouse pointer passes (or hovers) over controls can
23  * extend this class and override only the methods which they are
24  * interested in.
25  * </p>
26  * <p>
27  * An alternative to this class are the static helper methods
28  * {@link MouseTrackListener#mouseEnterAdapter(java.util.function.Consumer)},
29  * {@link MouseTrackListener#mouseExitAdapter(java.util.function.Consumer)}
30  * and
31  * {@link MouseTrackListener#mouseHoverAdapter(java.util.function.Consumer)},
32  * which accept a lambda expression or a method reference that implements the event consumer.
33  * </p>
34  *
35  * @see MouseTrackListener
36  * @see MouseEvent
37  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
38  */
39 public abstract class MouseTrackAdapter implements MouseTrackListener {
40
41 /**
42  * Sent when the mouse pointer passes into the area of
43  * the screen covered by a control.
44  * The default behavior is to do nothing.
45  *
46  * @param e an event containing information about the mouse enter
47  */
48 @Override
49 public void mouseEnter(MouseEvent e) {
50 }
51
52 /**
53  * Sent when the mouse pointer passes out of the area of
54  * the screen covered by a control.
55  * The default behavior is to do nothing.
56  *
57  * @param e an event containing information about the mouse exit
58  */
59 @Override
60 public void mouseExit(MouseEvent e) {
61 }
62
63 /**
64  * Sent when the mouse pointer hovers (that is, stops moving
65  * for an (operating system specified) period of time) over
66  * a control.
67  * The default behavior is to do nothing.
68  *
69  * @param e an event containing information about the hover
70  */
71 @Override
72 public void mouseHover(MouseEvent e) {
73 }
74 }