com.openpcl.viewer.tree
Class PosTree.RightclickTreeMouseListener
java.lang.Object
java.awt.event.MouseAdapter
com.openpcl.viewer.tree.PosTree.RightclickTreeMouseListener
- All Implemented Interfaces:
- MouseListener, EventListener
- Enclosing class:
- PosTree
protected class PosTree.RightclickTreeMouseListener
- extends MouseAdapter
MouseAdapter class for when the user right clicks on a node in the tree.
This checks for mouse event for popup menu in both mouseReleased() and mousePressed() because:
As stated at http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html
"The exact gesture that should bring up a popup menu varies by look and feel. In Microsoft Windows, the user
by convention brings up a popup menu by releasing the right mouse button while the cursor is over a component
that is popup-enabled."
In that case, the mouseReleased() method will be handling the event. But on other platforms
and/or look and feel settings, the popup menu should show upon mousePressed() and not upon mouseReleased().
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PosTree.RightclickTreeMouseListener
protected PosTree.RightclickTreeMouseListener()
mouseReleased
public void mouseReleased(MouseEvent pE)
- Specified by:
mouseReleased
in interface MouseListener
- Overrides:
mouseReleased
in class MouseAdapter
mousePressed
public void mousePressed(MouseEvent pE)
- Specified by:
mousePressed
in interface MouseListener
- Overrides:
mousePressed
in class MouseAdapter
OpenPCL http://www.openpcl.com