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 booleanhandleEditTrigger(Object cell, MouseEvent e) Handles edit trigger by starting the edit and return true if the editing has already started.protected booleanisDescendant(CellView parentView, CellView childView) voidvoidInvoked when the mouse pointer has been moved on a component (with no buttons down).voidInvoked when a mouse button has been pressed on a component.voidprotected voidpostProcessSelection(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:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin 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:
trueif the editing has already started
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classMouseAdapter
-
mouseMoved
Invoked when the mouse pointer has been moved on a component (with no buttons down).- Specified by:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin classMouseAdapter
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin 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
-