1 /*
2 * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
46 * @author Amy Fowler
47 *
48 * @see MouseMotionAdapter
49 * @see MouseEvent
50 * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
51 *
52 * @since 1.1
53 */
54 public interface MouseMotionListener extends EventListener {
55
56 /**
57 * Invoked when a mouse button is pressed on a component and then
58 * dragged. <code>MOUSE_DRAGGED</code> events will continue to be
59 * delivered to the component where the drag originated until the
60 * mouse button is released (regardless of whether the mouse position
61 * is within the bounds of the component).
62 * <p>
63 * Due to platform-dependent Drag&Drop implementations,
64 * <code>MOUSE_DRAGGED</code> events may not be delivered during a native
65 * Drag&Drop operation.
66 */
67 public void mouseDragged(MouseEvent e);
68
69 /**
70 * Invoked when the mouse cursor has been moved onto a component
71 * but no buttons have been pushed.
72 */
73 public void mouseMoved(MouseEvent e);
74
75 }
|
1 /*
2 * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
46 * @author Amy Fowler
47 *
48 * @see MouseMotionAdapter
49 * @see MouseEvent
50 * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
51 *
52 * @since 1.1
53 */
54 public interface MouseMotionListener extends EventListener {
55
56 /**
57 * Invoked when a mouse button is pressed on a component and then
58 * dragged. <code>MOUSE_DRAGGED</code> events will continue to be
59 * delivered to the component where the drag originated until the
60 * mouse button is released (regardless of whether the mouse position
61 * is within the bounds of the component).
62 * <p>
63 * Due to platform-dependent Drag&Drop implementations,
64 * <code>MOUSE_DRAGGED</code> events may not be delivered during a native
65 * Drag&Drop operation.
66 * @param e the event to be processed
67 */
68 public void mouseDragged(MouseEvent e);
69
70 /**
71 * Invoked when the mouse cursor has been moved onto a component
72 * but no buttons have been pushed.
73 * @param e the event to be processed
74 */
75 public void mouseMoved(MouseEvent e);
76
77 }
|