Class AnimatedPickingGraphMousePlugin<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
-
- edu.uci.ics.jung.visualization.control.AnimatedPickingGraphMousePlugin<V,E>
-
- All Implemented Interfaces:
GraphMousePlugin
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.util.EventListener
- Direct Known Subclasses:
SatelliteAnimatedPickingGraphMousePlugin
public class AnimatedPickingGraphMousePlugin<V,E> extends AbstractGraphMousePlugin implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
AnimatedPickingGraphMousePlugin supports the picking of one Graph Vertex. When the mouse is released, the graph is translated so that the picked Vertex is moved to the center of the view. This translateion is conducted in an animation Thread so that the graph slides to its new position
-
-
Constructor Summary
Constructors Constructor Description AnimatedPickingGraphMousePlugin()
create an instance with default modifiersAnimatedPickingGraphMousePlugin(int selectionModifiers)
create an instance, overriding the default modifiers
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
mouseClicked(java.awt.event.MouseEvent e)
void
mouseDragged(java.awt.event.MouseEvent arg0)
void
mouseEntered(java.awt.event.MouseEvent e)
show a special cursor while the mouse is inside the windowvoid
mouseExited(java.awt.event.MouseEvent e)
revert to the default cursor when the mouse leaves this windowvoid
mouseMoved(java.awt.event.MouseEvent e)
void
mousePressed(java.awt.event.MouseEvent e)
If the event occurs on a Vertex, pick that single Vertexvoid
mouseReleased(java.awt.event.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-
Methods inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
checkModifiers, getCursor, getModifiers, setCursor, setModifiers
-
-
-
-
Field Detail
-
vertex
protected V vertex
the picked Vertex
-
-
Constructor Detail
-
AnimatedPickingGraphMousePlugin
public AnimatedPickingGraphMousePlugin()
create an instance with default modifiers
-
AnimatedPickingGraphMousePlugin
public AnimatedPickingGraphMousePlugin(int selectionModifiers)
create an instance, overriding the default modifiers- Parameters:
selectionModifiers
-
-
-
Method Detail
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
If the event occurs on a Vertex, pick that single Vertex- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
- Parameters:
e
- the event
-
mouseReleased
public void mouseReleased(java.awt.event.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- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
- Parameters:
e
- the event
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
show a special cursor while the mouse is inside the window- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
revert to the default cursor when the mouse leaves this window- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMoved
in interfacejava.awt.event.MouseMotionListener
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent arg0)
- Specified by:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
-
-