torero.gui
Class MyTreeUI.MouseHandler
java.lang.Object
|
+--java.awt.event.MouseAdapter
|
+--torero.gui.MyTreeUI.MouseHandler
- All Implemented Interfaces:
- EventListener, MouseListener
- Enclosing class:
- MyTreeUI
- public class MyTreeUI.MouseHandler
- extends MouseAdapter
TreeMouseListener is responsible for updating the selection
based on mouse events.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MyTreeUI.MouseHandler
public MyTreeUI.MouseHandler()
mousePressed
public void mousePressed(MouseEvent e)
- Invoked when a mouse button has been pressed on a component.
The affected NodeWrapper is located and processmouseEvent is called on NodeWrapper.getInner().
If it was a doubleclick (shift-click) the toggleEvent() method of the effected NodeWrapper is called.
tree.repaint() is called, to make changes of view take effect.
If inner is of type GrammerNode, processMouseEvent(...) is called on it.
- Overrides:
mousePressed
in class MouseAdapter
- Parameters:
e
- used to get the coordinates and passed to the NodeWrapper's inner.