| A utility MouseListener which can be used to trigger something,
such as displaying a pop-up menu, in response to a particular mouse event,
in particular clicking mouse button 2 or 3, or clicking and holding any
button for a length of time. Any place that may display a popup menu should
use this to preserve a consistant look and feel, and also to properly
support single button mice.
Perhaps this should implement KeyListener or something like that... that
way a certain key sequence could trigger a popup??
NOTE: netbeans has an interesting idea, using the mousePressed and
mouseReleased events to determine when to display the pop-up; they
claim it is more reliable that using mouseClicked. If there are
problems with this, have a look at how they do it in the utility
class org.openide.awt.MouseUtils.PopupMouseAdapter.
author: Rob Clark version: 0.0 |