BasicGraphUI.MouseHandler (JGraph v5.12.4.2 API Specification)
Keywords: org.jgraph.plaf.basic.BasicGraphUI.MouseHandler class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph v5.12.4.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jgraph.plaf.basic
Class BasicGraphUI.MouseHandler

    java.lang.Object
      java.awt.event.MouseAdapter
          org.jgraph.plaf.basic.BasicGraphUI.MouseHandler

All Implemented Interfaces:
  EventListener, MouseListener, MouseMotionListener, Serializable

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:
  Serialized Form

Field Summary
`protected CellView` | `cell`
`protected Object` | `handler`
`protected Cursor` | `previousCursor`

Constructor Summary
`BasicGraphUI.MouseHandler()`

Method Summary
`protected 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` | `mouseDragged(MouseEvent e)`
`void` | `mouseMoved(MouseEvent e)` Invoked when the mouse pointer has been moved on a component (with no buttons down).
`void` | `mousePressed(MouseEvent e)` Invoked when a mouse button has been pressed on a component.
`void` | `mouseReleased(MouseEvent e)`
`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`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### cell

    protected CellView cell

### handler

    protected Object handler

### previousCursor

    protected transient Cursor previousCursor

Constructor Detail

### BasicGraphUI.MouseHandler

    public BasicGraphUI.MouseHandler()

Method Detail

### mousePressed

    public void mousePressed(MouseEvent e)

  Invoked when a mouse button has been pressed on a component.

  Specified by:
    `mousePressed` in interface `MouseListener`

### handleEditTrigger

    protected boolean handleEditTrigger(Object cell,
                                        MouseEvent e)

  Handles edit trigger by starting the edit and return true if the editing has already started.

  Parameters:
    `cell` - the cell being edited
    `e` - the mouse event triggering the edit
  Returns:
    `true` if the editing has already started

### mouseDragged

    public void mouseDragged(MouseEvent e)

  Specified by:
    `mouseDragged` in interface `MouseMotionListener`

### mouseMoved

    public void mouseMoved(MouseEvent e)

  Invoked when the mouse pointer has been moved on a component (with no buttons down).

  Specified by:
    `mouseMoved` in interface `MouseMotionListener`

### mouseReleased

    public void mouseReleased(MouseEvent e)

  Specified by:
    `mouseReleased` in interface `MouseListener`

### postProcessSelection

    protected void postProcessSelection(MouseEvent e,
                                        Object cell,
                                        boolean wasSelected)

  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

    protected boolean isDescendant(CellView parentView,
                                   CellView childView)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph v5.12.4.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) 2001-2008 Gaudenz Alder. All rights reserved.