public class AnimatedPickingGraphMousePlugin<V,E> extends AbstractGraphMousePlugin implements MouseListener, MouseMotionListener
Modifier and Type | Field and Description |
---|---|
protected V |
vertex
the picked Vertex
|
cursor, down, modifiers
Constructor and Description |
---|
AnimatedPickingGraphMousePlugin()
Creates an instance with default modifiers of BUTTON1_MASK and CTRL_MASK
|
AnimatedPickingGraphMousePlugin(int selectionModifiers)
Creates an instance with the specified mouse event modifiers.
|
Modifier and Type | Method and Description |
---|---|
void |
mouseClicked(MouseEvent e) |
void |
mouseDragged(MouseEvent arg0) |
void |
mouseEntered(MouseEvent e)
show a special cursor while the mouse is inside the window
|
void |
mouseExited(MouseEvent e)
revert to the default cursor when the mouse leaves this window
|
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent e)
If the event occurs on a Vertex, pick that single Vertex
|
void |
mouseReleased(MouseEvent e)
If a Vertex was picked in the mousePressed event, start a Thread
to animate the translation of the graph so that the picked Vertex
moves to the center of the view
|
checkModifiers, getCursor, getModifiers, setCursor, setModifiers
protected V vertex
public AnimatedPickingGraphMousePlugin()
public AnimatedPickingGraphMousePlugin(int selectionModifiers)
selectionModifiers
- the mouse event modifiers to use.public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
e
- the eventpublic void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
e
- the eventpublic void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public void mouseDragged(MouseEvent arg0)
mouseDragged
in interface MouseMotionListener
Copyright © 2015. All rights reserved.