oracle.ide.controls
Class DoubleClickTrigger
java.lang.Object
oracle.ide.controls.DoubleClickTrigger
- public class DoubleClickTrigger
- extends java.lang.Object
This class is used for detecting the occurence of a double-click. For the purposes of this class, a "double-click" is the occurence of two MouseEvent
s corresponding to the mouse1 button without any modifier keys being pressed.
The detection of double-click is mediated by the isDoubleClick(MouseEvent)
method. All mouse events for a particular MouseListener
must be forwarded to isDoubleClick(MouseEvent)
for processing in order for the proper sequence of clicks to be detected.
The implementation of isDoubleClick(MouseEvent)
is somewhat unforgiving, since it will return true
only when the click count is a multiple of 2, so long as the last two clicks were mouse1 clicks without modifier keys.
Method Summary |
boolean |
isDoubleClick(java.awt.event.MouseEvent e)
This method is intended to serve as a delegate for the MouseListener#mouseClicked(MouseEvent) method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DoubleClickTrigger
public DoubleClickTrigger()
isDoubleClick
public boolean isDoubleClick(java.awt.event.MouseEvent e)
- This method is intended to serve as a delegate for the
MouseListener#mouseClicked(MouseEvent)
method.
-
- Returns:
true
if the specified MouseEvent
is deemed to be the second click of a double-click sequence; as an additional side effect of returning true
, the MouseEvent
is also consumed.
Copyright © 1997, 2004, Oracle. All rights reserved.