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 voidmouseClicked(java.awt.event.MouseEvent e)voidmouseDragged(java.awt.event.MouseEvent arg0)voidmouseEntered(java.awt.event.MouseEvent e)show a special cursor while the mouse is inside the windowvoidmouseExited(java.awt.event.MouseEvent e)revert to the default cursor when the mouse leaves this windowvoidmouseMoved(java.awt.event.MouseEvent e)voidmousePressed(java.awt.event.MouseEvent e)If the event occurs on a Vertex, pick that single VertexvoidmouseReleased(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:
mousePressedin 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:
mouseReleasedin interfacejava.awt.event.MouseListener- Parameters:
e- the event
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClickedin 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:
mouseEnteredin 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:
mouseExitedin interfacejava.awt.event.MouseListener
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMovedin interfacejava.awt.event.MouseMotionListener
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent arg0)
- Specified by:
mouseDraggedin interfacejava.awt.event.MouseMotionListener
-
-