|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.event.MouseAdapter org.openide.awt.MouseUtils.PopupMouseAdapter
The PopupMouseAdapter provides safe way to implement popup menu invocation
mechanism. It should be used instead of invoking the popup in
mouseClicked because the mouseClicked does not work as "often" as
it should (i.e. sometimes it is not called).
PopupMouseAdapter delegates to isPopupTrigger to get correct popup
menu invocation gesture. Clients are supposed to extend this class and
implement showPopup method by adding code that shows popup menu properly.
Please note that older implementation which used treshold is now
deprecated, please use default constructor.
Field Summary | |
static int |
DEFAULT_THRESHOLD
Deprecated. Obsoleted as of 3.4, PopupMouseAdapter now uses isPopupTrigger properly. Threshold does nothing, please use default constructor without treshold. |
Constructor Summary | |
MouseUtils.PopupMouseAdapter()
Constructs PopupMouseAdapter. |
|
MouseUtils.PopupMouseAdapter(int threshold)
Deprecated. Obsoleted as of 3.4, by class rewrite to use isPopupTrigger. This constructor now just delegates to super constructor, please use default constructor instead. |
Method Summary | |
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
protected abstract void |
showPopup(MouseEvent evt)
Called when the sequnce of mouse events should lead to actual showing of the popup menu. |
Methods inherited from class java.awt.event.MouseAdapter |
mouseClicked, mouseEntered, mouseExited |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_THRESHOLD
Constructor Detail |
public MouseUtils.PopupMouseAdapter(int threshold)
threshold
- The threshold to be usedpublic MouseUtils.PopupMouseAdapter()
Method Detail |
public void mousePressed(MouseEvent e)
public void mouseReleased(MouseEvent e)
protected abstract void showPopup(MouseEvent evt)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |