1 |
/* MouseListener.java -- Listen for mouse events other than motion |
/* MouseListener.java -- listen for mouse clicks and crossing component edges |
2 |
Copyright (C) 1999 Free Software Foundation, Inc. |
Copyright (C) 1999, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
38 |
|
|
39 |
package java.awt.event; |
package java.awt.event; |
40 |
|
|
41 |
/** |
import java.util.EventListener; |
|
* This interface is for classes that wish to receive mouse events other |
|
|
* than simple motion events. |
|
|
* |
|
|
* @author Aaron M. Renn (arenn@urbanophile.com) |
|
|
*/ |
|
|
public interface MouseListener extends java.util.EventListener |
|
|
{ |
|
|
|
|
|
/** |
|
|
* This method is called when the mouse is clicked on a component. |
|
|
* |
|
|
* @param event The <code>MouseEvent</code> indicating the click. |
|
|
*/ |
|
|
public abstract void |
|
|
mouseClicked(MouseEvent event); |
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
|
/** |
|
|
* This method is called when the mouse enters a component. |
|
|
* |
|
|
* @param event The <code>MouseEvent</code> for the entry. |
|
|
*/ |
|
|
public abstract void |
|
|
mouseEntered(MouseEvent event); |
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
|
/** |
|
|
* This method is called when the mouse exits a component. |
|
|
* |
|
|
* @param event The <code>MouseEvent</code> for the exit. |
|
|
*/ |
|
|
public abstract void |
|
|
mouseExited(MouseEvent event); |
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
|
/** |
|
|
* This method is called when the mouse is pressed over a component. |
|
|
* |
|
|
* @param event The <code>MouseEvent</code> for the press. |
|
|
*/ |
|
|
public abstract void |
|
|
mousePressed(MouseEvent event); |
|
|
|
|
|
/*************************************************************************/ |
|
42 |
|
|
43 |
/** |
/** |
44 |
* This method is called when the mouse is released over a component. |
* This interface is for classes that wish to receive mouse events other than |
45 |
* |
* simple motion events. This includes clicks (but not mouse wheel events), |
46 |
* @param event The <code>MouseEvent</code> for the release. |
* and crossing component boundaries without change in button status. To |
47 |
*/ |
* track moves and drags, use MouseMotionListener, and to track wheel events, |
48 |
public abstract void |
* use MouseWheelListener. To watch a subset of these events, use a |
49 |
mouseReleased(MouseEvent event); |
* MouseAdapter. |
50 |
|
* |
51 |
|
* @author Aaron M. Renn <arenn@urbanophile.com> |
52 |
|
* @see MouseAdapter |
53 |
|
* @see MouseEvent |
54 |
|
* @since 1.1 |
55 |
|
* @status updated to 1.4 |
56 |
|
*/ |
57 |
|
public interface MouseListener extends EventListener |
58 |
|
{ |
59 |
|
/** |
60 |
|
* This method is called when the mouse is clicked (pressed and released |
61 |
|
* in short succession) on a component. |
62 |
|
* |
63 |
|
* @param event the <code>MouseEvent</code> indicating the click |
64 |
|
*/ |
65 |
|
void mouseClicked(MouseEvent event); |
66 |
|
|
67 |
|
/** |
68 |
|
* This method is called when the mouse is pressed over a component. |
69 |
|
* |
70 |
|
* @param event the <code>MouseEvent</code> for the press |
71 |
|
*/ |
72 |
|
void mousePressed(MouseEvent event); |
73 |
|
|
74 |
|
/** |
75 |
|
* This method is called when the mouse is released over a component. |
76 |
|
* |
77 |
|
* @param event the <code>MouseEvent</code> for the release |
78 |
|
*/ |
79 |
|
void mouseReleased(MouseEvent event); |
80 |
|
|
81 |
|
/** |
82 |
|
* This method is called when the mouse enters a component. |
83 |
|
* |
84 |
|
* @param event the <code>MouseEvent</code> for the entry |
85 |
|
*/ |
86 |
|
void mouseEntered(MouseEvent event); |
87 |
|
|
88 |
|
/** |
89 |
|
* This method is called when the mouse exits a component. |
90 |
|
* |
91 |
|
* @param event the <code>MouseEvent</code> for the exit |
92 |
|
*/ |
93 |
|
void mouseExited(MouseEvent event); |
94 |
} // interface MouseListener |
} // interface MouseListener |
|
|
|