Package org.jgraph.plaf.basic
Class BasicGraphUI.MouseHandler
java.lang.Object
java.awt.event.MouseAdapter
org.jgraph.plaf.basic.BasicGraphUI.MouseHandler
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,MouseWheelListener
,Serializable
,EventListener
- Enclosing class:
BasicGraphUI
public class BasicGraphUI.MouseHandler
extends MouseAdapter
implements MouseMotionListener, Serializable
TreeMouseListener is responsible for updating the selection based on
mouse events.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
handleEditTrigger
(Object cell, MouseEvent e) Handles edit trigger by starting the edit and return true if the editing has already started.protected boolean
isDescendant
(CellView parentView, CellView childView) void
void
Invoked when the mouse pointer has been moved on a component (with no buttons down).void
Invoked when a mouse button has been pressed on a component.void
protected void
postProcessSelection
(MouseEvent e, Object cell, boolean wasSelected) Invoked after a cell has been selected in the mouseReleased method.Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mouseWheelMoved
-
Field Details
-
cell
-
handler
-
previousCursor
-
-
Constructor Details
-
MouseHandler
public MouseHandler()
-
-
Method Details
-
mousePressed
Invoked when a mouse button has been pressed on a component.- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classMouseAdapter
-
handleEditTrigger
Handles edit trigger by starting the edit and return true if the editing has already started.- Parameters:
cell
- the cell being editede
- the mouse event triggering the edit- Returns:
true
if the editing has already started
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classMouseAdapter
-
mouseMoved
Invoked when the mouse pointer has been moved on a component (with no buttons down).- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in classMouseAdapter
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classMouseAdapter
-
postProcessSelection
Invoked after a cell has been selected in the mouseReleased method. This can be used to do something interesting if the cell was already selected, in which case this implementation selects the parent. Override if you want different behaviour, such as start editing. -
isDescendant
-